@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #0d1117;
    --bg-card: rgba(13, 17, 23, 0.95);
    --bg-input: rgba(22, 27, 34, 0.8);
    --cyan-glow: #00d4ff;
    --cyan-dim: rgba(0, 212, 255, 0.1);
    --blue-primary: #3b82f6;
    --blue-secondary: #1d4ed8;
    --purple-accent: #8b5cf6;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border-color: rgba(0, 212, 255, 0.2);
    --border-dim: rgba(48, 54, 61, 0.6);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --font-main: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

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

html { 
    font-size: 16px; 
    height: 100%; 
    height: -webkit-fill-available;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-x pan-y;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-x pan-y;
}

.background-effects {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(25, 25, 60, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(20, 20, 50, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, #0d0d1a 0%, #050508 100%);
}

.stars {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transition: transform 0.5s ease-out;
}

.stars-layer-1 {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(1px 1px at 10% 10%, #fff, transparent),
        radial-gradient(1px 1px at 20% 35%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 35% 15%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 45% 60%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 55% 25%, #fff, transparent),
        radial-gradient(1px 1px at 65% 75%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 75% 40%, #fff, transparent),
        radial-gradient(1px 1px at 85% 85%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 95% 55%, #fff, transparent),
        radial-gradient(1px 1px at 5% 70%, rgba(255,255,255,0.9), transparent);
    background-size: 200px 200px;
    animation: starsFloat 200s linear infinite;
}

.stars-layer-2 {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(1.5px 1.5px at 15% 45%, rgba(0, 212, 255, 0.8), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 50% 20%, rgba(139, 92, 246, 0.7), transparent),
        radial-gradient(1px 1px at 70% 65%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 85% 30%, rgba(59, 130, 246, 0.6), transparent),
        radial-gradient(1px 1px at 25% 90%, #fff, transparent),
        radial-gradient(1px 1px at 60% 50%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 90% 75%, rgba(0, 212, 255, 0.5), transparent);
    background-size: 300px 300px;
    animation: starsFloat 280s linear infinite reverse;
}

.stars-layer-3 {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(2px 2px at 25% 25%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2.5px 2.5px at 75% 75%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 40% 60%, rgba(200,220,255,0.7), transparent),
        radial-gradient(3px 3px at 60% 30%, rgba(255,240,200,0.6), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255,255,255,0.7), transparent);
    background-size: 400px 400px;
    animation: starsTwinkle 6s ease-in-out infinite;
}

@keyframes starsFloat {
    from { transform: translateY(0) translateX(0); }
    to { transform: translateY(-200px) translateX(-100px); }
}

@keyframes starsTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.space-objects {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
}

.comet {
    position: absolute;
    opacity: 0;
}

.comet-1 {
    top: 15%;
    left: -150px;
    animation: cometToRight 45s linear infinite;
    animation-delay: 3s;
}

.comet-1 .comet-head {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, #fff 0%, rgba(0, 212, 255, 0.9) 30%, rgba(0, 150, 200, 0.6) 60%, transparent 70%);
    border-radius: 50%;
    box-shadow: 
        0 0 10px 4px rgba(0, 212, 255, 0.8),
        0 0 20px 8px rgba(0, 212, 255, 0.4),
        0 0 30px 12px rgba(0, 212, 255, 0.2);
    position: relative;
}

.comet-1 .comet-tail {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 150px;
    height: 4px;
    background: linear-gradient(to left, rgba(0, 212, 255, 0.9), rgba(100, 180, 255, 0.5) 30%, rgba(139, 92, 246, 0.3) 60%, transparent);
    border-radius: 4px;
    filter: blur(1px);
    transform-origin: right center;
}

.comet-1 .comet-tail::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to left, rgba(0, 212, 255, 0.3), rgba(139, 92, 246, 0.1) 50%, transparent);
    filter: blur(3px);
}

.comet-2 {
    top: 70%;
    right: -150px;
    animation: cometToLeft 55s linear infinite;
    animation-delay: 25s;
}

.comet-2 .comet-head {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 70% 30%, #fff 0%, rgba(139, 92, 246, 0.9) 30%, rgba(100, 60, 180, 0.6) 60%, transparent 70%);
    border-radius: 50%;
    box-shadow: 
        0 0 8px 3px rgba(139, 92, 246, 0.8),
        0 0 16px 6px rgba(139, 92, 246, 0.4),
        0 0 24px 10px rgba(139, 92, 246, 0.2);
    position: relative;
}

.comet-2 .comet-tail {
    position: absolute;
    top: 1px;
    left: 6px;
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, rgba(139, 92, 246, 0.9), rgba(180, 100, 255, 0.5) 30%, rgba(0, 212, 255, 0.3) 60%, transparent);
    border-radius: 4px;
    filter: blur(1px);
    transform-origin: left center;
}

.comet-2 .comet-tail::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(0, 212, 255, 0.1) 50%, transparent);
    filter: blur(3px);
}

@keyframes cometToRight {
    0% { left: -150px; opacity: 0; }
    3% { opacity: 1; }
    27% { opacity: 1; }
    30% { left: calc(100% + 150px); opacity: 0; }
    100% { left: calc(100% + 150px); opacity: 0; }
}

@keyframes cometToLeft {
    0% { right: -150px; opacity: 0; }
    3% { opacity: 1; }
    27% { opacity: 1; }
    30% { right: calc(100% + 150px); opacity: 0; }
    100% { right: calc(100% + 150px); opacity: 0; }
}

.asteroid {
    position: absolute;
    opacity: 0;
}

.asteroid-body {
    position: relative;
    background: linear-gradient(145deg, #7a7a7a 0%, #4a4a4a 25%, #2a2a2a 50%, #1a1a1a 75%, #0a0a0a 100%);
    box-shadow: 
        inset -3px -3px 6px rgba(0,0,0,0.8),
        inset 2px 2px 4px rgba(255,255,255,0.1),
        0 0 10px rgba(80,80,80,0.3);
}

.asteroid-body::before,
.asteroid-body::after {
    content: '';
    position: absolute;
    background: rgba(40, 40, 40, 0.9);
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5);
}

.asteroid-body::before {
    width: 35%;
    height: 35%;
    top: 15%;
    left: 20%;
}

.asteroid-body::after {
    width: 25%;
    height: 25%;
    bottom: 20%;
    right: 15%;
}

.asteroid-1 {
    top: 22%;
    left: -40px;
    animation: asteroidDrift1 40s linear infinite;
    animation-delay: 5s;
}

.asteroid-1 .asteroid-body {
    width: 14px;
    height: 12px;
    border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%;
}

.asteroid-2 {
    top: 75%;
    right: -35px;
    animation: asteroidDrift2 50s linear infinite;
    animation-delay: 20s;
}

.asteroid-2 .asteroid-body {
    width: 10px;
    height: 9px;
    border-radius: 50% 45% 55% 50% / 45% 55% 45% 55%;
    background: linear-gradient(145deg, #9e8b76 0%, #6b5d4d 30%, #3a3127 60%, #1a1510 100%);
}

.asteroid-3 {
    bottom: 30%;
    left: -30px;
    animation: asteroidDrift3 35s linear infinite;
    animation-delay: 12s;
}

.asteroid-3 .asteroid-body {
    width: 8px;
    height: 7px;
    border-radius: 55% 45% 50% 50% / 50% 50% 50% 50%;
}

@keyframes asteroidDrift1 {
    0% { left: -40px; top: 22%; opacity: 0; transform: rotate(0deg); }
    5% { opacity: 0.9; }
    35% { opacity: 0.9; }
    40% { left: calc(100% + 40px); top: 35%; opacity: 0; transform: rotate(200deg); }
    100% { left: calc(100% + 40px); opacity: 0; }
}

@keyframes asteroidDrift2 {
    0% { right: -35px; top: 75%; opacity: 0; transform: rotate(0deg); }
    5% { opacity: 0.85; }
    35% { opacity: 0.85; }
    40% { right: calc(100% + 35px); top: 55%; opacity: 0; transform: rotate(-240deg); }
    100% { right: calc(100% + 35px); opacity: 0; }
}

@keyframes asteroidDrift3 {
    0% { left: -30px; bottom: 30%; opacity: 0; transform: rotate(0deg); }
    6% { opacity: 0.8; }
    36% { opacity: 0.8; }
    42% { left: calc(100% + 30px); bottom: 45%; opacity: 0; transform: rotate(280deg); }
    100% { left: calc(100% + 30px); opacity: 0; }
}

.satellite {
    position: absolute;
    opacity: 0;
    animation: satellitePass 70s linear infinite;
    animation-delay: 8s;
}

.satellite-body {
    width: 6px;
    height: 4px;
    background: linear-gradient(180deg, #ddd 0%, #999 50%, #555 100%);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 4px rgba(255,255,255,0.4);
}

.satellite-panel-left,
.satellite-panel-right {
    position: absolute;
    width: 12px;
    height: 4px;
    top: 0;
    background: linear-gradient(180deg, 
        rgba(0, 100, 180, 0.9) 0%,
        rgba(0, 150, 220, 1) 50%,
        rgba(0, 100, 180, 0.9) 100%);
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(0, 150, 255, 0.5);
}

.satellite-panel-left { right: 100%; margin-right: 1px; }
.satellite-panel-right { left: 100%; margin-left: 1px; }

.satellite-blink {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #f00;
    border-radius: 50%;
    top: -1px;
    left: 2px;
    animation: satelliteBlink 2s ease-in-out infinite;
}

@keyframes satelliteBlink {
    0%, 45%, 55%, 100% { opacity: 0.3; }
    50% { opacity: 1; box-shadow: 0 0 4px #f00; }
}

@keyframes satellitePass {
    0% { top: 85%; left: -50px; opacity: 0; }
    2% { opacity: 0.9; }
    23% { opacity: 0.9; }
    25% { top: 10%; left: calc(100% + 50px); opacity: 0; }
    100% { top: 10%; left: calc(100% + 50px); opacity: 0; }
}

.blackhole {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: blackholePass 80s linear infinite;
    animation-delay: 15s;
}

.blackhole-singularity {
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border-radius: 50%;
    box-shadow: 
        0 0 30px 15px rgba(0, 0, 0, 1),
        0 0 60px 30px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.blackhole-event-horizon {
    position: absolute;
    width: 28px;
    height: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #000 60%, rgba(20, 0, 40, 0.8) 80%, transparent 100%);
    z-index: 9;
}

.blackhole-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: radial-gradient(circle,
        transparent 20%,
        rgba(139, 92, 246, 0.15) 30%,
        rgba(139, 92, 246, 0.25) 40%,
        rgba(100, 50, 180, 0.15) 50%,
        transparent 60%);
    animation: blackholeGlow 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes blackholeGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; }
}

.blackhole-disk {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 5;
}

.blackhole-disk::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: rgba(255, 200, 100, 0.95);
    border-right-color: rgba(255, 150, 50, 0.7);
    border-bottom-color: rgba(255, 100, 30, 0.4);
    border-left-color: rgba(255, 80, 20, 0.2);
    animation: diskRotate 3s linear infinite;
    box-shadow: 
        0 0 15px rgba(255, 150, 50, 0.5),
        inset 0 0 15px rgba(255, 150, 50, 0.3);
}

.blackhole-disk::after {
    content: '';
    position: absolute;
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(255, 220, 150, 0.9);
    border-right-color: rgba(255, 180, 100, 0.6);
    animation: diskRotate 2s linear infinite reverse;
}

.blackhole-outer-disk {
    position: absolute;
    width: 130%;
    height: 130%;
    top: -15%;
    left: -15%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255, 180, 80, 0.4);
    border-right-color: rgba(255, 150, 60, 0.2);
    animation: diskRotate 5s linear infinite;
    z-index: 4;
}

@keyframes diskRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.blackhole-lensing {
    position: absolute;
    width: 180%;
    height: 180%;
    top: -40%;
    left: -40%;
    border-radius: 50%;
    background: radial-gradient(circle,
        transparent 25%,
        rgba(139, 92, 246, 0.03) 35%,
        rgba(100, 60, 180, 0.05) 45%,
        rgba(60, 30, 120, 0.03) 55%,
        transparent 65%);
    animation: lensingPulse 4s ease-in-out infinite;
    z-index: 0;
}

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

.blackhole-jets {
    position: absolute;
    width: 6px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.blackhole-jets::before,
.blackhole-jets::after {
    content: '';
    position: absolute;
    width: 6px;
    left: 0;
    background: linear-gradient(to top, rgba(139, 92, 246, 0.9), rgba(0, 212, 255, 0.5), transparent);
    filter: blur(2px);
    animation: jetPulse 1.5s ease-in-out infinite;
}

.blackhole-jets::before {
    height: 50px;
    bottom: 50%;
    border-radius: 3px 3px 0 0;
}

.blackhole-jets::after {
    height: 50px;
    top: 50%;
    transform: rotate(180deg);
    border-radius: 3px 3px 0 0;
}

@keyframes jetPulse {
    0%, 100% { opacity: 0.7; height: 50px; }
    50% { opacity: 1; height: 60px; }
}

@keyframes blackholePass {
    0% { top: 40%; right: -100px; opacity: 0; }
    3% { opacity: 1; }
    27% { opacity: 1; }
    30% { top: 50%; right: calc(100% + 100px); opacity: 0; }
    100% { right: calc(100% + 100px); opacity: 0; }
}

.space-debris {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #888 0%, #444 100%);
    border-radius: 40% 60% 50% 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.shooting-star {
    position: absolute;
    opacity: 0;
}

.shooting-star-body {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.9);
    position: relative;
}

.shooting-star-tail {
    position: absolute;
    top: 1px;
    right: 4px;
    width: 60px;
    height: 2px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(0, 212, 255, 0.5), transparent);
    border-radius: 2px;
}

.shooting-star:nth-child(1) {
    top: 12%;
    left: 15%;
    transform: rotate(-30deg);
    animation: shootingStarFly 18s ease-in-out infinite;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 40%;
    left: 55%;
    transform: rotate(-25deg);
    animation: shootingStarFly 22s ease-in-out infinite;
    animation-delay: 8s;
}

.shooting-star:nth-child(3) {
    top: 65%;
    left: 25%;
    transform: rotate(-35deg);
    animation: shootingStarFly 20s ease-in-out infinite;
    animation-delay: 14s;
}

@keyframes shootingStarFly {
    0% { opacity: 0; transform: translateX(0) rotate(-30deg); }
    2% { opacity: 1; }
    8% { opacity: 0; transform: translateX(300px) rotate(-30deg); }
    100% { opacity: 0; }
}

.nebula {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 15% 15%, rgba(0, 212, 255, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse at 85% 25%, rgba(139, 92, 246, 0.03) 0%, transparent 35%),
        radial-gradient(ellipse at 70% 85%, rgba(59, 130, 246, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 5% 75%, rgba(0, 180, 200, 0.02) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 50, 150, 0.02) 0%, transparent 50%);
    animation: nebulaDrift 30s ease-in-out infinite;
    transition: transform 0.8s ease-out;
}

@keyframes nebulaDrift {
    0%, 100% { opacity: 1; transform: scale(1) translate(0, 0); }
    50% { opacity: 0.8; transform: scale(1.02) translate(-1%, 1%); }
}

.cosmic-dust {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 50% 40%, rgba(200,220,255,0.12), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.08), transparent),
        radial-gradient(1px 1px at 90% 30%, rgba(255,240,220,0.1), transparent);
    background-size: 150px 150px;
    animation: dustFloat 100s linear infinite;
    transition: transform 0.5s ease-out;
}

