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

html {
    /* Alternative approach for older browsers */
    overflow-y: scroll;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    /* Prevent layout shift when scrollbar appears/disappears */
    scrollbar-gutter: stable;
}

/* REMOVED: body.loading { visibility: hidden; } was blocking FCP!
   Previous approach hid entire page for 5.5 seconds until JS loaded.
   New approach: Show skeleton UI immediately, hide only after data loads.
   This improves FCP from 5.5s to <1s.
*/

/* Multi-language font support (default: maintain Japanese font) */
body.lang-en {
    font-family: 'Inter', 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body.lang-jp {
    font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* SEO-optimized H1 (hidden from users, visible to search engines) */
.seo-h1 {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Language-specific visibility - Global rules */
/* Default: show English, hide Japanese */
.jp-only {
    display: none;
}

.en-only {
    display: inline;
}

/* When html has lang-jp class */
html.lang-jp .jp-only {
    display: inline;
}

html.lang-jp .en-only {
    display: none;
}

/* When html has lang-en class */
html.lang-en .jp-only {
    display: none;
}

html.lang-en .en-only {
    display: inline;
}

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 24px;
}

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

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.lang-text-btn {
    border: none;
    background: transparent;
    color: #5f6368;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-text-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #333;
}

.lang-text-btn.active {
    color: #4285f4;
    font-weight: 600;
}

.lang-separator {
    color: #dadce0;
    font-size: 16px;
    font-weight: 300;
    user-select: none;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile header profile image */
.mobile-header-profile {
    display: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-header-profile:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Floating Top button */
.floating-top-btn {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: #4285f4;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    font-size: 16px;
    font-weight: bold;
}

/* Adjust position to avoid overlapping with bottom pagination bar */
@media (min-width: 768px) {
    .floating-top-btn {
        bottom: 95px; /* Bottom bar height (approx 50px) + margin (45px) */
    }
}

/* Mobile and tablet adjustments for sticky bottom pagination */
@media (max-width: 767px) {
    .floating-top-btn {
        bottom: 90px; /* Space above fixed pagination on mobile/tablet */
    }
}

@media (max-width: 480px) {
    .floating-top-btn {
        bottom: 85px; /* Slightly closer on small mobile screens */
        width: 44px;
        height: 44px;
    }
}

.floating-top-btn:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.floating-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Fixed to bottom-right on desktop (most stable) */

.logo {
    position: relative;
    width: 40px;
    height: 40px;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.site-title {
    font-size: 32px;
    font-weight: 700;
    color: #333333;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-title:hover {
    color: #0066cc;
    opacity: 0.9;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: color 0.2s ease;
    text-decoration: none;
}

.social-icon:hover {
    color: #333333;
}

.social-icon.youtube:hover {
    color: #ff0000;
}

.social-icon.twitter:hover {
    color: #1da1f2;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 828px 340px;
    gap: 32px;
}

/* Content Area */
.content-area {
    background-color: #ffffff;
    min-width: 0;
    overflow: hidden;
}

/* Navigation Section */
.navigation-section {
    margin-bottom: 32px;
}

.nav-title {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #333333;
}

/* Control <br> tags for mobile breakpoint */
.mobile-br {
    display: none; /* Hide on desktop */
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-label {
    font-size: 12px;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    user-select: none;
    white-space: nowrap;
    min-width: 32px;
    text-align: center;
}

.nav-label:hover {
    color: #333333;
    background-color: #f5f5f5;
    border-color: #999;
}

.nav-button {
    font-size: 12px;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    user-select: none;
    font-weight: 500;
    white-space: nowrap;
    min-width: 42px;
    text-align: center;
}

.nav-button:hover {
    color: #ffffff;
    background-color: #4285f4;
    border-color: #4285f4;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.3);
}

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(66, 133, 244, 0.3);
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Japanese dropdown style (default) */
.jp-dropdown-style {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* English dropdown style */
.en-dropdown-style {
    display: none;
}

/* Unified height for all navigation elements */
.date-selector .nav-label,
.date-selector .nav-button,
.date-controls .nav-label,
.date-controls .nav-button {
    height: 30px !important; /* Same height as dropdown - force apply */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

/* > button now inside .date-selector so unified style applies */

/* Language-specific text handling - prevent flicker */
.lang-en .filter-text[data-en]::before {
    content: attr(data-en);
    font-size: 14px; /* Explicit font size setting */
}
.lang-en .filter-text[data-en] {
    font-size: 0; /* Hide default text */
}

.lang-jp .filter-text[data-jp]::before {
    content: attr(data-jp);
    font-size: 14px; /* Explicit font size setting */
}
.lang-jp .filter-text[data-jp] {
    font-size: 0; /* Hide default text */
}

/* Go/移動 button language-specific text handling - complete separation with span */
.lang-en .jp-text {
    display: none !important;
}
.lang-en .en-text {
    display: inline !important;
}

.lang-jp .en-text {
    display: none !important;
}
.lang-jp .jp-text {
    display: inline !important;
}

/* Default on initial loading - English priority */
.jp-text {
    display: none;
}
.en-text {
    display: inline;
}

/* Support card language-specific display - simplified */
.lang-en .jp-support {
    display: none !important;
}
.lang-en .en-support {
    display: block !important;
}

.lang-jp .en-support {
    display: none !important;
}
.lang-jp .jp-support {
    display: block !important;
}

/* Default on initial loading - English priority */
.jp-support {
    display: none;
}
.en-support {
    display: block;
}

/* Patreon icon with same style as pixiv FANBOX */
.patreon-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.patreon-icon img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Japanese style: center align all elements (restore previous spec) */
.date-selector:not(.en-layout) {
    align-items: center;
}

/* English style: align dropdown group to same baseline as buttons */
.date-selector.en-layout {
    align-items: flex-end; /* Align all direct children to bottom baseline */
}

/* English layout: match entire dropdown group to button height */
.date-selector.en-layout .en-dropdown-style {
    align-self: flex-end; /* Bottom align entire dropdown area */
}

.date-selector.en-layout .dropdown-group {
    display: flex;
    align-items: flex-end; /* Bottom align dropdown items */
    gap: 6px;
    min-height: 45px; /* Secure space for label + dropdown */
}

.date-selector.en-layout .dropdown-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Place dropdown at bottom */
    height: 100%; /* Use full height */
}

/* Display labels clearly at top */
.date-selector.en-layout .dropdown-label {
    font-size: 12px; /* Increased from 10px → 12px */
    color: #666;
    margin-bottom: 2px;
    line-height: 1;
    display: block !important; /* Force show labels */
    text-align: center;
    white-space: nowrap;
    opacity: 1 !important; /* Force opacity setting */
    visibility: visible !important; /* Force visibility setting */
    font-weight: 500; /* Slightly bold for better readability */
}

.date-selector.en-layout .date-select {
    height: 30px !important; /* Same height as buttons */
    box-sizing: border-box !important;
}

.dropdown-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dropdown-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.date-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
}

#year, #year-en {
    width: 70px;
}

#month, #month-en {
    width: 55px;
}

#week, #week-en {
    width: 45px;
}

.date-select:focus {
    outline: none;
    border-color: #4285f4;
}

.week-pagination {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}


.week-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.week-btn:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.week-btn.active {
    background-color: #4285f4;
    border-color: #4285f4;
    color: #ffffff;
}

/* Page Navigation Buttons */
.page-nav-btn {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.page-nav-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

.page-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter Section */
.filter-section {
    margin-top: 24px;
    margin-bottom: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #5f6368;
    position: relative;
}

.filter-checkbox:hover {
    background-color: rgba(66, 133, 244, 0.08);
    color: #4285f4;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dadce0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.filter-checkbox:hover .checkmark {
    border-color: #4285f4;
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.3);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
    transform: scale(1.05);
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.filter-checkbox input[type="checkbox"]:checked ~ span {
    color: #4285f4;
    font-weight: 600;
}

/* Pending filter checkbox styles - when filter change is queued during loading */
.filter-checkbox.pending {
    opacity: 0.7;
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    animation: pulse-pending 1.5s ease-in-out infinite;
}

.filter-checkbox.pending .checkmark {
    border-color: #ffc107;
    animation: glow-pending 1.5s ease-in-out infinite;
}

@keyframes pulse-pending {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

@keyframes glow-pending {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 193, 7, 0.3); }
    50% { box-shadow: 0 0 10px rgba(255, 193, 7, 0.6); }
}

/* Keep disabled styles for backward compatibility */
.filter-checkbox.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.filter-checkbox.disabled:hover {
    background-color: transparent;
    color: inherit;
}

.filter-checkbox.disabled .checkmark {
    border-color: #ccc;
    background-color: #f5f5f5;
}

.filter-checkbox.disabled:hover .checkmark {
    border-color: #ccc;
    box-shadow: none;
}

/* Ranking List */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    /* Fixed height for CLS prevention - 50 items per page */
    /* Desktop: 50 items × 135px + 49 gaps × 16px = 7,534px */
    min-height: 7534px;
    position: relative; /* For absolute positioning of loading overlay */
}

/* Loading Overlay - Positioned absolutely to prevent CLS */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to flex-start */
    padding-top: 100px; /* Position spinner in upper area for visibility */
    z-index: 10;
    transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Spinner Animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00a0e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 13px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    /* Fixed height to match skeleton-item exactly (109px thumbnail + 13px*2 padding + 2px border) */
    min-height: 135px;
}

/* Instant text transitions - no animations for content updates */

.ranking-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.ranking-item:active {
    transform: translateY(1px);
    transition: transform 0.1s ease;
}

.rank-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    flex-shrink: 0;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.current-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rank-triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.rank-triangle.red {
    border-bottom: 12px solid #ea4335;
}

.rank-triangle.blue {
    border-bottom: 12px solid #4285f4;
}

.rank-triangle.gold {
    border-bottom: 12px solid #fbbc05;
}

.rank-number {
    font-size: 34px;
    font-weight: 700;
    color: #555555;
    text-align: center;
    min-width: 32px;
    line-height: 1;
}

.rank-number.first-place {
    color: #fbbc05;
}

.rank-number.out-rank {
    color: #4285f4;
    font-size: 24px;
    font-weight: 600;
}

.out-label {
    color: #4285f4;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

/* Rank Change Indicator */
.rank-change {
    font-size: 17px;
    font-weight: 500;
    text-align: center;
    min-width: 32px;
    line-height: 1;
    background: none;
    padding: 0;
    margin-top: 10px;
}

.rank-change.up {
    color: #ea4335;
}

.rank-change.down {
    color: #4285f4;
}

.rank-change.same {
    color: #9aa0a6;
}

.rank-change.new {
    color: #fbbc05;
    font-size: 16px;
}

.video-thumbnail {
    width: 146px;
    height: 109px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ranking-item:hover .video-thumbnail {
    transform: scale(1.05);
    box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.15);
}

.ranking-item:hover .video-thumbnail img {
    transform: scale(1.07);
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 19px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-artist {
    font-size: 14px;
    color: #666666;
}

.video-stats {
    text-align: right;
    width: 120px;
    flex-shrink: 0;
}

.view-count {
    font-size: 19px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 4px;
}

.view-increase {
    font-size: 15px;
    color: #666666;
}

/* Sidebar */
.sidebar {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Brand Section */
.brand-section {
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-align: center;
}

.brand-logo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.brand-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-info h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 8px;
}

.brand-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.brand-social-icon {
    width: 32px;
    height: 32px;
    color: #666666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    text-decoration: none;
}

.brand-social-icon.youtube:hover {
    color: #ff0000;
}

.brand-social-icon.twitter:hover {
    color: #1da1f2;
}

.brand-social-icon.discord:hover {
    color: #5865f2;
}

/* Promo Section */
/* Weekly Video Section */
.weekly-video-section {
    padding: 0;
}

.weekly-video-header {
    margin-bottom: 12px;
}

.weekly-video-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.weekly-video-embed {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    background-color: transparent;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.weekly-video-embed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 99%;
    height: 99%;
    background-color: #000;
    border-radius: 8px;
    z-index: 0;
}

.weekly-video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    background: linear-gradient(135deg, #333, #555);
    position: relative;
    z-index: 1;
}

.video-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(68, 133, 244, 0.3);
    border-radius: 50%;
    border-top-color: #4285f4;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    text-align: center;
}

.video-loading p {
    margin: 0;
    font-size: 14px;
}

.no-video-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
    background: #f8f8f8;
}

.no-video-message p {
    margin: 0;
    font-size: 14px;
}

/* Video Thumbnail Styles */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.video-thumbnail-container:hover {
    transform: scale(1.02);
}

.video-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-thumbnail-container:hover .video-play-button {
    background: rgba(255, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-loading p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    background: linear-gradient(135deg, #555, #777);
    text-align: center;
    padding: 20px;
}

.video-error p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.video-retry-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.video-retry-btn:hover {
    background: #cc3333;
}

.promo-section {
    padding: 0;
}

.promo-banner {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.promo-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-info {
    padding: 16px;
    background-color: #ffffff;
}

.promo-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.promo-info p {
    font-size: 12px;
    color: #666666;
}

/* Support Section */
.support-section {
    padding: 0;
}

.support-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.support-link:hover {
    transform: translateY(-2px);
}

.support-banner {
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.support-link:hover .support-banner {
    background-color: #e8f4fd;
    border-color: #0096FA;
    box-shadow: 0 4px 12px rgba(0, 150, 250, 0.15);
}

.support-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pixiv-fanbox-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pixiv-fanbox-icon img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.support-text h5 {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    line-height: 1.4;
}

/* Loading and Error States */
/* ========== Loading State Optimization ========== */

/* Existing loading container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out 0.1s forwards;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #888888;
    font-weight: 500;
}

/* Skeleton UI */
.skeleton-container {
    opacity: 0;
    animation: fadeIn 0.2s ease-in-out forwards;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Match ranking-list gap */
}

.skeleton-item {
    display: flex;
    align-items: center;
    padding: 13px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
    /* Fixed height to match ranking-item exactly */
    min-height: 135px;
}

.skeleton-rank {
    width: 60px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-right: 12px;
}

.skeleton-thumbnail {
    width: 146px;
    height: 109px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin-right: 16px;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-title {
    width: 85%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-artist {
    width: 60%;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-views {
    width: 40%;
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Content fade transition */
.ranking-list {
    transition: opacity 0.3s ease-in-out;
}

.ranking-list.loading {
    opacity: 0.7;
}

/* Improved button click feedback */
.nav-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    color: #ea4335;
    margin-bottom: 24px;
    line-height: 1.4;
}

.retry-button {
    padding: 10px 20px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.retry-button:hover {
    background-color: #3367d6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 320px;
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr 300px;
        gap: 20px;
        padding: 20px;
    }
    
    .ranking-item {
        gap: 16px;
        padding: 12px;
    }
    
    .video-thumbnail {
        width: 130px;
        height: 97px;
    }
    
    .rank-indicator {
        width: 70px;
    }
    
    .video-stats {
        width: 110px;
    }
}

/* Mobile Profile and Video Sections */
.mobile-profile-section {
    display: none;
    margin-bottom: 20px;
}

.mobile-video-section {
    display: none;
    margin-bottom: 20px;
}

.mobile-bottom-sections {
    display: none;
}

.mobile-support-section {
    display: none;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .sidebar {
        display: none; /* Hide sidebar on mobile */
    }

    /* Mobile: Fixed height for CLS prevention */
    /* Mobile: 50 items × 97px + 49 gaps × 16px = 5,634px */
    .ranking-list {
        min-height: 5634px;
    }

    /* Show mobile sections */
    .mobile-video-section {
        display: block;
    }
    
    .mobile-bottom-sections {
        display: block;
        margin-top: 24px;
        padding: 0 16px;
    }
    
    .mobile-bottom-sections .mobile-profile-section {
        display: block;
    }
    
    .mobile-bottom-sections .mobile-support-section {
        display: block;
    }
    
    /* Copy sidebar styles for mobile sections */
    .mobile-profile-section .brand-section,
    .mobile-bottom-sections .mobile-profile-section .brand-section {
        padding: 20px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        text-align: center;
        background-color: #ffffff;
    }
    
    .mobile-bottom-sections .mobile-support-section .support-banner {
        padding: 20px;
        background-color: #f8f9fa;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
    }
    
    .mobile-video-section .weekly-video-embed {
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid #e5e5e5;
        background-color: transparent;
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .mobile-video-section .weekly-video-embed::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 99%;
        height: 99%;
        background-color: #000;
        border-radius: 8px;
        z-index: 0;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        text-align: center;
        position: relative;
    }
    
    .language-selector {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-40%); /* Move up slightly (-35% → -40%) */
        gap: 6px; /* Reduced gap on mobile (default 12px → 6px) */
        align-items: center; /* Enhanced vertical center alignment */
        height: auto;
        line-height: 1;
    }
    
    .lang-text-btn {
        font-size: 14px;
        line-height: 1;
        padding: 0;
        height: auto;
        display: flex;
        align-items: center;
    }
    
    .lang-separator {
        line-height: 1;
        height: auto;
        display: flex;
        align-items: center;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    /* モバイルでも横レイアウトを維持 */
    .ranking-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px;
        /* Mobile: Fixed height to match skeleton-item (75px thumbnail + 10px*2 padding + 2px border) */
        min-height: 97px;
    }

    .skeleton-item {
        padding: 10px;
        /* Mobile: Fixed height to match ranking-item */
        min-height: 97px;
    }

    .skeleton-thumbnail {
        width: 100px;
        height: 75px;
    }

    .rank-indicator {
        width: 60px;
        flex-shrink: 0;
    }
    
    .rank-number {
        font-size: 28px;
    }
    
    .rank-number.out-rank {
        font-size: 20px;
    }
    
    .video-thumbnail {
        width: 100px;
        height: 75px;
        flex-shrink: 0;
    }
    
    .video-info {
        flex: 1;
        min-width: 0;
    }
    
    /* タイトルを2-3行で表示 */
    .video-title {
        font-size: 16px;
        line-height: 1.3;
        -webkit-line-clamp: 3;
        margin-bottom: 4px;
    }
    
    .video-artist {
        font-size: 13px;
        line-height: 1.2;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .video-stats {
        width: 90px;
        flex-shrink: 0;
        text-align: right;
    }
    
    .view-count {
        font-size: 16px;
    }
    
    .view-increase {
        font-size: 13px;
    }
    
    .date-controls {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .week-pagination {
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .week-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .content-area {
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-title {
        text-align: center;
        line-height: 1.3;
        font-size: 20px;
        min-height: 52px; /* Reserve space for 2 lines (20px * 1.3 * 2) to prevent CLS */
    }
    
    /* Show <br> tags on mobile */
    .mobile-br {
        display: inline !important;
    }
    
    .nav-label {
        display: inline-block;
        font-size: 14px;
        min-width: 26px;
        /* Padding and height managed in unified style */
    }
    
    .ranking-item {
        gap: 8px;
        padding: 10px;
        /* Mobile (480px): Fixed height to match skeleton-item */
        min-height: 97px;
    }

    .rank-indicator {
        width: 40px;
    }
    
    .rank-number {
        font-size: 19px;
    }
    
    .rank-number.out-rank {
        font-size: 19px;
    }
    
    .rank-change {
        font-size: 14px;
        margin-top: 6px;
    }
    
    .rank-change.new {
        font-size: 13px;
    }
    
    .video-thumbnail {
        width: 100px;
        height: 75px;
    }
    
    .video-title {
        font-size: 15px;
        -webkit-line-clamp: 3;
    }
    
    .video-artist {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .video-info {
        flex: 1;
        min-width: 0;
    }
    
    .video-stats {
        display: none;
    }
    
    /* Show view stats on mobile when toggled */
    .mobile-show-views .video-stats {
        display: block !important;
        width: 80px;
        font-size: 12px;
    }
    
    .mobile-show-views .video-info {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 190px); /* Reduce padding between title and view stats */
    }
    
    .mobile-show-views .view-count {
        font-size: 13px !important;
    }
    
    .mobile-show-views .view-increase {
        font-size: 12px !important;
    }
    
    .view-count {
        font-size: 15px;
    }
    
    .view-increase {
        font-size: 13px;
    }
    
    .site-title {
        font-size: 22px;
        line-height: 1;
        margin: 0;
    }
    
    /* Show header profile image only on mobile */
    .mobile-header-profile {
        display: block;
        width: 34px;
        height: 34px;
    }
    
    /* Floating Top button shows on all screen sizes (already handled in base style) */
    
    /* Reduce all control sizes on mobile - maintain unified height */
    .nav-button {
        min-width: 36px;
        font-size: 13px;
        /* padding and height managed in unified style */
    }
    
    .nav-label {
        min-width: 24px;
        font-size: 13px;
        /* padding and height managed in unified style */
    }
    
    .date-select {
        padding: 3px 5px;
        font-size: 14px;
    }
    
    #year {
        width: 64px;
    }
    
    #month {
        width: 49px;
    }
    
    #week {
        width: 40px;
    }
    
    /* Reduce 年/月/週 text size */
    .date-controls span {
        font-size: 14px;
    }
    
    /* Center align week selection and page selection on mobile */
    .date-controls {
        justify-content: center;
        gap: 5px; /* Slightly wider gap */
    }
    
    .week-pagination {
        justify-content: center;
        align-items: center;
    }


}

@media (min-width: 481px) and (max-width: 767px) {
    .nav-title {
        text-align: left;
        line-height: 1.6;
        font-size: 20px;
        min-height: 64px; /* Reserve space for 2 lines (20px * 1.6 * 2) to prevent CLS */
    }
    
    .header-content {
        position: relative;
        justify-content: center;
    }
    
    .language-selector {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-40%); /* Move up slightly (-35% → -40%) */
        align-items: center;
        height: auto;
        line-height: 1;
    }
    
    .lang-text-btn {
        font-size: 14px;
        line-height: 1;
        padding: 0;
        height: auto;
        display: flex;
        align-items: center;
    }
    
    .lang-separator {
        line-height: 1;
        height: auto;
        display: flex;
        align-items: center;
    }
    
    .site-title {
        font-size: 22px;
        line-height: 1;
        margin: 0;
        text-align: center;
    }
    
    /* Show header profile image on tablet too */
    .mobile-header-profile {
        display: block;
        width: 34px;
        height: 34px;
    }
}

/* Bottom Pagination Styles */
.bottom-pagination {
    background: #f8f9fa;
    padding: 14px 20px;
    margin-top: 30px;
    border-top: 1px solid #e8eaed;
    /* No bottom border by default - only on mobile */
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04); /* Only top shadow by default */
}

/* Sticky bottom pagination for all devices */
.bottom-pagination {
    position: sticky;
    bottom: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(248, 249, 250, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-pagination.visible {
    opacity: 1;
    visibility: visible;
}

/* Desktop specific adjustments */
@media (min-width: 768px) {
    .bottom-pagination {
        margin-top: 0;
        border-top: 1px solid #e0e0e0; /* Keep top border to separate from content */
        box-shadow: none; /* Remove all shadows to prevent casting onto footer */
        opacity: 1; /* Always visible on desktop */
        visibility: visible; /* Always visible on desktop */
    }

    /* Add bottom padding to main content to prevent overlap */
    .main-content {
        padding-bottom: 20px; /* Minimal padding to connect with footer */
    }
}

.bottom-pagination .pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bottom-pagination .page-nav-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-pagination .page-nav-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.bottom-pagination .page-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.bottom-pagination .page-buttons {
    display: flex;
    gap: 4px;
}

.bottom-pagination .bottom-week-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottom-pagination .bottom-week-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.bottom-pagination .bottom-week-btn.active {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

/* Mobile responsive for bottom pagination */
@media (max-width: 480px) {
    .bottom-pagination {
        padding: 15px;
        margin-top: 0;
        border-bottom: 1px solid #e8eaed; /* Add bottom border on mobile */
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04); /* Full shadow on mobile */
    }

    /* Add bottom padding to main content on mobile to prevent overlap */
    .main-content {
        padding-bottom: 80px; /* Space for fixed pagination on mobile */
    }

    .bottom-pagination .pagination-controls {
        gap: 4px;
    }

    .bottom-pagination .page-buttons {
        gap: 2px;
    }

    .bottom-pagination .bottom-week-btn,
    .bottom-pagination .page-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

/* Tablet responsive for bottom pagination */
@media (min-width: 481px) and (max-width: 767px) {
    .bottom-pagination {
        margin-top: 0;
        border-bottom: 1px solid #e8eaed;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    /* Add bottom padding to main content on tablet to prevent overlap */
    .main-content {
        padding-bottom: 70px; /* Space for fixed pagination on tablet */
    }

}

/* Desktop hide navigation arrows by default */
@media (min-width: 768px) {
    .navigation .nav-label {
        display: none;
    }
}

/* Filter section responsive layout */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Mobile-only elements - hide by default */
.mobile-only {
    display: none;
}

/* Show mobile-only elements on mobile */
@media (max-width: 480px) {
    .mobile-only {
        display: flex;
    }

    .filter-row {
        gap: 8px;
        justify-content: flex-start;
    }

    .filter-section {
        gap: 6px;
        width: 100%; /* Ensure full width from initial render */
        box-sizing: border-box; /* Include padding in width calculation */
    }

    .filter-checkbox {
        gap: 8px; /* Reduce checkbox internal gap too */
        font-size: 12px; /* Reduce text size by 1px */
    }
}

/* Desktop single row layout */
@media (min-width: 481px) {
    .filter-section {
        flex-direction: row;
        gap: 0;
    }
    
    .filter-row {
        gap: 15px;
        flex-wrap: nowrap; /* Maintain single line, prevent wrap */
    }
    
    .filter-checkbox {
        flex-shrink: 0; /* Fixed checkbox size */
        white-space: nowrap; /* Prevent text wrap */
    }
}

/* Error Page Styles */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.error-container {
    text-align: center;
    max-width: 500px;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eaed;
}

.error-icon {
    color: #ea4335;
    margin-bottom: 24px;
    opacity: 0.8;
}

.error-icon svg {
    width: 80px;
    height: 80px;
}

.error-title {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
    line-height: 1.3;
}

.error-message {
    font-size: 18px;
    color: #666666;
    margin-bottom: 12px;
    line-height: 1.5;
}


.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    min-width: 140px;
}

.error-btn-clean {
    background: #ffffff;
    color: #666666;
    border: 1px solid #e8eaed;
}

.error-btn-clean:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    transform: translateY(-1px);
}

/* Mobile responsive for error page */
@media (max-width: 480px) {
    .error-container {
        padding: 32px 20px;
        margin: 0 10px;
    }
    
    .error-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .error-title {
        font-size: 24px;
    }
    
    .error-message {
        font-size: 16px;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .error-btn {
        width: 100%;
    }
}


/* Site Footer */
.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 0 24px 0; /* Less top padding, more bottom padding */
    margin-top: 40px;
    text-align: center;
}

/* Desktop: Remove footer margin and border to connect with pagination */
@media (min-width: 768px) {
    .site-footer {
        margin-top: 0;
        border-top: none; /* Remove top border to seamlessly connect with pagination */
    }
}

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

/* Single line footer layout */
.footer-single-line {
    display: flex;
    align-items: center; /* Ensure vertical center alignment */
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1; /* Consistent line height for precise alignment */
}

.footer-single-line a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1; /* Consistent line height */
    display: flex;
    align-items: center; /* Individual vertical alignment */
}

.footer-single-line a:hover {
    color: #FF6B35;
}

.footer-separator {
    color: #666; /* Match link color for consistency */
    font-weight: 400;
    line-height: 1;
    display: flex;
    align-items: center; /* Individual vertical alignment */
}

.footer-copyright {
    font-size: 12px; /* Smaller text like previous revision */
    color: #999;
    line-height: 1;
    display: flex;
    align-items: center; /* Individual vertical alignment */
}

/* Language-specific footer privacy links */
.footer-single-line .jp-only,
.footer-single-line .en-only {
    display: none;
}

body.lang-jp .footer-single-line .jp-only {
    display: inline;
}

body.lang-en .footer-single-line .en-only {
    display: inline;
}

/* Mobile Footer */
@media (max-width: 768px) {
    .site-footer {
        margin-top: 20px; /* Reduce margin above footer on mobile */
    }

    .footer-single-line {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .footer-separator {
        display: none; /* Hide separator on mobile as items are stacked */
    }

    .footer-copyright {
        font-size: 11px; /* Keep smaller on mobile too */
    }
}

/* ========================================
   Loading Skeleton UI (FCP Optimization)
   ======================================== */

.loading-skeleton {
    display: block;
    padding: 20px 0;
}

/* 데이터 로드 완료 시 스켈레톤 숨김 */
.loading-skeleton.hidden {
    display: none;
}

.skeleton-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f8f8;
    border-radius: 8px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.skeleton-rank {
    font-size: 18px;
    font-weight: bold;
    color: #ccc;
    min-width: 30px;
    text-align: center;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    width: 80%;
}

.skeleton-artist {
    height: 16px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    width: 60%;
}

.skeleton-stats {
    height: 18px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    width: 100px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .skeleton-item {
        gap: 10px;
        padding: 12px;
    }

    .skeleton-rank {
        font-size: 16px;
        min-width: 25px;
    }

    .skeleton-title {
        height: 18px;
    }

    .skeleton-artist {
        height: 14px;
    }

    .skeleton-stats {
        height: 16px;
        width: 80px;
    }
}