/* ========================================
   灵魂安装器 - 主样式表
   Soul Installer Main Stylesheet
   ======================================== */

/* === CSS Variables === */
:root {
    /* 主色系 */
    --color-primary: #4F46E5;
    --color-primary-light: #6366F1;
    --color-primary-dark: #3730A3;
    --color-secondary: #7C3AED;
    --color-accent: #06B6D4;
    --color-accent-light: #22D3EE;

    /* 背景色 */
    --bg-dark: #0F172A;
    --bg-card: #1E293B;
    --bg-card-hover: #263548;
    --bg-overlay: rgba(15, 23, 42, 0.95);

    /* 文字色 */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* 状态色 */
    --color-installed: #10B981;
    --color-uninstalled: #64748B;

    /* 发光效果 */
    --glow-primary: 0 0 20px rgba(79, 70, 229, 0.5), 0 0 40px rgba(79, 70, 229, 0.2);
    --glow-accent: 0 0 20px rgba(6, 182, 212, 0.5), 0 0 40px rgba(6, 182, 212, 0.2);
    --glow-burst: 0 0 60px rgba(79, 70, 229, 0.6), 0 0 120px rgba(6, 182, 212, 0.3);

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.8s ease;

    /* 字体 */
    --font-main: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* === Particle Canvas (全局背景粒子) === */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === Sound Button === */
.sound-btn {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    padding: 0;
}

.sound-btn:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--color-accent);
}

.sound-btn img {
    width: 24px;
    height: 24px;
}

/* === Sound Control Wrapper === */
.sound-control {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 增加顶部内边距，确保滑动条在控制区域内 */
    padding-top: 180px;
    margin-top: -180px;
}

.sound-control .sound-btn {
    position: relative;
    bottom: auto;
    right: auto;
}

/* === Volume Slider === */
.volume-slider {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.volume-slider.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.volume-slider.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.volume-slider-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 16px;
    padding: 16px 12px;
}

.volume-track {
    position: relative;
    width: 6px;
    height: 100px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 3px;
    cursor: pointer;
}

.volume-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, var(--color-primary), var(--color-accent));
    border-radius: 3px;
    transition: height 0.05s ease;
}

.volume-thumb {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: transform 0.1s ease;
}

.volume-thumb:active {
    cursor: grabbing;
    transform: translateX(-50%) scale(1.2);
}

.volume-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

/* === Scene System === */
.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
}

.scene-active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.scene-overlay {
    z-index: 50;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
}

/* === Scene 0: Loading === */
.loading-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
}

.loading-chip {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-core {
    width: 60px;
    height: 60px;
    position: relative;
    z-index: 2;
    animation: chipPulse 2s ease-in-out infinite;
}

.chip-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid;
    animation: ringExpand 3s ease-out infinite;
}

.chip-ring-1 {
    width: 80px;
    height: 80px;
    border-color: rgba(79, 70, 229, 0.4);
    animation-delay: 0s;
}

.chip-ring-2 {
    width: 100px;
    height: 100px;
    border-color: rgba(6, 182, 212, 0.3);
    animation-delay: 1s;
}

.chip-ring-3 {
    width: 120px;
    height: 120px;
    border-color: rgba(124, 58, 237, 0.2);
    animation-delay: 2s;
}

.loading-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.loading-line-1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-line-2 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.loading-dots {
    display: inline-block;
    animation: dotsFlicker 1.5s steps(4) infinite;
    width: 24px;
    text-align: left;
}

