/* ENTERPRISE DESIGN SYSTEM */
:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    
    /* Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(20, 20, 20, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.05);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-accent: var(--primary);
    
    /* Border & Shadow */
    --border: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(0, 255, 136, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 10px 30px rgba(0, 255, 136, 0.3);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

*::-webkit-scrollbar {
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img[data-src].loaded {
    filter: blur(0);
}

.loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    overflow: hidden;
    position: relative;
}

.loading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skeleton {
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    color: #ef4444;
    text-align: center;
    margin: var(--space-xl) 0;
}

.error-message h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.2rem;
}

.error-message p {
    margin-bottom: var(--space-md);
}

.retry-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

/* ENTERPRISE HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-normal);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    border-bottom-color: var(--border-accent);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
    max-width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-image {
    height: 42px;
    width: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.logo-text {
    color: var(--text-primary);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-shrink: 0;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.search-input {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-sm) var(--space-xl) var(--space-sm) var(--space-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 320px;
    max-width: 100%;
    transition: var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.search-btn {
    position: absolute;
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--primary);
}

/* MAIN CONTENT AREA */
main {
    padding-top: 70px;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* BREADCRUMB */
.breadcrumb {
    background: var(--bg-glass);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    overflow-x: hidden;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--primary);
}

/* HERO SECTION - GAMING & TECH INSPIRED */
.hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a0a 100%);
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100vw;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: heroGlow 6s ease-in-out infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(0, 255, 136, 0.03) 49%, rgba(0, 255, 136, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(139, 92, 246, 0.03) 49%, rgba(139, 92, 246, 0.03) 51%, transparent 52%);
    background-size: 20px 20px;
    animation: heroPattern 20s linear infinite;
}

@keyframes heroGlow {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes heroPattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 8s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 7s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 5s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 8s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 6.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4.5s; animation-duration: 7.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; animation-duration: 5.5s; }

@keyframes float {
    0%, 100% { 
        transform: translateY(100vh) scale(0); 
        opacity: 0; 
    }
    10% { 
        opacity: 0.6; 
        transform: translateY(90vh) scale(1); 
    }
    90% { 
        opacity: 0.6; 
        transform: translateY(-10vh) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-20vh) scale(0); 
    }
}

.hero-code-bg {
    position: absolute;
    top: 10%;
    left: 5%;
    right: 5%;
    bottom: 10%;
    opacity: 0.03;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--primary);
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
    animation: codeScroll 30s linear infinite;
}

@keyframes codeScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid var(--border-accent);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.2);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(0, 255, 136, 0.2); 
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 8px 40px rgba(0, 255, 136, 0.4); 
        transform: scale(1.02);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
    animation: titleGlow 4s ease-in-out infinite alternate;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@keyframes titleGlow {
    0% { 
        filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
    }
    100% { 
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6));
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.hero-stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.hero-stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* DISCLAIMER SECTION */
.disclaimer {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: center;
}

.disclaimer-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.disclaimer h3 {
    color: #ffa500;
    margin-bottom: var(--space-sm);
    font-size: 1.2rem;
}

.disclaimer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ SECTION */
.faq-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
}

.faq-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.faq-question::before {
    content: "❓";
    font-size: 1rem;
}

.faq-answer {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-left: 1.5rem;
}

/* VIDEO SECTION */
.video-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
    text-align: center;
}

.video-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.video-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.video-container:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.3);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.1), transparent, rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 1;
}

.video-container:hover::before {
    opacity: 1;
}

.video-iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.video-container:hover .video-iframe {
    filter: brightness(1.1) saturate(1.2);
}

/* GAMES SECTIONS */
.games-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
}

.games-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
}

.game-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    display: block;
}

.game-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.game-scripts-count {
    background: var(--primary);
    color: #000;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
}

/* MAIN APP INTERFACE */
.app-interface {
    padding: var(--space-xl) 0;
    background: var(--bg-primary);
    width: 100%;
    overflow-x: hidden;
}

.app-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-xl);
    align-items: start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ADVANCED FILTER SIDEBAR */
.filter-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: sticky;
    top: 0px;
    backdrop-filter: blur(20px);
    height: fit-content;
    overflow-x: hidden;
    max-width: 100%;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.filter-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.filter-count {
    background: var(--primary);
    color: #000;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.search-filter {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-filter input {
    width: 100%;
    max-width: 100%;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.search-filter input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-section {
    margin-bottom: var(--space-xl);
}

.filter-section-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.filter-section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    max-width: 100%;
    overflow-x: hidden;
}

