/*
Theme Name: Entertainment Ranking
Theme URI: https://fmhost.jp/
Author: FMHost
Description: fmhost.jp サブディレクトリ用エンターテイメントランキングテーマ
Version: 2.0
Text Domain: entertainment-ranking
*/

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #0066cc;
    --accent-color: #00a0e9;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-gray: #f5f7fa;
    --border-color: #e0e0e0;
    --header-bg: #f2f941;
    --footer-bg: #1a1a2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    height: auto;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'Meiryo', 'メイリオ', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    overflow-y: auto;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--header-bg);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Header spacer */
.header-spacer {
    height: 70px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #0052a3;
    transform: translateY(-3px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo .logo-img {
    height: 40px;
    width: auto;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.main-nav li a {
    display: block;
    padding: 24px 20px;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.main-nav li a:hover {
    background: rgba(0,0,0,0.1);
    color: #000000;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 50px 0;
    text-align: center;
}

.hero h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
}

.hero p {
    font-size: 15px;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Ranking Cards */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.article-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.article-thumbnail-wrap {
    position: relative;
    flex-shrink: 0;
    width: 280px;
}

.article-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail {
    transform: scale(1.05);
}

.no-thumbnail {
    width: 280px;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-gray) 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
}

.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    letter-spacing: 0.5px;
}

.article-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.article-category {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
}

.article-date {
    font-size: 13px;
    color: var(--text-light);
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: var(--secondary-color);
}

.article-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #0052a3;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* Responsive Article Cards */
@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
    }
    
    .article-thumbnail-wrap {
        width: 100%;
    }
    
    .article-thumbnail,
    .no-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.widget-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 18px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Popular Ranking Widget */
.popular-list {
    list-style: none;
}

.popular-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.popular-list li:nth-child(1) .popular-rank { background: linear-gradient(135deg, #ffd700, #ffb800); }
.popular-list li:nth-child(2) .popular-rank { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); }
.popular-list li:nth-child(3) .popular-rank { background: linear-gradient(135deg, #cd7f32, #b8722d); }
.popular-list li:nth-child(n+4) .popular-rank { background: var(--secondary-color); }

.popular-list a {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

.popular-list a:hover {
    color: var(--secondary-color);
}

/* Category Tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    display: inline-block;
    background: var(--bg-gray);
    color: var(--text-color);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    background: #fff;
    color: var(--text-light);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

/* Sidebar Banner */
.banner-link {
    display: block;
    text-decoration: none;
}

.banner-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f2f941 0%, #e8ef3a 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
}

.banner-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.banner-logo {
    max-width: 140px;
    height: auto;
}

.banner-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

/* Single Post */
.single-post {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.single-thumbnail {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.single-content {
    padding: 40px;
}

.single-category {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.single-title {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.5;
    margin-bottom: 15px;
}

.single-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-content {
    font-size: 16px;
    line-height: 2;
}

.post-content h2 {
    font-size: 22px;
    color: var(--primary-color);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.post-content h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    border-radius: 8px;
    margin: 20px 0;
}

.post-content ul, .post-content ol {
    margin: 20px 0;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 8px;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: #ffffff;
    padding: 40px 0 25px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo-img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.footer-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #f2f941;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Pagination */
div.pagination {
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

div.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

div.pagination .nav-links a,
div.pagination .nav-links span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-color);
    background: var(--bg-color);
    transition: all 0.3s ease;
}

div.pagination .nav-links a:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

div.pagination .nav-links .current {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-top: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li a {
        padding: 10px 15px;
    }
    
    .hero {
        padding: 35px 0;
    }
    
    .hero h1 {
        font-size: 22px;
    }
    
    .ranking-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .ranking-thumbnail,
    .no-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .single-content {
        padding: 25px;
    }
    
    .single-title {
        font-size: 20px;
    }
}