/* === Scene 0: Boot Screen (Qwen-OS-Lab Style) === */
.boot-scene {
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.boot-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* 提升视频清晰度 */
    image-rendering: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.boot-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, transparent 40%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.boot-vignette-radial {
    display: none;
}

/* Boot Logo Area */
.boot-logo-area {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.boot-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.boot-glow-1 {
    width: 320px;
    height: 320px;
    background: rgba(212,160,23,0.06);
    filter: blur(80px);
    top: -40px;
    animation: breathe 3s ease-in-out infinite;
}

.boot-glow-2 {
    width: 224px;
    height: 224px;
    background: rgba(255,215,0,0.04);
    filter: blur(50px);
    top: -8px;
    transform: translateX(-80%);
    animation: breathe 3s ease-in-out infinite 0.5s;
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.boot-logo {
    position: relative;
    z-index: 10;
    width: 520px;
    max-width: 85vw;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(212,160,23,0.15));
    animation: bootLogoIn 1.4s ease-out forwards;
    opacity: 0;
}

@keyframes bootLogoIn {
    from { opacity: 0; transform: scale(0.6) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.boot-slogan {
    margin-top: 28px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: rgba(251,191,36,0.95);
    text-shadow: 0 0 12px rgba(234,179,8,0.4), 0 0 30px rgba(234,179,8,0.15);
    animation: fadeInSimple 1s 1s ease forwards;
    opacity: 0;
}

@keyframes fadeInSimple {
    from { opacity: 0; }
    to { opacity: 0.45; }
}

/* Boot Terminal Area */
.boot-terminal-area {
    position: absolute;
    bottom: 112px;
    left: 32px;
    z-index: 10;
    animation: slideInLeft 0.8s 0.8s ease forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.boot-terminal-label {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: rgba(16,185,129,0.3);
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.boot-terminal {
    width: 320px;
    max-height: 176px;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(16,185,129,0.1);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.7;
    padding: 12px;
    color: rgba(52,211,153,0.6);
    scrollbar-width: none;
}

.boot-terminal::-webkit-scrollbar {
    display: none;
}

.terminal-line {
    white-space: pre;
}

.terminal-line-cmd {
    color: rgba(167,139,250,0.8);
}

.terminal-line-device {
    color: rgba(251,191,36,0.5);
}

.terminal-cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    background: rgba(52,211,153,0.7);
    animation: cursorBlink 1s step-end infinite;
    vertical-align: middle;
    margin-top: 2px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Boot Status Area */
.boot-status-area {
    position: absolute;
    bottom: 112px;
    right: 32px;
    z-index: 10;
    text-align: right;
    animation: fadeInSimple 1s 1.5s forwards;
    opacity: 0;
}

.boot-status-text {
    font-size: 9px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    color: rgba(100,116,139,0.5);
    line-height: 1.8;
}

/* Boot Entry Area (Fingerprint) */
.boot-entry-area {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.boot-entry-hint {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: rgba(203,213,225,0.85);
    margin-bottom: 20px;
    animation: fadeInSimple 1s 1.5s forwards;
    opacity: 0;
}

.fingerprint-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeInSimple 1s 2s forwards;
    opacity: 0;
}

.fingerprint-btn {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.fingerprint-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.fingerprint-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: all 0.2s ease;
    filter: brightness(0.9);
}

.fingerprint-btn:hover .fingerprint-img {
    filter: brightness(1.6) drop-shadow(0 0 20px rgba(234,179,8,0.6)) drop-shadow(0 0 40px rgba(234,179,8,0.3));
}

.fingerprint-btn.pressing .fingerprint-img {
    filter: brightness(2) drop-shadow(0 0 30px rgba(234,179,8,0.8)) drop-shadow(0 0 60px rgba(234,179,8,0.4));
    transform: scale(0.9);
}

.fingerprint-hint {
    font-size: 18px;
    letter-spacing: 0.35em;
    font-weight: 700;
    color: rgba(251,191,36,1);
    text-shadow: 0 0 8px rgba(234,179,8,0.5);
    animation: hintPulse 2.5s ease-in-out infinite;
}

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

/* === Scene 1: Home === */
.starfield-canvas,
.qwen-particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.qwen-particle-canvas {
    z-index: 1;
    pointer-events: auto;
}
.home-container {
    width: 100%;
    max-width: 900px;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.home-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-top: var(--space-2xl);
}

.logo-wrapper {
    margin-bottom: var(--space-lg);
}

.home-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(79, 70, 229, 0.4));
}

.home-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.title-char {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: charReveal 0.6s ease forwards;
    animation-delay: calc(var(--i) * 0.08s + 0.3s);
}

.home-subtitle {
    font-size: 1.97rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    font-weight: 700;
}

.home-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: var(--space-lg) auto;
}

.home-guide {
    font-size: 1.125rem;
    color: var(--text-muted);
    animation: guidePulse 2s ease-in-out infinite;
}

/* === Object Grid === */
.objects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    width: 100%;
    max-width: 600px;
    margin-bottom: var(--space-xl);
}

.object-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid rgba(100, 116, 139, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.object-card:hover {
    border-color: rgba(79, 70, 229, 0.5);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow-primary);
}

.object-card[data-installed="true"] {
    border-color: rgba(16, 185, 129, 0.4);
}

.object-card[data-installed="true"]:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.object-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.object-card:hover .object-glow {
    opacity: 1;
}

.object-card[data-installed="true"] .object-glow {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}

.object-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 180px;
}

.object-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity var(--transition-slow), filter var(--transition-slow);
}