@keyframes dustFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-150px); }
}

.scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.012) 50%, transparent 100%);
    animation: scanLine 15s linear infinite;
}

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

.grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.6;
    animation: gridMove 40s linear infinite;
    transition: transform 0.5s ease-out;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 10px 16px;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    text-align: center;
    padding: 8px 0;
    flex-shrink: 0;
    position: relative;
}

.logo {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.4));
    transition: transform var(--transition-normal), filter var(--transition-normal);
    animation: logoFloat 4s ease-in-out infinite, logoGlow 2s ease-in-out infinite alternate;
}

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

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4)); }
    100% { filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.7)); }
}

.logo:hover { 
    transform: scale(1.1) rotate(5deg); 
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
}

.app-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--blue-primary) 50%, var(--purple-accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
    animation: titleGradient 5s ease infinite;
}

@keyframes titleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.app-slogan {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
    letter-spacing: 0.02em;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.header-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-family: var(--font-main);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--cyan-glow);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition-fast);
    overflow: hidden;
    cursor: pointer;
}

.header-nav-btn-left {
    left: 0;
    animation: fadeInLeft 0.5s ease-out 0.4s both;
}

.header-nav-btn-right {
    right: 0;
    animation: fadeInRight 0.5s ease-out 0.4s both;
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-15px) translateY(-50%); }
    to { opacity: 1; transform: translateX(0) translateY(-50%); }
}

