        /* 🔥 CSS完全版 Part 1/2 - 基本設定・PC版・共通スタイル */

@font-face {
    font-family: 'チェックアンドＵ－Ｆｏフォント';
    src: url('https://ero-video.fun/css/font/CP and U-Fo.woff') format('woff'),
        url('https://ero-video.fun/css/font/CP and U-Fo.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 🎯 基本設定とリセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: rgb(66, 130, 198);
    --secondary-color: rgb(103, 100, 186);
    --accent-color: rgb(119, 152, 205);
    --background-color: #f8f9ff;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --text-light: #6b7280;
    --favorite-color: #e53935;
    --success-color: #4caf50;
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    --shadow-hover: 0 20px 60px rgba(102, 126, 234, 0.25);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --transition: all 0.2s ease-out;
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
    --safe-area-inset-right: env(safe-area-inset-right);
    --mobile-header-height: 60px;
    --mobile-touch-target: 44px;
    --mobile-menu-width: 280px;
    --mobile-animation: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ライトモード */
    --bg-primary: #f8f9ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e1e8ed;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 🌙 ダークモード変数 */
.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   🖥️ PC版レイアウト (デフォルト)
========================================= */

/* 🎯 PC版ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(45deg, #fff, #e8f4fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
    font-family: 'チェックアンドＵ－Ｆｏフォント', sans-serif;
    white-space: nowrap;
}

.logo:hover {
    transform: scale(1.05);
}

.header-center {
    flex: 1;
    max-width: 600px;
}

.search-form {
    width: 100%;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-container:hover,
.search-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    opacity: 0.8;
}

.search-box {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
    font-weight: 500;
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-item a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-item.active a {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-search-toggle,
.mobile-menu-toggle,
.mode-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    padding: 0.75rem !important;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    width: 48px !important;
    height: 48px!important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.mobile-search-toggle:hover,
.mobile-menu-toggle:hover,
.mode-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 🎯 PC版メインレイアウト */
body {
    padding-top: 100px;
}

.tags-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.tags-container-wrapper h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag {
    background: var(--gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.search-options-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.search-options-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
}

.search-option label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-option select {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.search-option select:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.search-option select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 134, 198, 0.1);
}

/* 🎯 PC版メインコンテンツ */
.main-container {
    max-width: 1680px !important;
    min-width:90% !important;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.main-content {
    min-width: 0;
}

.content-header {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
    text-align: center;
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-filters {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-button {
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 150px;
}


.filter-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 🎯 PC版動画グリッド */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

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

.video-card:hover .video-thumbnail img {
    transform: scale(1.08);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}


.video-info {
    padding: 2rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    margin-top: 1.5rem;
}

.video-stats {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.stat-item i {
    font-size: 1rem;
}

/* 🎯 PC版サイドバー */
.sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    height: fit-content;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
    position: sticky;
    top: 120px;
}

.sidebar-section {
    margin-bottom: 3rem;
}

.sidebar-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.sidebar-video {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.sidebar-video:hover {
    background: rgba(66, 134, 198, 0.1);
    transform: translateX(5px);
}

.sidebar-thumbnail {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

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

.sidebar-video:hover .sidebar-thumbnail img {
    transform: scale(1.1);
}

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

.sidebar-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-video-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 🎯 PC版ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 4rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-color);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 134, 198, 0.3);
}

.pagination .current {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(66, 134, 198, 0.3);
}
/* 🔥 CSS完全版 Part 2/2 - モバイル版・修正・アニメーション */

/* 🎯 PC版ランダムセクション */
.random-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 4rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin: 4rem auto;
    max-width: 1400px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 800;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.random-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.random-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.random-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.random_p {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 🎯 PC版フッター */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.footer-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    padding: 0.5rem 0;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
}

.footer-note {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 🎯 PC版空の状態・検索結果 */
.empty-state {
    text-align: center;
    padding: 6rem 3rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.empty-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.empty-description {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.search-results-info {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(66, 134, 198, 0.1);
    border-radius: var(--border-radius);
    border-left: 6px solid var(--primary-color);
}

.search-term {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.search-count {
    font-weight: 800;
    color: #e74c3c;
    font-size: 1.1rem;
}

.expanded-terms {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(243, 156, 18, 0.1);
    border-radius: var(--border-radius);
    border-left: 6px solid #f39c12;
}

.expanded-terms-title {
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.expanded-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.expanded-term {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

        .video-rank {
            position: absolute;
            top: 8px;
            left: 8px;
            padding: 0.3rem 0.6rem;
            border-radius: 6px;
            font-weight: bold;
            font-size: 1.2rem !important;
        }
        .video-rank::first-letter{
            font-size: 1.4rem !important;

        }
        .rank-1 { background:linear-gradient(to right,  rgba(254, 225, 61, 0.9),  rgba(255, 174, 0, 0.9)); color: black;-webkit-text-stroke: 1px white;text-stroke: 1px white;paint-order: stroke;}
        .rank-2 { background:linear-gradient(to right,  rgba(219, 219, 219, 0.9),  rgba(172, 172, 172, 0.9)); color: black; -webkit-text-stroke: 1px white;text-stroke: 1px white;paint-order: stroke;}
        .rank-3 { background:linear-gradient(to right,  #d58b42ee,  #bf7327ee); color: white;-webkit-text-stroke: 1px black;text-stroke: 1px black;paint-order: stroke;}

/* ========================================
   📱 モバイル版レイアウト (768px以下)
========================================= */

@media (max-width: 768px) {
    /* 🔥 モバイル専用スクロール連動CSS */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        height: auto !important;
        background: linear-gradient(135deg, #4286c6, #6764ba) !important;
        color: white !important;
        padding: 1rem !important;
        
        transform: translateY(0) translateZ(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        
        transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1), 
                   opacity 0.4s cubic-bezier(0.2, 0, 0.2, 1),
                   visibility 0s linear 0s !important;
        
        will-change: transform, opacity !important;
        backface-visibility: hidden !important;
        transform-style: preserve-3d !important;
        contain: layout style paint !important;
    }
    
    .header.scroll-hidden {
        transform: translateY(-100%) translateZ(0) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.6, 1), 
                   opacity 0.6s cubic-bezier(0.4, 0, 0.6, 1),
                   visibility 0s linear 0.6s !important;
    }
    
    .native-tab-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        height: 80px !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1) !important;
        padding: 0.5rem 0 !important;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
        
        transform: translateY(0) translateZ(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        
        transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1), 
                   opacity 0.4s cubic-bezier(0.2, 0, 0.2, 1),
                   visibility 0s linear 0s !important;
        
        will-change: transform, opacity !important;
        backface-visibility: hidden !important;
        transform-style: preserve-3d !important;
        contain: layout style paint !important;
    }
    
    .native-tab-bar.scroll-hidden {
        transform: translateY(100%) translateZ(0) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.6, 1), 
                   opacity 0.6s cubic-bezier(0.4, 0, 0.6, 1),
                   visibility 0s linear 0.6s !important;
    }
    
    .tab-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 60px !important;
        padding: 0.5rem 0.25rem !important;
        color: #8e8e93 !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        text-align: center !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: all 0.2s cubic-bezier(0.2, 0, 0.2, 1) !important;
    }
    
    .tab-item.active {
        color: #4286c6 !important;
        background: rgba(66, 134, 198, 0.1) !important;
    }
    
    .tab-icon {
        font-size: 1.4rem !important;
        line-height: 1 !important;
        margin-bottom: 0.25rem !important;
        display: block !important;
    }
    
    .tab-label {
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        display: block !important;
        white-space: nowrap !important;
    }
    
    /* 📱 モバイル基本レイアウト */
    body {
        padding-top: calc(80px + env(safe-area-inset-top)) !important;
        padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
        position: relative !important;
        min-height: 100vh !important;
    }
    
    /* 📱 モバイルヘッダー調整 */
    .header-container {
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .header-center,
    .nav-menu {
        display: none;
    }
    
    .mobile-search-toggle,
    .mobile-menu-toggle,
    .mode-toggle {
        width: 40px;
        height: 40px;
        padding: 0.5rem;
        font-size: 1.1rem;
    }
    
    /* 📱 モバイルタグセクション - 完全修正版 */
    .tags-section {
        background: var(--bg-card);
        border-radius: 12px;
        padding: 0 !important;
        margin: 1rem;
        box-shadow: var(--shadow);
        overflow: visible !important;
        position: relative !important;
        width: calc(100% - 2rem) !important;
    }
    .tags-container-wrapper {
        width: 100%;
        padding: 1rem 0 0.6rem !important;
        margin: 0;
        overflow: visible;
        position: relative !important;
        box-sizing: border-box;
        transition: all 0.3s ease !important;
    }
    
    .tags-container-wrapper h3 {
        color: #4286c6;
        margin: 0 0 1rem 0 !important;
        padding: 0 1rem !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.2rem;
        font-weight: 700;
        position: relative;
        z-index: 1;
    }
    
    /* 🚨 タグコンテナの完全修正 */
    .tags-container {
        all: unset !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 1rem 0.8rem 1rem !important;
        margin: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 0.5rem !important;
        background: transparent !important;
        z-index: 10 !important;
    }
    
    .tags-container::-webkit-scrollbar {
        display: none !important;
    }
    
    /* 🎯 タグサイズ調整版 */
    .tag {
        all: unset !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #4286c6, #6764ba) !important;
        color: white !important;
        border-radius: 20px !important;
        font-weight: 500 !important;
        font-size: 0.85rem !important;
        text-decoration: none !important;
        padding: 0.4rem 0.8rem !important;
        min-height: 36px !important;
        min-width: auto !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        position: relative !important;
        z-index: 15 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transition: all 0.2s ease !important;
        -webkit-tap-highlight-color: rgba(66, 134, 198, 0.3) !important;
        -webkit-touch-callout: none !important;
        user-select: none !important;
    }
    
    .tag:hover,
    .tag:active {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 15px rgba(66, 134, 198, 0.3) !important;
    }
    
    /* 📱 モバイル検索オプション */
    .search-options-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .search-options-container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .search-option {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .search-option label {
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    
    .search-option select {
        padding: 0.75rem !important;
        min-width: 140px !important;
        width:68% !important;
        flex-shrink: 0;
    }
    
    /* 📱 モバイルメインコンテナ */
    .main-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .content-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* 🎯 修正版: タイトルとフィルター配置 */
    .page-title {
        color: #4286c6;
        margin-bottom: 1.5rem;
        font-size: 1.6rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .content-filters {
        display: flex;
        justify-content: flex-end !important;
        margin-top: -3rem !important;
        margin-bottom: 1rem;
        z-index: 10;
        position: relative;
    }
    
    
    /* 📱 モバイル動画グリッド */
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .video-card:hover {
        transform: translateY(-3px);
    }
    
    .video-info {
        padding: 1.5rem;
    }
    
    .video-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .video-stats {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    /* 📱 モバイルサイドバー */
    .sidebar {
        position: static;
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .sidebar-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-video {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .sidebar-thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .sidebar-video-title {
        font-size: 0.9rem;
    }
    
    .sidebar-video-meta {
        font-size: 0.8rem;
    }
    
    /* 📱 モバイルページネーション */
    .pagination {
        gap: 0.5rem;
        margin: 2rem 0;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 44px;
    }
    
    /* 📱 モバイルランダムセクション */
    .random-section {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .random-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .random-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* 📱 モバイルフッター */
    .footer {
        padding: 3rem 1rem 2rem;
        margin-top: 3rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* 📱 モバイル空の状態 */
    .empty-state {
        padding: 3rem 2rem;
    }
    
    .empty-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .empty-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .empty-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* 📱 モバイル検索結果 */
    .search-results-info {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .expanded-terms {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .expanded-terms-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .expanded-terms-list {
        gap: 0.5rem;
    }
    
    .expanded-term {
        padding: 0.25rem 0.75rem;
        font-size: 0.85rem;
    }
    .x_icon{
        width:20px;
        height:18.9px;
    }
}

/* ========================================
   🎯 PC/モバイル表示切り替え
========================================= */

@media (max-width: 768px) {
    .native-tab-bar {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .native-tab-bar {
        display: none !important;
    }
    
    .mobile-search-toggle,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .header {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* ========================================
   🎨 アニメーション・エフェクト
========================================= */

/* スクロールヒント用アニメーション */
@keyframes bounce-left {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-6px); }
}

@keyframes bounce-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

.bounce-left {
    animation: bounce-left 2s infinite;
}

.bounce-right {
    animation: bounce-right 2s infinite;
}


/* ページ読み込みアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card,
.sidebar-video,
.tag {
    animation: fadeInUp 0.6s ease-out;
}

/* ホバーエフェクト */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.random-btn:hover {
    animation: bounce 0.6s ease-in-out;
}

/* ローディングアニメーション */
.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.video-card:hover .video-thumbnail::before {
    transform: translateX(100%);
}

/* ========================================
   🌙 ダークモード強化
========================================= */

.dark-mode .video-thumbnail {
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
}

.dark-mode .sidebar-thumbnail {
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
}

.dark-mode .search-container {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .search-container:hover,
.dark-mode .search-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   🔧 ユーティリティクラス
========================================= */

.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 🔧 PC・モバイル両対応修正版CSS */

/* ========================================
   🖥️ PC版タグ表示修正 (769px以上)
========================================= */

@media (min-width: 769px) {
    /* 🎯 PC版タグセクション（正常な状態に戻す） */
    .tags-section {
        background: var(--bg-card);
        border-radius: var(--border-radius);
        padding: 2rem !important; /* モバイル設定を上書き */
        margin: 2rem auto;
        max-width: 1400px;
        box-shadow: var(--shadow);
        transition: background-color 0.3s ease;
        overflow: visible !important;
        position: static !important; /* relative設定を解除 */
        width: auto !important; /* 幅制限を解除 */
    }
    
    .tags-container-wrapper {
        width: 100%;
        padding: 0 !important; /* モバイル設定をリセット */
        margin: 0;
        overflow: visible;
        position: static !important;
        box-sizing: border-box;
    }
    
    .tags-container-wrapper h3 {
        color: var(--primary-color);
        margin-bottom: 1.5rem !important;
        padding: 0 !important; /* モバイル設定をリセット */
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.5rem;
        font-weight: 700;
        position: static !important;
        z-index: auto !important;
    }
    
    /* 🎯 PC版タグコンテナ（通常のフレックス表示） */
    .tags-container {
        /* モバイル設定を完全リセット */
        all: unset !important;
        
        /* PC版設定を再適用 */
        display: flex !important;
        flex-wrap: wrap !important; /* PC版は折り返し許可 */
        gap: 1rem !important;
        justify-content: center !important;
        
        /* 位置とサイズを正常化 */
        position: static !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        
        /* サイズ設定 */
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        box-sizing: content-box !important;
        
        /* パディング・マージンをPC版に */
        padding: 0 !important;
        margin: 0 !important;
        
        /* スクロール設定を無効化 */
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: auto !important;
        
        /* スクロールバー設定を無効化 */
        scrollbar-width: auto !important;
        -ms-overflow-style: auto !important;
        
        /* 背景とz-index */
        background: transparent !important;
        z-index: auto !important;
    }
    
    /* PC版でのスクロールバー表示を復元 */
    .tags-container::-webkit-scrollbar {
        display: block !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* 🎯 PC版タグスタイル */
    .tag {
        /* モバイル設定をリセット */
        all: unset !important;
        
        /* PC版設定を再適用 */
        background: var(--gradient) !important;
        color: white !important;
        padding: 0.75rem 1.5rem !important; /* PC版サイズ */
        border-radius: 25px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        font-size: 1rem !important; /* PC版フォントサイズ */
        white-space: nowrap !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
        
        /* 表示設定 */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        /* サイズ設定 */
        min-height: auto !important;
        min-width: auto !important;
        
        /* フレックス設定を無効化 */
        flex-shrink: 1 !important;
        flex-grow: 0 !important;
        
        /* 位置設定 */
        position: static !important;
        z-index: auto !important;
        
        /* インタラクション */
        cursor: pointer !important;
        pointer-events: auto !important;
        
        /* タッチ設定を無効化 */
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: auto !important;
        user-select: auto !important;
    }
    
    .tag:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
    }
    
    /* PC版でアクティブ効果を無効化 */
    .tag:active {
        transform: translateY(-3px) !important;
    }
}

/* ========================================
   📱 フィルターボタン表示問題修正
========================================= */

@media (max-width: 768px) {
    /* 🎯 修正: フィルターボタンを全て表示（2×2グリッド） */
    .content-filters {
        display: grid !important; /* flex → grid */
        grid-template-columns: 1fr 1fr 1fr !important; /* 2列 */
        grid-template-rows: auto auto !important; /* 2行 */
        gap: 0.75rem !important;
        margin-top: 1.5rem !important; /* 位置調整 */
        margin-bottom: 1rem;
        justify-content: stretch !important;
        z-index: 10;
        position: relative;
    }
    
    /* 🎯 修正: 全ボタンを表示 */
    .filter-button {
        display: flex !important; /* 強制表示 */
        padding: 0.8rem 1rem !important;
        border-radius: 25px;
        text-decoration: none;
        color: var(--text-secondary);
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        font-weight: 600;
        font-size: 0.85rem !important;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
        min-height: 48px !important; /* タッチしやすい高さ */
        align-items: center !important;
        justify-content: center !important;
        word-break: keep-all; /* 文字の折り返し防止 */
    }
    
    /* 長いテキストのボタン調整 */
    .filter-button:nth-child(2) { /* "24時間内ランキング" */
        display:block !important;
        font-size: 0.9rem !important;
        padding: 1.2rem 0.6rem !important;
        line-height: 0.5 !important;
    }
    .filter-button:nth-child(2)::first-letter{
        font-size:1.3rem;
        position:relative !important;
        top:8px !important;
    }
    .filter-button.active {
        background: linear-gradient(135deg, #4286c6, #6764ba) !important;
        color: white !important;
        border-color: #4286c6 !important;
        box-shadow: 0 4px 15px rgba(66, 134, 198, 0.3) !important;
        transform: translateY(-1px) !important;
    }
    
    .filter-button:hover,
    .filter-button:active {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
}
/* 🔧 PC・モバイル両対応修正版CSS */

/* ========================================
   🖥️ PC版タグ表示修正 (769px以上)
========================================= */

@media (min-width: 769px) {
    /* 🎯 PC版タグセクション（正常な状態に戻す） */
    .scroll-hint{
        top:-15px !important;
    }
    .tags-section {
        background: var(--bg-card);
        border-radius: var(--border-radius);
        padding: 2rem !important; /* モバイル設定を上書き */
        margin: 2rem auto;
        max-width: 1400px;
        box-shadow: var(--shadow);
        transition: background-color 0.3s ease;
        overflow: visible !important;
        position: static !important; /* relative設定を解除 */
        width: auto !important; /* 幅制限を解除 */
    }
    
    .tags-container-wrapper {
        width: 100%;
        padding: 0 !important; /* モバイル設定をリセット */
        margin: 0;
        overflow: visible;
        position: static !important;
        box-sizing: border-box;
    }
    
    .tags-container-wrapper h3 {
        color: var(--primary-color);
        margin-bottom: 1.5rem !important;
        padding: 0 !important; /* モバイル設定をリセット */
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.5rem;
        font-weight: 700;
        position: static !important;
        z-index: auto !important;
    }
    
    /* 🎯 PC版タグコンテナ（通常のフレックス表示） */
    .tags-container {
        /* モバイル設定を完全リセット */
        all: unset !important;
        
        /* PC版設定を再適用 */
        display: flex !important;
        flex-wrap: wrap !important; /* PC版は折り返し許可 */
        gap: 1rem !important;
        justify-content: center !important;
        
        /* 位置とサイズを正常化 */
        position: static !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        
        /* サイズ設定 */
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        box-sizing: content-box !important;
        
        /* パディング・マージンをPC版に */
        padding: 0 !important;
        margin: 0 !important;
        
        /* スクロール設定を無効化 */
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: auto !important;
        
        /* スクロールバー設定を無効化 */
        scrollbar-width: auto !important;
        -ms-overflow-style: auto !important;
        
        /* 背景とz-index */
        background: transparent !important;
        z-index: auto !important;
    }
    
    /* PC版でのスクロールバー表示を復元 */
    .tags-container::-webkit-scrollbar {
        display: block !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* 🎯 PC版タグスタイル */
    .tag {
        /* モバイル設定をリセット */
        all: unset !important;
        
        /* PC版設定を再適用 */
        background: var(--gradient) !important;
        color: white !important;
        padding: 0.75rem 1.5rem !important; /* PC版サイズ */
        border-radius: 25px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        font-size: 1rem !important; /* PC版フォントサイズ */
        white-space: nowrap !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2) !important;
        
        /* 表示設定 */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        /* サイズ設定 */
        min-height: auto !important;
        min-width: auto !important;
        
        /* フレックス設定を無効化 */
        flex-shrink: 1 !important;
        flex-grow: 0 !important;
        
        /* 位置設定 */
        position: static !important;
        z-index: auto !important;
        
        /* インタラクション */
        cursor: pointer !important;
        pointer-events: auto !important;
        
        /* タッチ設定を無効化 */
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: auto !important;
        user-select: auto !important;
    }
    
    .tag:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
    }
    
    /* PC版でアクティブ効果を無効化 */
    .tag:active {
        transform: translateY(-3px) !important;
    }
}

/* ========================================
   📱 フィルターボタン表示問題修正
========================================= */

@media (max-width: 768px) {
    /* 🎯 修正: フィルターボタンを全て表示（2×2グリッド） */
    .content-filters {
        display: grid !important; /* flex → grid */
        grid-template-columns: 1fr 1fr !important; /* 2列 */
        grid-template-rows: auto auto !important; /* 2行 */
        gap: 0.75rem !important;
        margin-top: 1.5rem !important; /* 位置調整 */
        margin-bottom: 1rem;
        justify-content: stretch !important;
        z-index: 10;
        position: relative;
    }
    
    /* 🎯 修正: 全ボタンを表示 */
    .filter-button {
        display: flex !important; /* 強制表示 */
        padding: 0.8rem 1rem !important;
        border-radius: 25px;
        text-decoration: none;
        color: var(--text-secondary);
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        font-weight: 600;
        font-size: 0.85rem !important;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
        min-height: 48px !important; /* タッチしやすい高さ */
        align-items: center !important;
        justify-content: center !important;
        word-break: keep-all; /* 文字の折り返し防止 */
    }
    
    
    .filter-button:hover,
    .filter-button:active {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 🎯 修正: タイトル配置を通常に戻す */
    .page-title {
        color: #4286c6;
        margin-bottom: 1.5rem !important;
        font-size: 1.6rem !important;
        font-weight: 700 !important;
        text-align: center !important; /* 中央揃えに戻す */
        display: block !important; /* flex解除 */
    }
}

/* ========================================
   🖥️ PC版フィルターボタン（変更なし）
========================================= */

@media (min-width: 769px) {
    .content-filters {
        display: flex !important;
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-button {
        display: inline-flex !important; /* PC版は通常表示 */
        padding: 1rem 2rem;
        border-radius: 30px;
        text-decoration: none;
        color: var(--text-secondary);
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        font-weight: 700;
        font-size: 1rem;
        transition: all 0.3s ease;
        text-align: center;
        min-width: 150px;
        align-items: center;
        justify-content: center;
    }
    .filter-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .page-title {
        color: var(--primary-color);
        margin-bottom: 2rem;
        font-size: 2.5rem;
        font-weight: 800;
        background: var(--gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-align: center; /* PC版は中央揃え */
    }
}

/* ========================================
   🔧 デバッグ・クリーンアップ
========================================= */

/* デバッグ用スタイルの完全削除 */
.debug-tags .tags-container {
    border: none !important;
    background: transparent !important;
}

.debug-tags .tag {
    border: none !important;
}

.debug-tags .tag:first-child {
    border: none !important;
    background: var(--gradient) !important;
}

/* 🔧 追加の安全対策 */
@media (min-width: 769px) {
    /* PC版で変形を完全無効化 */
    .tags-section,
    .tags-container-wrapper,
    .tags-container,
    .tag {
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        position: static !important;
    }
    
    /* PC版でフロートを無効化 */
    .tags-container,
    .tags-container * {
        float: none !important;
    }
    
    /* PC版でoverflow設定を正常化 */
    .tags-section,
    .tags-container-wrapper {
        overflow: visible !important;
    }
}
/* ========================================
   🖥️ PC版フィルターボタン（変更なし）
========================================= */

@media (min-width: 769px) {
    .content-filters {
        display: flex !important;
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-button {
        display: inline-flex !important; /* PC版は通常表示 */
        padding: 1rem 2rem;
        border-radius: 30px;
        text-decoration: none;
        color: var(--text-secondary);
        background: var(--bg-secondary);
        border: 2px solid var(--border-color);
        font-weight: 700;
        font-size: 1rem;
        transition: all 0.3s ease;
        text-align: center;
        min-width: 150px;
        align-items: center;
        justify-content: center;
    }
    
    
    .filter-button.active {
        background: linear-gradient(135deg, #4286c6, #6764ba) !important;
        color: white !important;
        border-color: #4286c6 !important;
        box-shadow: 0 4px 15px rgba(66, 134, 198, 0.3) !important;
        transform: translateY(-1px) !important;
    }
    
    .filter-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .page-title {
        color: var(--primary-color);
        margin-bottom: 2rem;
        font-size: 2.5rem;
        font-weight: 800;
        background: var(--gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-align: center; /* PC版は中央揃え */
    }
}

/* ========================================
   🔧 デバッグ・クリーンアップ
========================================= */

/* デバッグ用スタイルの完全削除 */
.debug-tags .tags-container {
    border: none !important;
    background: transparent !important;
}

.debug-tags .tag {
    border: none !important;
}

.debug-tags .tag:first-child {
    border: none !important;
    background: var(--gradient) !important;
}

/* 🔧 追加の安全対策 */
@media (min-width: 769px) {
    /* PC版で変形を完全無効化 */
    .tags-section,
    .tags-container-wrapper,
    .tags-container,
    .tag {
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        position: static !important;
    }
    
    /* PC版でフロートを無効化 */
    .tags-container,
    .tags-container * {
        float: none !important;
    }
    
    /* PC版でoverflow設定を正常化 */
    .tags-section,
    .tags-container-wrapper {
        overflow: visible !important;
    }
}
/* ========================================
   🔧 追加のタッチ・アクセシビリティ対応
========================================= */

@media (max-width: 768px) {

    .mobile-search-toggle,.mode-toggle,.mobile-menu-toggle{
        font-size:1.4rem !important;
    }
    .header-right {
        gap: 0.95rem;
        position:relative;left:3% !important;
    }
    .tag:active{
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* iOS Safari用のタップハイライト削除 */
    .tag,
    .filter-button,
    .mobile-search-suggestion {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* フォーカス状態の改善 */
    .tag:focus,
    .filter-button:focus {
        outline: 3px solid rgba(66, 134, 198, 0.5);
        outline-offset: 2px;
    }
    
    /* 高コントラストモード対応 */
    @media (prefers-contrast: high) {
        .tag {
            border: 2px solid white;
        }
        
        .filter-button {
            border-width: 3px;
        }
    }
    
    /* 動きを抑えたい場合の対応 */
    @media (prefers-reduced-motion: reduce) {
        .tag,
        .filter-button,
        .scroll-hint *,
        .video-card,
        .sidebar-video {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* ========================================
   🎯 印刷用スタイル
========================================= */

@media print {
    .header,
    .native-tab-bar,
    .sidebar,
    .pagination,
    .random-section,
    .footer {
        display: none !important;
    }
    
    body {
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }
    
    .video-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
}