.object-before {
    opacity: 1;
    filter: grayscale(0.7) brightness(0.8);
}

.object-after {
    opacity: 0;
    filter: brightness(1.1) saturate(1.2);
}

.object-card[data-installed="true"] .object-before {
    opacity: 0;
}

.object-card[data-installed="true"] .object-after {
    opacity: 1;
}

.install-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-normal);
}

.object-card[data-installed="true"] .install-badge {
    opacity: 1;
    transform: scale(1);
}

.badge-chip {
    width: 100%;
    height: 100%;
    animation: badgeGlow 2s ease-in-out infinite;
}

.object-label {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.label-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.label-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.label-installed {
    font-size: 0.8rem;
    color: var(--color-installed);
    display: none;
}

.object-card[data-installed="true"] .label-status {
    display: none;
}

.object-card[data-installed="true"] .label-installed {
    display: block;
}

/* === Home Footer / Progress === */
.home-footer {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding-bottom: var(--space-2xl);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-finish {
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.6);
}

/* === Scene 2: Install Process === */
.scene-overlay {
    background: radial-gradient(ellipse at 30% 20%, rgba(88, 28, 135, 0.4) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 60%, rgba(30, 58, 138, 0.3) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(6, 78, 59, 0.2) 0%, transparent 60%),
                linear-gradient(180deg, #030014 0%, #0a0a2e 30%, #0d1117 70%, #000000 100%);
}

.scene-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 70% 50%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 20% 70%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 35% 25%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 95% 85%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 25% 95%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 45% 35%, rgba(200,220,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 65% 75%, rgba(200,220,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 85% 45%, rgba(200,220,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 5% 65%, rgba(200,220,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 50% 50%, rgba(200,220,255,0.9), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.install-container {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-xl) var(--space-md);
}

.install-stage {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    animation: stageFadeIn 0.6s ease forwards;
}

.install-object-display {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-object-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.install-object-img.animating {
    animation: objectFloat 2s ease-in-out infinite;
}

/* === 拖拽芯片 === */
.drag-chip {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.6s ease;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.drag-chip.visible {
    opacity: 1;
}

.drag-chip-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(79, 70, 229, 0.7));
    animation: chipFloat 2s ease-in-out infinite;
}

.drag-chip-hint {
    font-size: 12px;
    color: var(--color-accent);
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.drag-chip.visible .drag-chip-hint {
    opacity: 1;
}

/* 拖拽中状态 */
.drag-chip.dragging {
    cursor: grabbing;
    z-index: 100;
    transition: none !important;
}

.drag-chip.dragging .drag-chip-img {
    animation: none;
    transform: scale(1.2);
    filter: drop-shadow(0 0 25px rgba(79, 70, 229, 1)) drop-shadow(0 0 50px rgba(6, 182, 212, 0.5));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.drag-chip.dragging .drag-chip-hint {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* 物体可接收状态 */
.install-object-display.drop-ready .install-object-img {
    filter: brightness(1.3) saturate(1.3) drop-shadow(0 0 20px rgba(6, 182, 212, 0.6));
    animation: none;
    transition: filter 0.3s ease;
}

/* 芯片融入动画 */
.drag-chip.merging {
    pointer-events: none;
    transition: none !important;
}

.drag-chip.merging .drag-chip-img {
    animation: none;
}

@keyframes chipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.awakened .install-object-img {
    filter: brightness(1.15) saturate(1.2);
    animation: awakenGlow 2s ease-in-out infinite;
}

.awaken-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.3);
    animation: awakenRingExpand 3s ease-out infinite;
}

.awaken-ring-1 {
    width: 200px;
    height: 200px;
}

.awaken-ring-2 {
    width: 260px;
    height: 260px;
    animation-delay: 1.5s;
    border-color: rgba(79, 70, 229, 0.2);
}

/* Install Info Card */
.install-info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 100%;
    border: 1px solid rgba(100, 116, 139, 0.2);
    backdrop-filter: blur(10px);
}

.before-card {
    border-color: rgba(100, 116, 139, 0.3);
}

.after-card {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.info-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.before-card .info-title {
    color: var(--text-muted);
}

.after-card .info-title {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-desc {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.info-desc p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: var(--space-md);
    position: relative;
    opacity: 0;
    transform: translateX(-10px);
    animation: descLineReveal 0.5s ease forwards;
}

.info-desc p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
}

.before-card .info-desc p::before {
    background: var(--text-muted);
}

/* Chip Fly Animation */
.chip-fly {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    z-index: 10;
    opacity: 0;
}

.chip-fly-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(79, 70, 229, 0.8));
}

/* Circuit Burst */
.circuit-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
    opacity: 0;
}

.circuit-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.9), rgba(6, 182, 212, 0.6), transparent);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6), 0 0 20px rgba(6, 182, 212, 0.3);
    transform-origin: left center;
    opacity: 0;
}