.header-nav-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.header-nav-btn:hover::before { left: 100%; }

.header-nav-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.header-nav-btn-left:hover {
    transform: translateY(-50%) scale(1.05);
}

.header-nav-btn-right:hover {
    transform: translateY(-50%) scale(1.05);
}

.header-nav-btn svg { width: 12px; height: 12px; }

.info-btn-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-nav-btn.flipped .info-state {
    display: none;
}

.header-nav-btn.flipped .back-state {
    display: inline-flex !important;
}

.card-flip-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.card-flip {
    flex: 1;
    position: relative;
}

.card-flip .card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: none !important;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.card-flip .card.card-front {
    z-index: 2;
    opacity: 1;
    transform: rotateY(0deg);
}

.card-flip .card.card-back {
    z-index: 1;
    opacity: 0;
    transform: rotateY(-10deg);
    pointer-events: none;
}

.card-flip.flipped .card.card-front {
    opacity: 0;
    transform: rotateY(10deg);
    pointer-events: none;
}

.card-flip.flipped .card.card-back {
    z-index: 3;
    opacity: 1;
    transform: rotateY(0deg);
    pointer-events: auto;
}

.card-back .card-title {
    flex-shrink: 0;
}

.info-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    padding: 8px 0;
    justify-content: center;
}