.filter-tag {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.filter-tag.premium {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
}

.filter-tag.premium.active {
    background: #ffd700;
    color: #000;
}

/* MAIN CONTENT AREA */
.content-area {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.content-header {
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.content-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.sort-select {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--primary);
    color: #000;
}

/* SCRIPTS GRID - ENTERPRISE LEVEL */
.scripts-container {
    padding: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* IMPROVED LIST VIEW STYLES */
.scripts-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.script-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.script-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* LIST VIEW IMPROVEMENTS */
.scripts-grid.list-view .script-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    transform: none;
    min-height: 200px;
    max-height: 200px;
    overflow: hidden;
}

.scripts-grid.list-view .script-card:hover {
    transform: translateX(4px);
}

.scripts-grid.list-view .script-image {
    width: 200px;
    min-width: 200px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 0;
    margin-right: 0;
    position: relative;
    overflow: hidden;
}

.scripts-grid.list-view .script-content {
    display: flex;
    flex: 1;
    padding: var(--space-lg);
    gap: 0;
    min-width: 0;
    overflow: hidden;
    justify-content: space-between;
    align-items: stretch;
}

.scripts-grid.list-view .script-info-section {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: var(--space-lg);
}

.scripts-grid.list-view .script-header {
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.scripts-grid.list-view .script-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.scripts-grid.list-view .script-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.scripts-grid.list-view .script-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    line-height: 1.2;
}

.scripts-grid.list-view .script-game {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scripts-grid.list-view .script-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.2em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scripts-grid.list-view .script-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.scripts-grid.list-view .script-downloads {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.scripts-grid.list-view .script-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    max-width: 100%;
    overflow: visible;
}

.scripts-grid.list-view .script-tag {
    font-size: 0.75rem;
    padding: 6px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-md);
}

.scripts-grid.list-view .script-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex-shrink: 0;
    min-width: 220px;
    max-width: 220px;
    justify-content: center;
    align-items: stretch;
    padding-left: 0;
}

.scripts-grid.list-view .script-buttons {
    display: flex;
    gap: var(--space-sm);
}

.scripts-grid.list-view .script-updated {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
}

.scripts-grid.list-view .btn-primary {
    flex: 2;
    white-space: nowrap;
    font-size: 0.9rem;
    padding: var(--space-md) var(--space-lg);
    min-height: 48px;
    font-weight: 600;
}

.scripts-grid.list-view .btn-secondary {
    flex: 1;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: var(--space-md);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scripts-grid.list-view .script-card.featured::before {
    top: var(--space-md);
    right: var(--space-md);
    border-radius: var(--radius-sm);
}

.scripts-grid.list-view .script-status {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    z-index: 2;
}

.script-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, var(--bg-card) 100%);
}