.circuit-line-1 { transform: rotate(0deg); }
.circuit-line-2 { transform: rotate(45deg); }
.circuit-line-3 { transform: rotate(90deg); }
.circuit-line-4 { transform: rotate(135deg); }
.circuit-line-5 { transform: rotate(180deg); }
.circuit-line-6 { transform: rotate(225deg); }
.circuit-line-7 { transform: rotate(270deg); }
.circuit-line-8 { transform: rotate(315deg); }

/* Light Burst */
.light-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.2), transparent);
    opacity: 0;
    pointer-events: none;
}

.install-particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
}

/* WebGL 特效 Canvas */
.webgl-fx-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    z-index: 12;
}

/* Install Close Button */
.install-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 60;
}

.install-close:hover {
    background: rgba(30, 41, 59, 1);
    color: var(--text-primary);
    border-color: var(--color-accent);
}

/* === Interact Section === */
.interact-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
    position: relative;
    z-index: 2;
}

.interact-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
    flex-shrink: 0;
}

.interact-object-mini {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.interact-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1);
}

.interact-header-text {
    flex: 1;
    min-width: 0;
}

.interact-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}

.interact-prompt {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Chat Container === */
.chat-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-md) 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.chat-container::-webkit-scrollbar {
    width: 4px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 2px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-height: 100%;
    justify-content: flex-end;
}

/* === Chat Message Bubbles === */
.chat-msg {
    display: flex;
    gap: var(--space-sm);
    max-width: 90%;
    animation: msgSlideIn 0.3s ease forwards;
}

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

.chat-msg-ai {
    align-self: flex-start;
}

.chat-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.chat-msg-ai .chat-msg-avatar {
    border-color: rgba(6, 182, 212, 0.3);
}

.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-msg-user .chat-msg-avatar {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.chat-msg-bubble {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    line-height: 1.6;
    word-break: break-word;
}

.chat-msg-ai .chat-msg-bubble {
    background: var(--bg-card);
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-top-left-radius: var(--space-xs);
    color: var(--text-secondary);
}

.chat-msg-user .chat-msg-bubble {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-top-right-radius: var(--space-xs);
}

.chat-msg-bubble img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: var(--space-xs);
}

/* Typing indicator */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

.interact-input-group {
    width: 100%;
    max-width: 360px;
    display: flex;
    gap: var(--space-sm);
}

.interact-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.interact-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.interact-input::placeholder {
    color: var(--text-muted);
}

.interact-submit {
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition-fast);
    min-width: 80px;
}

.interact-submit:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-1px);
}

.interact-submit.loading .btn-text {
    display: none;
}

.interact-submit .btn-loading {
    display: none;
}

.interact-submit.loading .btn-loading {
    display: inline;
}

/* Response Bubble */
.interact-response {
    width: 100%;
    max-width: 360px;
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    animation: responseSlideIn 0.5s ease forwards;
}

.response-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-accent);
}

.response-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.response-bubble {
    background: var(--bg-card);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-lg);
    border-top-left-radius: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    position: relative;
}