.info-btn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
    font-family: var(--font-main);
}

.info-btn-item:hover {
    border-color: var(--cyan-glow);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
    transform: translateX(4px);
}

.info-btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(139, 92, 246, 0.15));
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.info-btn-icon svg {
    width: 22px;
    height: 22px;
    color: var(--cyan-glow);
}

.info-btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-btn-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-btn-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.info-btn-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.info-btn-item:hover .info-btn-arrow {
    color: var(--cyan-glow);
    transform: translateX(4px);
}

.info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.info-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.info-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card), 0 0 40px rgba(0, 212, 255, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.info-modal-overlay.active .info-modal {
    transform: scale(1) translateY(0);
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-dim);
    flex-shrink: 0;
}

.info-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.info-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.info-modal-close svg {
    width: 18px;
    height: 18px;
}

.info-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.info-section {
    margin-bottom: 20px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan-glow);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-section h4::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, var(--cyan-glow), var(--purple-accent));
    border-radius: 2px;
}

.info-section p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 9px;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section.info-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 20px;
}

.info-section.info-warning h4 {
    color: var(--warning);
}

.info-section.info-warning h4::before {
    background: linear-gradient(180deg, var(--warning), #d97706);
}

.info-section.info-warning p {
    color: var(--text-primary);
}

.info-section.info-warning strong {
    color: var(--warning);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
    animation: cardAppear 0.6s ease-out 0.2s both;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: translateY(20px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
    animation: cardScan 3s ease-in-out infinite;
}

@keyframes cardScan {
    0%, 100% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 12px;
    flex-shrink: 0;
    animation: fadeInUp 0.5s ease-out;
}

.card-title svg {
    width: 18px;
    height: 18px;
    color: var(--cyan-glow);
    flex-shrink: 0;
    animation: iconPulse 2s ease-in-out infinite;
}

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

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 0.75rem;
    line-height: 1.5;
    flex-shrink: 0;
    animation: alertSlide 0.4s ease-out;
}

@keyframes alertSlide {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-success svg { animation: checkBounce 0.5s ease-out; }
@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.alert-error { background: var(--error-bg); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--error); animation: alertShake 0.5s ease-out; }
@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.alert-info { background: var(--info-bg); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--info); }

