
            .content-header {
        width: 100% !important;
        padding: 0.4rem !important;
        margin-top: 0.4rem !important;
        margin-bottom: 0.8rem !important;
        background: var(--bg-card);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        overflow-y: hidden;
    }

        .sidebar-thumbnail-wrapper {
        position: relative;
    width: 100% !important;
    padding-top: 56.25% !important;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: auto;
    padding-bottom: 50px !important;
}
        .sidebar-thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: 340px !important;
    object-fit: cover;
    transition: transform 0.3s ease;
 
}
.sidebar-rank-badge.rank-1 {
    background: linear-gradient(135deg, rgba(255, 254, 236, 0.75), rgba(216, 202, 0, 0.7)) !important;
    font-size: 0.95rem !important;
    padding: 0px 8px 0px !important;
    animation: pulse-gold 2s ease-in-out infinite;
}
.sidebar-rank-badge.rank-2 {
    background: linear-gradient(135deg, rgba(250, 253, 255, 0.76), rgba(121, 121, 121, 0.98)) !important;
    font-size: 0.95rem !important;
    padding: 0px 8px 0px 5px !important;
}
.sidebar-rank-badge.rank-3 {
    background: linear-gradient(135deg, rgba(249, 231, 205, 0.78), rgba(184, 96, 29, 0.86)) !important;
    font-size: 0.95rem !important;
    padding: 0px 8px 0px 5px !important;
}
        .sidebar-rank-badge {
            position: absolute;
            top: 4px;
            left: 4px;
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
            color: white;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 700;
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }
        
        .sidebar-video-info {
            flex: 1;
            min-width: 0;
        }
        
        .sidebar-video-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 6px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 1.4;
            color: var(--text-primary, #f1f5f9);
            text-align: left;
            padding:4px 6px 0;
        }
        .sidebar-video-meta {
            font-size: 13px;
            color: var(--text-secondary, #94a3b8);
            display: flex;
            gap: 18px;
            align-items: center !important;
        }
        
        .sidebar-trending .sidebar-video-meta {
            display:grid;
            grid-template-columns: 1fr 1fr;
            text-align:center;
            font-size:115%;
        }
        .sidebar-latest .sidebar-video-meta {
            display:grid;
            grid-template-columns: 1fr 1fr 1fr;
            text-align:center;
            font-size:115%;
            margin-top:8px;
        }
        .sidebar-video-info{
            padding:1rem 0.8rem 0.2rem;
        }
        .sidebar-hot-label {
            color: #f97316;
            font-weight: 600;
        }
        a.sidebar-video-item{
            display:inline-block;
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
            padding:0 0 12px;
            margin:8px auto 20px !important;
        }
        a.sidebar-video-item:hover{
            transform: translateY(-3px) scale(1.05) !important;
            box-shadow: 0 8px 25px rgba(26, 85, 140, 0.6) !important;
            border: 4px solid rgba(26, 85, 140, 0.4) !important;
            border-radius: 12px;
        }
        /* タグセクション */
        .tags-section {
            margin-bottom: 24px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .tags-section.active {
            max-height: 500px;
        }
        
        .tags-container-wrapper {
            border-radius: 12px;
            padding: 20px;
        }
        
        .tags-container-wrapper h3 {
            font-size: 18px;
            margin-bottom: 16px;
            color: var(--primary-color, #60a5fa);
        }
        
        .tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .tag {
            display: inline-block;
            padding: 8px 16px;
            background: rgba(110, 172, 248, 0.454);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 20px;
            font-size: 14px;
            color: var(--text-primary, #f1f5f9);
            text-decoration: none;
            transition: all 0.2s;
        }
        
        .tag:hover {
            background: rgba(96, 165, 250, 0.2);
            border-color: #60a5fa;
            transform: translateY(-2px);
        }
        
        /* カテゴリセクション */
        .category-section {
            background-image: var(--grd-erofun) !important;
            box-shadow: -10px 0px 24px -6px rgba(0, 0, 0, 0.18);
            border-radius: 16px;
            margin: 2rem auto;
            padding: 1.5rem;
            max-width: 1680px;
            overflow: visible;
        }
        .category-videos-grid .video-card {
            width: 100%;
            height: 100%;
            background: var(--bg-card);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            animation: fadeInUp 0.4s ease-out backwards;
        }
        .category-title {
            font-size: 24px;
            margin-bottom: 8px;
            color: var(--primary-color, #60a5fa);
        }
        
        .category-title-sub {
            font-size: 14px;
            color: var(--text-secondary, #94a3b8);
            margin-bottom: 20px;
        }
        .category-videos-grid {
            display: block;
            width: 100%;
            padding: 0;
            margin: 0;
        }

        .category-videos-grid .video-row {
            display: grid !important;
            grid-template-columns: repeat(5, 1fr) !important;
            gap: 1.5rem !important;
            width: 100% !important;
            padding: 0 !important;
            margin: 0 !important;
            box-sizing: border-box !important;
        }

        .category-videos-grid .video-card {
            width: 100%;
            height: 100%;
            background: var(--bg-card);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            animation: fadeInUp 0.4s ease-out backwards;
        }

        .category-videos-grid .video-card:hover {
            transform: translateY(-6px) !important;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }
        .category-videos-grid .video-thumbnail img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            min-width:288px;
            height: auto;
            object-fit: cover;
            transition: transform 0.3s ease;
            content-visibility: auto;
            contain-intrinsic-size: 320px 180px;
        }
        .category-videos-grid .video-card {
            min-height: 250px;
            contain: layout;
        }
       .category-videos-grid .video-card:nth-child(1) {
                animation-delay: 0.05s;
            }
            .category-videos-grid .video-info {
                position: relative;
                padding: 1.2rem 0.25rem 0.8rem !important;
            }
        .category-tabs {
            margin-bottom: 24px;


            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
            flex-shrink: 0;
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-secondary);
        }
        
        .category-tab {
            padding: 12px 20px;
            background: rgba(96, 165, 250, 0.1);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 8px;
            color: var(--text-primary, #f1f5f9);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
            font-weight: 500;
            margin-left:12px !important;
        }
        
        .category-tab:first-of-type {
            margin-left:2px !important;
        }
        .category-tab:hover {
            background: rgba(96, 165, 250, 0.2);
            border-color: #60a5fa;
        }
        
        .category-tab.active {
            background: #60a5fa;
            color: #0f172a;
            border-color: #60a5fa;
        }
        
        .category-videos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 16px;
        }
        
        /* モバイルタブバー */
        .native-tab-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--card-bg, #1e293b);
            border-top: 1px solid var(--border-color, #334155);
            display: none;
            justify-content: space-around;
            padding: 8px 0;
            z-index: 1000;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
        }
        
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 12px;
            text-decoration: none;
            color: var(--text-secondary, #94a3b8);
            transition: all 0.2s;
            position: relative;
        }
        
        .tab-item:hover {
            color: var(--primary-color, #60a5fa);
        }
        
        .tab-icon {
            font-size: 20px;
        }
        
        .tab-label {
            font-size: 11px;
        }
        
        .favorite-count-badge {
            position: absolute;
            top: 4px;
            right: 8px;
            background: #ef4444;
            color: white;
            border-radius: 10px;
            padding: 2px 6px;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            text-align: center;
        }
        
        /* フィルターボタン */
        .content-filters {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }
        
        .filter-button {
            position:relative;
            background: rgba(96, 165, 250, 0.1);
            border: 2px solid var(--border-color);
            border-radius: 25px;
            color: var(--text-primary, #f1f5f9);
            text-decoration: none;
            transition: all 0.2s;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
        }
        
        .filter-button:hover {
            background: rgba(96, 165, 250, 0.2);
            border-color: #60a5fa;
        }
        
        .filter-button.active {
            background: linear-gradient(135deg, rgba(84, 177, 243, 0.2), rgba(103, 84, 233, 0.3));
            border: 3.2px solid var(--border-color);
        }
        
        .accordion-icon {
            transition: transform 0.3s;
        }
        
        .accordion-icon.rotated {
            transform: rotate(180deg);
        }
        
        .favorite-btn-small {
            position: absolute;
            top: 8px;
            left: 8px;
            width: 32px;
            height: 32px;
            background: rgba(26, 26, 26, 0.85);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            z-index: 10;
            font-size: 16px;
            border: none;
        }
        
        .favorite-btn-small:hover {
            transform: scale(1.15);
            background: rgba(26, 26, 26, 0.95);
        }
        
        .favorite-btn-small.active {
            background: linear-gradient(135deg, rgba(251, 56, 173, 0.9) 0%, rgba(239, 2, 160, 0.9) 100%);
        }
        
        .search-options-section {
            margin-bottom: 24px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .search-options-section.active {
            max-height: 300px;
        }
        
        .search-options-container {
            border-radius: 12px;
            padding: 20px;
            border: 1px solid var(--border-color, #334155);
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .search-option {
            display: flex;
            flex-direction: row;
            gap: 8px;
        }
        
        .search-option label {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary, #f1f5f9);
        }
        
        .search-option select {
            padding: 8px 12px;
            border: 1px solid #334155;
            border-radius: 6px;
            color: var(--text-color);
            font-size: 14px;
            cursor: pointer;
        }
        .category-videos-count {
            width:110px;
            float:right;
            padding: 0.5rem 1rem;
            background: rgba(66, 134, 198, 0.1);
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            text-align:center;
            color: var(--primary-color);
            margin-top:-10px;
            margin-bottom:18px;
        }
            .category-videos-grid .video-card {
                background: var(--card-background) !important;
            }
            .sidebar-latest,.sidebar-trending {
                backdrop-filter: blur(20px) !important;
                box-shadow: -10px 0px 18px -6px rgba(0, 0, 0, 0.18) !important;
            }
            .tag-r{
                position:relative;
                left:-4px;
            }

.language-switcher {
    position: relative;
    z-index: 9999;
}

.language-toggle,
.language-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    background: rgba(255, 255, 255, 0) !important;
    border: 2px solid rgba(255, 255, 255, 0) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.language-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.language-button .flag {
    font-size: 1.6rem !important;
}

.language-button i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.language-button.active i {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100000;
}

.language-menu.active,
.language-menu.show {
    position: absolute !important;
    border-radius: 12px !important;
    padding: 0.5rem !important;
    min-width: 180px !important;
    max-width: 250px !important;
    box-shadow: rgba(0, 0, 0, 0.6) 0px 8px 32px, rgba(255, 255, 255, 0.1) 0px 0px 0px 1px !important;
    backdrop-filter: blur(20px) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0px) scale(1) !important;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    contain: none !important;
    isolation: auto !important;
    z-index: 2147483647 !important;
}

.language-item,
.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    width:180px !important;
    height:52px !important;
    line-height:52px !important;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f071;
}

.language-option:last-child {
    border-bottom: none;
}
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.video-card {
  display: block;
  height: auto;
}

.main-content {
  overflow: visible;
}
/* ===== FIX: accordion inside links visible ===== */
.tags-section a,
.search-options-section a{
  display: inline-flex !important;
  align-items: center;
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: #333 !important;
  opacity: 1 !important;
  height: auto !important;
  visibility: visible !important;
}

/* spanが死んでるケース対策 */
.tags-section a span,
.search-options-section a span{
  display: inline !important;
  font-size: inherit !important;
  color: inherit !important;
}
.fa, .fa-brands, .fa-classic, .fa-regular, .fa-sharp, .fa-solid, .fab, .far, .fas {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: var(--fa-display, inline-block);
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}
.accordion-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
}
        @media (max-width: 768px) {
            body{
                width:100%;
                overflow-x: hidden;
            }
            .native-tab-bar {
                display: flex;
            }
            .favorite-btn-small {
                position: absolute;
                top: 3px;
                left: 3px;
                width: 32px;
                height: 32px;
                background: rgba(26, 26, 26, 0.85);
                backdrop-filter: blur(8px);
                border: 1px solid rgba(255, 255, 255, 0.15);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: all 0.3s;
                z-index: 10;
                font-size: 16px;
                border: none;
            }
            .sidebar-thumbnail-wrapper{
        position: relative;
    width: 100% !important;
    height: 100% !important;
    max-height: 220px !important;
    padding-top: 56.25% !important;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: auto;
    padding-bottom: 0px !important;
            }
            .sidebar-thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-width:100% !important;
    max-width:460px !important;
    max-height: 240px !important;
    object-fit: cover;
    transition: transform 0.3s ease;
 
}
            p.video-title{
                padding:1rem 0.2rem 0.8rem;
            }
            .sidebar-section .video-thumbnail{
                position: relative;
                width: 100%;
                padding-top: 56.25%;
                height:200px !important;
                overflow: hidden;
            }
            body {
                padding-bottom: 70px;
            }
            .category-title {
                font-size: 110%;
                margin-bottom: 8px;
                color: var(--primary-color, #60a5fa);
            }
            .category-title-sub {
                font-size: 86%;
                color: var(--text-secondary, #94a3b8);
                margin-bottom: 20px;
            }
            .category-videos-grid .video-row {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 0.8rem !important;
                width: 100% !important;
                padding: 0 !important;
                margin: 0 !important;
                box-sizing: border-box !important;
            }
            .category-videos-grid .video-card {
                min-height: 230px !important;
                contain: layout;
            }
            .category-videos-grid .video-thumbnail {
                position: relative;
                width: 100%;
                padding-top: 56.25%;
                height:140px;
                overflow: hidden;
                background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
            }
            .video-link .sidebar-video-item{
                margin:12px auto 4px;
            }
            .filter-button.sp_none{
                display:none !important;
            }
        }