.response-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.response-bubble::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid rgba(6, 182, 212, 0.2);
}

.btn-next {
    margin-top: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.btn-next:hover {
    border-color: var(--color-accent);
    color: var(--text-primary);
}

/* === Scene 3: Climax === */
.climax-container {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    padding: var(--space-2xl) var(--space-md);
    position: relative;
    z-index: 2;
}

.climax-visual {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.climax-core {
    position: relative;
    z-index: 3;
    width: 100px;
    height: 100px;
    animation: climaxCorePulse 3s ease-in-out infinite;
}

.climax-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(79, 70, 229, 0.6));
}

.climax-orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: orbitSpin 20s linear infinite;
}

.climax-orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    background: var(--bg-card);
}

.climax-orbit-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.climax-orbit-item:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.climax-orbit-item:nth-child(2) { top: 50%; right: 0; transform: translateY(-50%); }
.climax-orbit-item:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%); }
.climax-orbit-item:nth-child(4) { top: 50%; left: 0; transform: translateY(-50%); }

.climax-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(6, 182, 212, 0.05) 40%, transparent 70%);
    animation: climaxBurstPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.climax-particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Climax Text */
.climax-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.climax-line {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
}

.climax-line-1 { animation: climaxLineReveal 0.8s ease forwards 0.5s; }
.climax-line-2 { animation: climaxLineReveal 0.8s ease forwards 1s; }

.climax-divider {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: var(--space-md) 0;
    opacity: 0;
    animation: climaxLineReveal 0.8s ease forwards 1.3s;
}

.climax-brand {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
    opacity: 0;
    animation: climaxLineReveal 0.8s ease forwards 1.5s;
}

.climax-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    opacity: 0;
    animation: climaxLineReveal 0.8s ease forwards 1.8s;
}

.climax-tagline-2 {
    font-size: 1rem;
    color: var(--color-accent);
    letter-spacing: 2px;
    opacity: 0;
    animation: climaxLineReveal 0.8s ease forwards 2.1s;
}

/* Climax Actions */
.climax-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: climaxLineReveal 0.8s ease forwards 2.5s;
}

.btn-climax {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.6);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--text-primary);
}

/* === Scene 4: Share === */
.share-container {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-2xl) var(--space-md);
}

.share-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poster-preview {
    width: 100%;
    max-width: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.poster-content {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.poster-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.poster-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-top {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-md);
    flex-shrink: 0;
}

.poster-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto var(--space-md);
    object-fit: contain;
}

.poster-slogan {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #fff, var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poster-objects {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
    align-content: center;
}

.poster-obj {
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.poster-obj img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.poster-obj-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.poster-bottom {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-md) var(--space-md) var(--space-xl);
    flex-shrink: 0;
}

.poster-divider {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    margin: 0 auto var(--space-md);
}

.poster-brand {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    margin-bottom: var(--space-lg);
}

.poster-qrcode {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

#qrcodeCanvas {
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px;
}

.poster-qr-text {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.poster-watermark {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
    z-index: 2;
}

/* Share Actions */
.share-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-share {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.share-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Image Modal === */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.image-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    animation: modalIn 0.3s ease forwards;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.image-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.image-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
}

.image-modal-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal-prompt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 400px;
}

.image-modal-download {
    padding: var(--space-md) var(--space-2xl);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.image-modal-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.6);
}

/* === Tech Overlay === */
.tech-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background: var(--bg-overlay);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    animation: overlayFadeIn 0.3s ease;
}

.tech-content {
    max-width: 600px;
    width: 100%;
    position: relative;
}

.tech-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.tech-close:hover {
    border-color: var(--color-accent);
    color: var(--text-primary);
}

.tech-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-2xl);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.tech-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(100, 116, 139, 0.2);
    text-align: center;
    transition: var(--transition-fast);
}

.tech-item:hover {
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

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

.tech-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.tech-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tech-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Tech Button */
.tech-btn {
    position: fixed;
    bottom: var(--space-lg);
    left: var(--space-lg);
    z-index: 100;
    padding: var(--space-sm) var(--space-md);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.tech-btn:hover {
    border-color: var(--color-accent);
    color: var(--text-primary);
}
