/* 
 * ADG 2.0 Premium Design System - Bilingual Update
 */

:root {
    --primary: #fb923c;
    --primary-raw: 251, 146, 60;
    --bg: #02040a;
    --card-bg: rgba(13, 17, 23, 0.7);
    --border: rgba(255, 255, 255, 0.08);
    --text-pure: #ffffff;
    --text-muted: #8b949e;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-zh: "PingFang TC", "Microsoft JhengHei", sans-serif;
    --nav-height: 80px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

body,
html {
    width: 100%;
    min-height: 100%;
    background-color: var(--bg);
    color: var(--text-pure);
    font-family: var(--font-main);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Background Effects */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(251, 146, 60, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251, 146, 60, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.bg-particles {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, #161b22 0%, #02040a 100%);
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Navigation Bar --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(2, 4, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Base for absolute links */
}

.nav-links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 1rem;
    width: max-content;
    /* Ensure width fits content for correct centering */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary);
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.1rem;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.nav-link span {
    font-family: var(--font-zh);
    font-size: 0.65rem;
    letter-spacing: 0.1rem;
    margin-top: 2px;
    opacity: 0.6;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active span {
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.engine-link {
    text-decoration: none;
    background: rgba(var(--primary-raw), 0.1);
    border: 1px solid rgba(var(--primary-raw), 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.engine-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-raw), 0.3);
}

.pulse-icon {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: beacon 1.5s infinite;
}

@keyframes beacon {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* --- View Container --- */
.view-container {
    padding-top: var(--nav-height);
    flex: 1;
    position: relative;
}

.page-view {
    display: none;
    width: 100%;
    min-height: calc(100vh - var(--nav-height));
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Card Section --- */
.hero-section {
    width: 100%;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.tilt-card {
    position: relative;
    width: 90%;
    max-width: 560px;
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 3.5rem 3rem;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
    transition: transform 0.15s ease-out;
    overflow: hidden;
    transform-style: preserve-3d;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--primary-raw), 0.12), transparent 45%);
    pointer-events: none;
}

.logo-container {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateZ(60px);
}

.floating-logo {
    max-width: 180px;
    height: auto;
    animation: float 5s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.8));
}

.floating-logo.circular {
    border-radius: 50%;
    border: 2px solid rgba(251, 146, 60, 0.3);
    box-shadow: 0 0 30px rgba(var(--primary-raw), 0.2);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

.text-section {
    text-align: center;
    margin-bottom: 3rem;
    transform: translateZ(40px);
}

.glitch-text {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.15rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #ffffff 30%, #a1a1a1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chinese-sub {
    font-family: var(--font-zh);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
        filter: brightness(1.5);
    }
}

.status-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.15rem;
}

.description-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.description.en {
    color: var(--text-pure);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.description.zh {
    color: var(--text-muted);
    font-family: var(--font-zh);
    font-size: 0.85rem;
    line-height: 1.6;
}

.scanner-container {
    margin-bottom: 3rem;
    transform: translateZ(30px);
}

.scanner-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.scanner-light {
    position: absolute;
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scan {
    0% {
        left: -40%;
    }

    100% {
        left: 110%;
    }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    color: #4b5563;
    letter-spacing: 0.05rem;
}

.cta-section {
    text-align: center;
    transform: translateZ(50px);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.email-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.email-btn:hover {
    background: rgba(var(--primary-raw), 0.12);
    border-color: var(--primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px -5px rgba(var(--primary-raw), 0.2);
}

/* Features Preview Section */
.features-preview {
    width: 95%;
    max-width: 1100px;
    margin: 4rem auto 8rem;
    text-align: center;
}

.section-title {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    margin-bottom: 3rem;
    opacity: 0.7;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.video-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.video-wrapper:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.video-wrapper:hover video {
    opacity: 0.8;
}

.play-hint {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.video-wrapper:hover .play-hint {
    opacity: 1;
    transform: scale(1.1);
}

.video-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    background: rgba(var(--primary-raw), 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    pointer-events: none;
}

/* --- Empty View Styles --- */
.empty-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10rem 2rem;
    text-align: center;
}

.construction-badge {
    margin-top: 2rem;
    background: rgba(var(--primary-raw), 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.2rem;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* --- Video Modal System --- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.video-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 32px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 1);
    animation: modalAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(40px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

.modal-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0d1117;
    z-index: 5;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.modal-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- Apps Page Layout (New 2-Level Logic) --- */
.apps-container {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

.apps-sub-view {
    display: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.apps-sub-view.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.category-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.category-main-card {
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.category-main-card:hover {
    background: rgba(var(--primary-raw), 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cat-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.cat-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-content h3 span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cat-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 400px;
}

.cat-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.category-main-card:hover .cat-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Sub-view Header (Level 2) */
.sub-view-header {
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.category-info h3 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-info h3 span {
    font-size: 1rem;
    color: var(--primary);
    opacity: 0.5;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.app-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.app-card:hover {
    transform: translateX(10px);
    background: rgba(var(--primary-raw), 0.05);
    border-color: var(--primary);
}

.card-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.module-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.module-info {
    flex: 1;
}

.module-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 6px;
    color: #fff;
}

.module-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.module-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-tags span {
    font-size: 0.6rem;
    color: var(--primary);
    opacity: 0.7;
    font-weight: 600;
}

.module-status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.6rem;
    font-weight: 900;
    background: #4b5563;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.module-status.active {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(var(--primary-raw), 0.5);
}

.app-card.test-module {
    opacity: 0.7;
    border-style: dashed;
}

.app-card.test-module:hover {
    opacity: 1;
    border-style: solid;
}

/* --- Brands Library Layout --- */
.brands-container {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.brand-category-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
}

.cat-num {
    font-size: 1.2rem;
    font-weight: 900;
    color: rgba(var(--primary-raw), 0.3);
    font-family: 'Space Mono', monospace;
}

.category-title h3 {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title h3 span {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

/* --- Password Modal Styles --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-overlay.active {
    display: flex;
}

.password-box {
    max-width: 400px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.password-header {
    margin-bottom: 2.5rem;
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--primary));
}

.password-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 1px;
}

.password-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.password-input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 4px;
    transition: all 0.3s ease;
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(var(--primary-raw), 0.05);
}

.error-msg {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.password-box.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.modal-close-simple {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-simple:hover {
    color: #fff;
}


.brand-card {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.brand-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.brand-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-raw), 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.brand-card:hover::after {
    opacity: 1;
}

.brand-logo-box {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo-box {
    border-color: var(--primary);
    transform: scale(1.1);
    background: rgba(var(--primary-raw), 0.1);
}

.brand-vignette {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    text-shadow: 0 0 15px rgba(var(--primary-raw), 0.5);
}

.brand-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.brand-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.brand-link-hint {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary);
    opacity: 0.6;
    margin-top: auto;
    transition: opacity 0.3s;
}

.brand-card:hover .brand-link-hint {
    opacity: 1;
}

/* Responsive adjustments for Brands */
@media (max-width: 1200px) {
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .brand-grid {
        grid-template-columns: 1fr;
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(251, 146, 60, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.modal-loader span {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 0.2rem;
    animation: blink 1.5s infinite;
}

.modal-player video {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

.modal-info {
    padding: 2.5rem;
    background: linear-gradient(to bottom, #0d1117, #02040a);
    border-top: 1px solid var(--border);
}

.modal-info h4 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1rem;
}

.modal-info p {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 0.05rem;
}

.video-label {
    font-size: 0.9rem;
    color: var(--text-pure);
    line-height: 1.4;
    font-weight: 500;
}

.video-label small {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}

/* --- Footer --- */
.footer {
    position: relative;
    padding: 4rem 0;
    width: 100%;
    text-align: center;
}

.footer-line {
    width: 50px;
    height: 2px;
    background: var(--primary);
    margin: 0 auto 1.2rem;
    opacity: 0.4;
}

.footer p {
    font-size: 0.7rem;
    letter-spacing: 0.25rem;
    color: #3f4e64;
    text-transform: uppercase;
}

/* --- Responsive Optimization --- */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }
}

/* --- Mobile Navigation --- */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 2000;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hamburger active state (X shape) */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateY(0);
}

.mobile-link {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-link span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

/* --- Media Queries --- */
@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 950px) {
    .desktop-only {
        display: none !important;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-container {
        justify-content: space-between;
        padding: 0 1rem;
    }

    /* Reset absolute centering for mobile header */
    .nav-links {
        position: static;
        transform: none;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 1.8rem;
    }

    .tilt-card {
        padding: 3rem 1.5rem;
    }

    .chinese-sub {
        font-size: 0.9rem;
        letter-spacing: 0.3rem;
    }

    .nav-brand {
        font-size: 1rem;
    }
}

/* Fix for Apps Category Cards on Mobile */
@media (max-width: 480px) {
    .category-selection-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-main-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
    }

    .cat-content h3 {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cat-content p {
        margin: 0 auto;
        font-size: 0.9rem;
        opacity: 0.9;
    }

    /* Stack card content vertically */
    #other .module-info {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    /* Adjust image height for mobile */
    #other .module-image-wrapper {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    /* Full width for actions */
    .module-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cat-arrow {
        display: none;
    }
}

/* --- Other Section & Specialist Cards --- */
#other .module-grid {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    display: grid;
    gap: 3rem;
    padding: 2rem 0;
}

#other .app-card {
    width: 100%;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background: rgba(13, 17, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: none;
}

#other .app-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

#other .card-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
}

#other .module-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

#other .module-info {
    padding: 1.5rem 2.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex: 1;
}

.module-text {
    flex: 1;
}

.module-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.launch-btn,
.share-btn {
    padding: 0.7rem 1.6rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.launch-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(var(--primary-raw), 0.2);
}

.launch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.launch-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-raw), 0.4);
    filter: brightness(1.1);
}

/* --- Skeleton & Animations --- */
@keyframes skeletonGlow {
    0% {
        background-color: rgba(255, 255, 255, 0.05);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.15);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.skeleton-glow {
    animation: skeletonGlow 1.5s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.share-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 1rem;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.social-btn.fb:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-btn.wechat:hover {
    background: #07c160;
    border-color: #07c160;
}

.social-btn.line:hover {
    background: #00b900;
    border-color: #00b900;
}

.social-btn.copy:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.social-btn svg {
    display: block;
    transition: transform 0.3s ease;
}

.social-btn:hover svg {
    transform: scale(1.1);
}

#other .module-info h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

#other .module-info h4 span {
    font-size: 0.8rem;
    opacity: 0.5;
    font-weight: 500;
}

#other .desc-zh {
    font-size: 0.9rem;
    color: var(--text-pure);
    margin-bottom: 6px;
    line-height: 1.4;
}

#other .desc-en {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.8;
}

.module-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#other .app-card:hover .module-preview-img {
    transform: scale(1.05);
}

/* --- UX Enhancements --- */
.nav-link.active {
    color: var(--primary);
    font-weight: 800;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-link.active {
    color: var(--primary);
    background: rgba(var(--primary-raw), 0.1);
    border-right: 4px solid var(--primary);
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--primary-raw), 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(var(--primary-raw), 0.5);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    color: var(--text-muted);
}

.placeholder-content h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: 1rem;
}

/* --- Mobile Responsiveness Fixes for Other Section & Apps --- */
@media (max-width: 768px) {

    /* Force single column for app grids */
    .category-selection-grid,
    #other .module-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding: 1rem;
    }

    /* Ensure 'Other' section is visible */
    #other {
        display: block !important;
    }

    /* Stack card content vertically */
    #other .module-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    /* Adjust image height for mobile */
    #other .module-image-wrapper {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    /* Full width for actions */
    .module-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .launch-btn {
        flex: 1;
    }
}

/* --- ADG Expanded Footer --- */
.adg-footer {
    background: rgba(10, 10, 10, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 5% 30px;
    margin-top: 80px;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto 40px;
}

.footer-left {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    width: 60px;
    margin-bottom: 20px;
}

.footer-desc {
    color: #fff;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-contact-info {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    opacity: 0.5;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Footer Navigation Columns */
.footer-nav {
    display: flex;
    gap: 40px;
    flex: 1.2;
    min-width: 300px;
}
.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.footer-nav-col h5 {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.footer-nav-col a {
    display: block;
    color: rgba(255,255,255,0.4);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 2;
}
.footer-nav-col a:hover {
    color: var(--primary, #ff9800);
}

@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        gap: 24px;
    }
}

.footer-right {
    flex: 1.5;
    min-width: 300px;
    max-width: 500px;
}

.footer-right h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-form input,
.footer-form textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
}

.footer-form input:focus,
.footer-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.footer-form button {
    align-self: flex-start;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

.footer-bottom .footer-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin-bottom: 20px;
}

/* --- Light Theme Variables & Overrides --- */
:root.light-theme {
    --bg: #ffffff;
    --card-bg: rgba(240, 240, 240, 0.9);
    --border: rgba(0, 0, 0, 0.1);
    --text-pure: #111111;
    --text-muted: #555555;
}

:root.light-theme .site-nav {
    background: rgba(255, 255, 255, 0.9);
}

:root.light-theme .bg-particles {
    background: radial-gradient(circle at 50% 50%, #e0e0e0 0%, #ffffff 100%);
}

:root.light-theme .adg-footer {
    background: rgba(250, 250, 250, 0.9);
    color: var(--text-pure);
}

:root.light-theme .footer-desc,
:root.light-theme .footer-right h4,
:root.light-theme .footer-social a,
:root.light-theme .nav-link,
:root.light-theme .nav-brand {
    color: var(--text-pure);
}

:root.light-theme .nav-link:hover,
:root.light-theme .nav-link.active {
    color: var(--primary);
}

:root.light-theme .footer-form input,
:root.light-theme .footer-form textarea {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
}

:root.light-theme .news-card,
:root.light-theme .app-card-premium {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

:root.light-theme .card-title,
:root.light-theme .glitch-text {
    color: #111;
}

:root.light-theme .chinese-sub,
:root.light-theme .app-desc {
    color: #555;
}

:root.light-theme .chip {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

:root.light-theme .chip:hover {
    background: rgba(0, 0, 0, 0.1);
}

:root.light-theme .chip.active {
    background: var(--primary);
    color: #000;
}

:root.light-theme #news-search {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111;
}

:root.light-theme .scroll-top-btn {
    color: #222;
}