#create-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.form-group { margin-bottom: 10px; flex-shrink: 0; animation: fadeInUp 0.4s ease-out both; }
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }

.form-label { display: block; font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; transition: color var(--transition-fast); }
.form-label.optional::after { content: ' (optionnel)'; color: var(--text-muted); font-weight: 400; }

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-main);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.1);
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    100% { box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.1); }
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.message-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 10px;
}

.message-input-wrapper .form-textarea {
    flex: 1;
    min-height: 150px;
    resize: none;
    line-height: 1.5;
}

.input-with-icon { position: relative; }
.input-with-icon .form-input { padding-left: 36px; }
.input-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; transition: color var(--transition-fast); }
.form-input:focus + .input-icon, .input-with-icon:focus-within .input-icon { color: var(--cyan-glow); }

.options-section { margin-bottom: 12px; flex-shrink: 0; animation: fadeInUp 0.4s ease-out 0.25s both; }
.options-title { display: flex; align-items: center; gap: 6px; font-size: 0.65rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.options-title svg { animation: rotate 10s linear infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.options-grid .form-group { margin-bottom: 0; animation: none; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.btn svg { width: 16px; height: 16px; transition: transform var(--transition-fast); }
.btn:hover svg { transform: scale(1.1); }

.btn-primary {
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--blue-primary) 100%);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
}

.btn-primary:active { 
    transform: translateY(0) scale(0.98); 
    animation: btnClick 0.2s ease-out;
}

@keyframes btnClick {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
}

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary:disabled::before { display: none; }

.btn-primary.loading { pointer-events: none; }

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    border: 2px solid transparent;
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: btnSpin 0.8s linear infinite;
}