.script-card.featured::before {
    content: '⭐ FEATURED';
    position: absolute;
    top: 0;
    right: var(--space-lg);
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.script-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.script-status {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 4px 10px;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.script-status.working {
    background: var(--primary);
    color: #000;
}

.script-status.updated {
    background: #22c55e;
    color: #000;
}

.script-status.new {
    background: #ef4444;
    color: white;
}

.script-content {
    padding: var(--space-lg);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.script-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.script-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.script-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.script-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.script-game {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.script-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.script-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: 0.8rem;
    overflow: hidden;
}

.script-downloads {
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.script-updated {
    color: var(--text-muted);
    white-space: nowrap;
}

.script-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-lg);
    overflow: hidden;
    max-width: 100%;
}

.script-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.script-tag.premium {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.script-tag.verified {
    background: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.script-actions {
    display: flex;
    gap: var(--space-sm);
    width: 100%;
    max-width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 1;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
    background: linear-gradient(135deg, #00ff88 0%, #00e075 100%);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-primary.copying {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    animation: pulse 1s infinite;
}

.btn-primary.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    animation: successBounce 0.5s ease-out;
}

.btn-primary.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: shake 0.5s ease-out;
}

@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    flex-shrink: 0;
    min-height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.btn-secondary svg {
    opacity: 0.8;
}

.btn-secondary:hover svg {
    opacity: 1;
}

/* NO RESULTS */
.no-results {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* MOBILE RESPONSIVE */
.mobile-nav {
    display: none;
}

.mobile-header {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: var(--space-md);
    z-index: 1000;
    backdrop-filter: blur(20px);
    padding-bottom: max(var(--space-md), calc(env(safe-area-inset-bottom) + 8px));
    transform: translateY(0);
    transition: transform 0.3s ease-out;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.mobile-filters-btn {
    width: 100%;
    max-width: 100%;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    min-height: 48px;
    position: relative;
    box-sizing: border-box;
}

.filter-count-mobile {
    position: absolute;
    right: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.mobile-header-close {
    position: absolute;
    top: 50%;
    right: var(--space-md);
    transform: translateY(-50%);
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.mobile-header-close:hover,
.mobile-header-close:active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* MOBILE FILTER OVERLAY */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9997;
    backdrop-filter: blur(5px);
    width: 100vw;
    height: 100vh;
}

.mobile-filter-overlay.active {
    display: block;
}

/* MOBILE OPTIMIZED FILTER SIDEBAR */
.filter-sidebar.mobile-active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    border-radius: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: var(--bg-primary);
    border: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    width: 100vw;
    max-width: 100vw;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-sidebar.mobile-active::-webkit-scrollbar {
    display: none;
}

.mobile-filter-header {
    display: none !important;
}

.mobile-filter-title {
    display: none;
}

.mobile-close-btn {
    display: none;
}

.mobile-filter-exit {
    display: none;
}

/* MOBILE FILTER CONTENT */
.filter-sidebar.mobile-active .filter-header {
    margin-top: calc(var(--space-2xl) + var(--space-xl));
    margin-bottom: var(--space-lg);
    padding: var(--space-lg) var(--space-md) var(--space-md) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
}

.filter-sidebar.mobile-active .filter-header .filter-title {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.filter-sidebar.mobile-active .mobile-filter-exit {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 50%;
    padding: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
    z-index: 1000;
}

.filter-sidebar.mobile-active .mobile-filter-exit:hover,
.filter-sidebar.mobile-active .mobile-filter-exit:active {
    background: var(--primary-dark);
    transform: scale(0.95);
}

.filter-sidebar.mobile-active .filter-section {
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-md);
}

.filter-sidebar.mobile-active .search-filter {
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-md);
    margin-top: var(--space-md);
}

.filter-sidebar.mobile-active .filter-section:first-of-type {
    margin-top: var(--space-md);
}

.filter-sidebar.mobile-active .filter-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    padding: var(--space-md) 0 var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
}

.filter-sidebar.mobile-active .filter-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.filter-sidebar.mobile-active .filter-tag {
    min-height: 48px;
    padding: var(--space-sm);
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.filter-sidebar.mobile-active .filter-tag.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #000;
    font-weight: 600;
    transform: scale(1.02);
}

.mobile-filter-actions {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: var(--space-md);
    border-top: 2px solid var(--border);
    gap: var(--space-sm);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
}

.mobile-filter-actions.active {
    display: flex;
}

.mobile-apply-btn {
    flex: 2;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    min-height: 52px;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}

.mobile-apply-btn:hover,
.mobile-apply-btn:active {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.4);
}

.mobile-clear-btn {
    flex: 1;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 52px;
    transition: var(--transition-fast);
}

.mobile-clear-btn:hover,
.mobile-clear-btn:active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.filter-sidebar.mobile-active::after {
    content: '';
    display: block;
    height: 100px;
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-sm);
    background: none;
    border: none;
    gap: 4px;
    flex-shrink: 0;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MOBILE NAVIGATION OVERLAY */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 9999;
    /* backdrop-filter: blur(20px); - Temporarily disabled for iOS debugging */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    padding: var(--space-lg) var(--space-md);
    border-radius: 0;
    transition: var(--transition-fast);
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

/* FULL MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        height: 60px;
        padding: 0 var(--space-sm);
        gap: var(--space-sm);
        justify-content: space-between;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: hidden;
    }

    .logo-container {
        gap: var(--space-xs);
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-image {
        height: 32px;
        width: 32px;
    }

    .nav-center {
        display: none;
    }

    .header-actions {
        gap: var(--space-sm);
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .search-container {
        flex-shrink: 1;
        min-width: 0;
        max-width: 140px;
    }

    .search-btn {
        right: 8px;
        min-width: 20px;
        min-height: 20px;
        padding: 2px;
    }

    .search-input {
        width: 100%;
        max-width: 140px;
        font-size: 0.8rem;
        padding: 6px 36px 6px 8px;
        min-width: 0;
    }

    .hamburger {
        display: flex;
        flex-shrink: 0;
    }

    main {
        padding-top: 60px;
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 var(--space-sm);
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .app-layout {
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .filter-sidebar {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .scripts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }

    .scripts-grid.list-view .script-card {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .scripts-grid.list-view .script-image {
        width: 100%;
        height: 140px;
        min-width: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .scripts-grid.list-view .script-content {
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        overflow: visible;
    }

    .scripts-grid.list-view .script-info-section {
        margin-bottom: var(--space-md);
        overflow: visible;
    }

    .scripts-grid.list-view .script-header {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-sm);
        overflow: visible;
    }

    .scripts-grid.list-view .script-title {
        font-size: 1.1rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .scripts-grid.list-view .script-game {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .scripts-grid.list-view .script-description {
        -webkit-line-clamp: 3;
        max-height: 4.2em;
    }

    .scripts-grid.list-view .script-actions {
        flex-direction: column;
        min-width: auto;
        max-width: none;
        padding-left: 0;
        gap: var(--space-sm);
    }

    .scripts-grid.list-view .script-buttons {
        width: 100%;
    }

    .scripts-grid.list-view .btn-primary,
    .scripts-grid.list-view .btn-secondary {
        min-height: 48px;
        font-size: 0.9rem;
    }

    .scripts-container {
        padding: var(--space-md);
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .hero {
        padding: var(--space-lg) 0;
        min-height: 280px;
        overflow-x: hidden;
    }

    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.2rem);
        margin-bottom: var(--space-sm);
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--space-md);
        padding: 0 var(--space-sm);
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        margin: 0 var(--space-sm);
        overflow: hidden;
    }

    .hero-stat {
        padding: var(--space-sm);
    }

    .hero-stat-number {
        font-size: 1.2rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }

    .content-header {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: stretch;
        padding: var(--space-md);
        overflow-x: hidden;
    }

    .content-title {
        font-size: 1rem;
        text-align: center;
    }

    .sort-controls {
        justify-content: center;
        gap: var(--space-sm);
    }

    .sort-select {
        font-size: 0.8rem;
        padding: var(--space-sm);
        min-height: 48px;
    }

    .script-card {
        margin-bottom: var(--space-sm);
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .script-content {
        padding: var(--space-md);
        overflow: hidden;
    }

    .script-title {
        font-size: 1rem;
        line-height: 1.2;
    }

    .script-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .script-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 0.9rem;
    }

    .filter-tag {
        min-height: 48px;
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-bottom: var(--space-xs);
        flex: 1 1 auto;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .filter-tags {
        gap: var(--space-xs);
        margin-bottom: var(--space-sm);
        overflow: hidden;
    }

    .search-filter input {
        min-height: 48px;
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
    }

    .sort-select {
        min-height: 48px;
        padding: var(--space-sm);
        font-size: 0.85rem;
    }

    .view-btn {
        min-width: 48px;
        min-height: 48px;
        padding: var(--space-sm);
    }

    .faq-section,
    .video-section,
    .games-section {
        padding: var(--space-lg);
        margin: var(--space-lg) 0;
    }

    .faq-title,
    .video-title,
    .games-title {
        font-size: 1.5rem;
        margin-bottom: var(--space-lg);
    }

    .video-iframe {
        height: 250px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .game-card {
        padding: var(--space-lg);
    }

    .disclaimer {
        padding: var(--space-lg);
        margin: var(--space-lg) 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
        height: 56px;
    }

    .search-btn {
        right: 6px;
        min-width: 18px;
        min-height: 18px;
        padding: 1px;
    }

    .search-input {
        max-width: 120px;
        font-size: 0.75rem;
        padding: 4px 40px 4px 6px;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .logo-image {
        height: 28px;
        width: 28px;
    }

    .container {
        padding: 0 8px;
    }

    .hero-content {
        padding: 0 8px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 6vw, 1.8rem);
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
        margin: 0 8px;
    }

    .hero-stat {
        padding: var(--space-xs);
    }

    .script-title {
        font-size: 0.95rem;
    }

    .script-description {
        font-size: 0.8rem;
    }

    .filter-sidebar.mobile-active {
        padding: var(--space-sm);
        overflow-x: hidden;
    }

    .mobile-filter-actions {
        flex-direction: column;
        gap: var(--space-sm);
        overflow: hidden;
    }

    .mobile-clear-btn {
        padding: var(--space-md);
    }

    .filter-tag {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
        min-height: 48px;
    }

    .mobile-filters-btn {
        font-size: 0.9rem;
        padding: 12px;
        min-height: 48px;
        position: relative;
    }

    .filter-count-mobile {
        right: 8px;
    }

    .mobile-header-close {
        right: 8px;
        min-width: 36px;
        min-height: 36px;
    }

    main {
        padding-top: 56px;
        padding-bottom: max(85px, calc(70px + env(safe-area-inset-bottom)));
    }

    .filter-sidebar.mobile-active .filter-header {
        margin-top: calc(var(--space-2xl) + var(--space-md));
        padding: var(--space-md);
    }

    .filter-sidebar.mobile-active .filter-header .filter-title {
        font-size: 1.2rem;
    }

    .filter-sidebar.mobile-active .mobile-filter-exit {
        min-width: 40px;
        min-height: 40px;
        top: var(--space-sm);
        right: var(--space-sm);
    }

    .filter-sidebar.mobile-active .filter-section-title {
        top: 0;
        font-size: 1rem;
        padding: var(--space-sm) 0;
    }

    .filter-sidebar.mobile-active .filter-tags {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        overflow: hidden;
    }

    .mobile-filter-actions {
        padding: 12px;
        padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    }

    .mobile-apply-btn,
    .mobile-clear-btn {
        min-height: 48px;
        font-size: 0.9rem;
    }

    .mobile-nav-overlay {
        top: 56px;
    }

    .mobile-nav-link {
        font-size: 0.95rem;
        padding: var(--space-md) var(--space-xs);
        min-height: 48px;
    }

    .filter-sidebar.mobile-active .filter-header {
        margin-top: calc(var(--space-xl) + var(--space-lg));
    }

    .mobile-header {
        padding-bottom: max(var(--space-md), calc(env(safe-area-inset-bottom) + 12px));
    }

    .scripts-grid.list-view .script-image {
        height: 140px;
    }

    .scripts-grid.list-view .script-title {
        font-size: 1rem;
    }

    .scripts-grid.list-view .script-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        max-height: 2.8em;
    }

    .faq-section,
    .video-section,
    .games-section {
        padding: var(--space-md);
        margin: var(--space-md) 0;
    }

    .faq-title,
    .video-title,
    .games-title {
        font-size: 1.25rem;
    }

    .video-iframe {
        height: 200px;
    }

    .disclaimer {
        padding: var(--space-md);
        margin: var(--space-md) 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-particles,
    .hero-code-bg,
    .video-container::before {
        animation: none !important;
    }
    
    .particle {
        display: none;
    }
}

@media (prefers-contrast: high) {
    :root {
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
        --border: rgba(255, 255, 255, 0.3);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

.container,
.header-container,
.app-layout,
.content-area,
.scripts-container,
.scripts-grid,
.hero,
.hero-content,
.breadcrumb,
.app-interface {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

body,
html,
.filter-sidebar,
.filter-sidebar.mobile-active,
.content-area,
.scripts-container,
.scripts-grid {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar,
.filter-sidebar::-webkit-scrollbar,
.filter-sidebar.mobile-active::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.scripts-container::-webkit-scrollbar,
.scripts-grid::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

@media (max-width: 768px) {
    .hero,
    .hero-content,
    .breadcrumb,
    .app-interface,
    .filter-sidebar,
    .content-header,
    .script-card,
    .mobile-header,
    .mobile-filter-overlay,
    .faq-section,
    .video-section,
    .games-section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .script-card {
        max-width: calc(100vw - 32px);
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .filter-sidebar.mobile-active,
    .mobile-filter-overlay.active {
        animation: fadeIn 0.3s ease-out;
    }

    .mobile-filter-header.active {
        animation: slideInDown 0.3s ease-out;
    }

    .mobile-filter-actions.active {
        animation: slideInUp 0.3s ease-out;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }

    @keyframes slideInDown {
        from { transform: translateY(-100%); }
        to { transform: translateY(0); }
    }

    @keyframes slideInUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    @keyframes slideInUpModal {
        from { 
            transform: translateY(30px) scale(0.95); 
            opacity: 0; 
        }
        to { 
            transform: translateY(0) scale(1); 
            opacity: 1; 
        }
    }
}

@supports (-webkit-touch-callout: none) {
    .mobile-header {
        padding-bottom: calc(var(--space-md) + 20px);
    }
    
    .filter-sidebar.mobile-active {
        height: -webkit-fill-available;
    }
}

::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}