@keyframes btnSpin { 100% { transform: rotate(360deg); } }

.btn-secondary {
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
}

.btn-secondary:hover {
    border-color: var(--cyan-glow);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

.btn-full { width: 100%; }
.btn-group { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; animation: fadeInUp 0.4s ease-out 0.3s both; }

.generated-link-section { margin: 12px 0; flex-shrink: 0; animation: successPop 0.5s ease-out; }

@keyframes successPop {
    0% { opacity: 0; transform: scale(0.9); }
    50% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

.generated-link-title { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.generated-link-wrapper { display: flex; gap: 8px; }
.generated-link-input { 
    flex: 1; 
    padding: 10px 12px; 
    font-family: var(--font-mono); 
    font-size: 0.7rem; 
    color: var(--cyan-glow); 
    background: var(--bg-input); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    outline: none;
    animation: linkGlow 2s ease-in-out infinite alternate;
}

@keyframes linkGlow {
    0% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.1); }
    100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.2); }
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    padding: 0;
    background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--blue-primary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }
.btn-copy:active { transform: scale(0.95); }
.btn-copy.copied { 
    background: var(--success); 
    animation: copySuccess 0.3s ease-out;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.message-status { text-align: center; padding: 16px 0; animation: fadeInUp 0.5s ease-out; }
.message-status-icon { 
    width: 56px; 
    height: 56px; 
    margin: 0 auto 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%;
    animation: statusPop 0.5s ease-out;
}

@keyframes statusPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.message-status-icon svg { width: 28px; height: 28px; }
.message-status-icon.error { background: var(--error-bg); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--error); }
.message-status-icon.warning { background: var(--warning-bg); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.message-status-icon.success { background: var(--success-bg); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.message-status-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.message-status-text { font-size: 0.8rem; color: var(--text-secondary); }

.message-display {
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 12px 0;
    flex: 1;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: messageReveal 0.6s ease-out;
    position: relative;
}

@keyframes messageReveal {
    0% { opacity: 0; clip-path: inset(0 100% 0 0); }
    100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

.password-attempts { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.attempts-dots { display: flex; gap: 4px; }
.attempt-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    background: var(--border-dim);
    transition: all 0.3s ease;
}
.attempt-dot.active { 
    background: var(--cyan-glow); 
    box-shadow: 0 0 6px var(--cyan-glow);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.attempts-text { font-size: 0.65rem; color: var(--text-muted); }

.footer { text-align: center; padding: 6px 0; flex-shrink: 0; animation: fadeInUp 0.5s ease-out 0.5s both; }
.footer-text { font-size: 0.6rem; color: var(--text-muted); }
.footer-text span { color: var(--text-secondary); }
.footer-link { color: var(--cyan-glow); text-decoration: none; transition: all var(--transition-fast); }
.footer-link:hover { text-decoration: underline; text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }

.animate-in { animation: fadeSlideIn 0.4s ease-out forwards; opacity: 0; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }

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

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

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(15px) translateY(-50%); }
    to { opacity: 1; transform: translateX(0) translateY(-50%); }
}

.being-attracted {
    transition: transform 0.15s ease-out, opacity 0.15s ease-out !important;
}

.being-consumed {
    opacity: 0 !important;
    transform: scale(0) rotate(720deg) !important;
    transition: transform 0.4s ease-in, opacity 0.4s ease-in !important;
}

.blackhole-warp-active .stars,
.blackhole-warp-active .cosmic-dust,
.blackhole-warp-active .nebula,
.blackhole-warp-active .grid-overlay {
    transition: transform 0.3s ease-out;
}

@media (max-width: 640px) {
    .container { padding: 8px 12px; }
    .header { padding: 6px 0; }
    .logo { width: 38px; height: 38px; }
    .app-title { font-size: 1.15rem; }
    .app-slogan { font-size: 0.6rem; }
    .header-nav-btn { padding: 4px 8px; font-size: 0.6rem; }
    .header-nav-btn svg { width: 11px; height: 11px; }
    .header-nav-btn .btn-text { display: none; }
    .card { padding: 12px; border-radius: var(--radius-md); }
    .card-title { font-size: 0.85rem; padding-bottom: 8px; margin-bottom: 10px; }
    .alert { padding: 8px; font-size: 0.7rem; margin-bottom: 10px; }
    .form-group { margin-bottom: 8px; }
    .message-input-wrapper { margin-bottom: 8px; }
    .message-input-wrapper .form-textarea { min-height: 120px; }
    .options-section { margin-bottom: 10px; }
    .options-grid { gap: 8px; }
    .btn { padding: 11px 16px; font-size: 0.8rem; }
    .btn-group { gap: 6px; }
    .footer { padding: 4px 0; }
    .footer-text { font-size: 0.55rem; }
    .blackhole { width: 50px; height: 50px; }
    .blackhole-singularity { width: 14px; height: 14px; }
    .info-btn-item { padding: 12px; gap: 10px; }
    .info-btn-icon { width: 38px; height: 38px; }
    .info-btn-icon svg { width: 18px; height: 18px; }
    .info-btn-title { font-size: 0.8rem; }
    .info-btn-desc { font-size: 0.65rem; }
    .info-modal { max-height: 85vh; }
    .info-modal-header { padding: 12px 16px; }
    .info-modal-content { padding: 16px; }
    .info-section h4 { font-size: 0.8rem; }
    .info-section p { font-size: 0.75rem; }
}

@media (max-width: 380px) {
    .container { padding: 6px 10px; }
    .header { padding: 4px 0; }
    .logo { width: 34px; height: 34px; }
    .app-title { font-size: 1.05rem; }
    .card { padding: 10px; }
    .header-nav-btn { 
        position: static; 
        transform: none; 
        margin-top: 4px; 
        animation: fadeInUp 0.5s ease-out 0.4s both; 
    }
    .header-nav-btn .btn-text { display: inline; }
    .header { 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
    }
    .header-nav-btn-left,
    .header-nav-btn-right {
        position: static;
        transform: none;
    }
    .options-grid { grid-template-columns: 1fr; gap: 6px; }
    .info-buttons-container { gap: 8px; }
    .info-btn-item { padding: 10px; }
    .info-btn-icon { width: 34px; height: 34px; }
    .info-btn-icon svg { width: 16px; height: 16px; }
}

@media (max-height: 700px) {
    .header { padding: 4px 0; }
    .logo { width: 32px; height: 32px; margin-bottom: 2px; }
    .app-title { font-size: 1rem; }
    .app-slogan { font-size: 0.55rem; }
    .card { padding: 10px; }
    .card-title { padding-bottom: 6px; margin-bottom: 8px; font-size: 0.8rem; }
    .alert { padding: 6px 8px; margin-bottom: 8px; font-size: 0.65rem; }
    .form-group { margin-bottom: 6px; }
    .form-label { margin-bottom: 3px; font-size: 0.65rem; }
    .form-input, .form-textarea { padding: 8px 10px; }
    .message-input-wrapper { margin-bottom: 6px; }
    .message-input-wrapper .form-textarea { min-height: 100px; }
    .options-section { margin-bottom: 8px; }
    .options-title { margin-bottom: 6px; font-size: 0.6rem; }
    .options-grid { gap: 6px; }
    .btn { padding: 10px 14px; font-size: 0.75rem; }
    .btn-group { gap: 5px; }
    .footer { padding: 3px 0; }
}

@media (max-height: 550px) {
    .app-slogan { display: none; }
    .header-nav-btn { display: none; }
    .logo { width: 28px; height: 28px; animation: none; }
    .app-title { font-size: 0.9rem; }
    .card-title { font-size: 0.75rem; }
    .card::before { display: none; }
    .alert { font-size: 0.6rem; }
    .message-input-wrapper .form-textarea { min-height: 80px; }
    .footer { display: none; }
    .space-objects { display: none; }
    .nebula { animation: none; }
    .info-buttons-container { gap: 6px; }
    .info-btn-item { padding: 8px; }
    .info-btn-icon { width: 30px; height: 30px; }
    .info-btn-title { font-size: 0.75rem; }
    .info-btn-desc { display: none; }
}

@media (orientation: landscape) and (max-height: 500px) {
    .header { padding: 2px 0; }
    .logo { width: 26px; height: 26px; margin-bottom: 0; animation: none; }
    .app-title { font-size: 0.85rem; animation: none; }
    .app-slogan { display: none; }
    .header-nav-btn { display: none; }
    .card { padding: 8px; animation: none; }
    .card::before { display: none; }
    .card-title { padding-bottom: 4px; margin-bottom: 6px; font-size: 0.7rem; }
    .card-title svg { width: 14px; height: 14px; animation: none; }
    .alert { padding: 5px 6px; margin-bottom: 6px; font-size: 0.55rem; animation: none; }
    .alert svg { width: 12px; height: 12px; }
    .form-group { margin-bottom: 4px; animation: none; }
    .form-label { margin-bottom: 2px; font-size: 0.55rem; }
    .form-input, .form-textarea { padding: 6px 8px; font-size: 14px; }
    .message-input-wrapper { margin-bottom: 4px; }
    .message-input-wrapper .form-textarea { min-height: 50px; }
    .options-section { margin-bottom: 4px; animation: none; }
    .options-title { margin-bottom: 4px; font-size: 0.5rem; }
    .options-title svg { animation: none; }
    .options-grid { gap: 4px; }
    .btn { padding: 8px 12px; font-size: 0.7rem; }
    .btn svg { width: 12px; height: 12px; }
    .btn-group { gap: 4px; animation: none; }
    .footer { display: none; }
    .scan-line { display: none; }
    .space-objects { display: none; }
    .nebula { animation: none; }
    .stars-layer-3 { animation: none; }
    .grid-overlay { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { 
        animation-duration: 0.01ms !important; 
        animation-iteration-count: 1 !important; 
        transition-duration: 0.01ms !important; 
    }
    .logo { animation: none; }
    .grid-overlay { animation: none; }
    .stars-layer-1, .stars-layer-2, .stars-layer-3 { animation: none; }
    .nebula { animation: none; }
    .scan-line { display: none; }
    .space-objects { display: none; }
}

@supports (padding: env(safe-area-inset-bottom)) {
    .container {
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
}
