@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(70, 198, 255, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(70, 198, 255, 0.6);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #030303;
    color: #e8e8e8;
    font-family: "Inter", sans-serif;
    min-height: 100vh;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow-x: hidden;
}

/* Background Logo - Large, transparent, can overflow edges */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    max-width: 2000px;
    max-height: 2000px;
    background-image: url('../img/d0.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    filter: blur(0.5px);
}

/* Futuristic Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(70, 198, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(70, 198, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    animation: gridPulse 8s ease-in-out infinite;
}

/* Background Logo - Large, transparent, can overflow edges */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    max-width: 2000px;
    max-height: 2000px;
    background-image: url('../img/d0.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    filter: blur(0.5px);
}

/* Animated Scan Line Effect - moved to separate element */
.scan-line-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(70, 198, 255, 0.6) 50%, 
        transparent 100%);
    pointer-events: none;
    z-index: 1;
    animation: scanLine 4s linear infinite;
    box-shadow: 0 0 20px rgba(70, 198, 255, 0.5);
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

@keyframes scanLine {
    0% { 
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% { 
        top: 100vh;
        opacity: 0;
    }
}

a {
    text-decoration: none;
    color: #46c6ff;
    transition: color 0.3s ease;
}

a:hover {
    color: #5ed9ff;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(70, 198, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 70px;
    animation: slideInDown 0.6s ease-out;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
                0 0 1px rgba(70, 198, 255, 0.1) inset;
}

/* Header Scan Line */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(70, 198, 255, 0.5) 50%, 
        transparent 100%);
    animation: headerScan 3s linear infinite;
}

@keyframes headerScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

header .header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
}

header .header-right {
    display: flex;
    align-items: center;
    gap: 30px;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #46c6ff;
    flex-shrink: 0;
}

.logo img.logo-mark {
    height: 35px;
    width: 35px;
    flex-shrink: 0;
    filter: invert(0);
    display: block;
    object-fit: contain;
}

.logo span {
    display: inline-block;
    white-space: nowrap;
    line-height: 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
}

nav {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-shrink: 0;
}

nav a {
    color: #bfcbd2;
    font-weight: 300;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #46c6ff, #5ed9ff);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(70, 198, 255, 0.6);
}

nav a:hover {
    color: #46c6ff;
    text-shadow: 0 0 10px rgba(70, 198, 255, 0.5);
}

nav a:hover::after {
    width: 100%;
}

.nav-separator {
    color: #555;
    font-weight: 300;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
    display: flex;
    gap: 3px;
    align-items: center;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.lang-switcher:hover {
    opacity: 1;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    padding: 2px 5px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    text-transform: uppercase;
    font-family: "Space Grotesk", sans-serif;
    min-width: 22px;
}

.lang-btn:hover {
    color: #46c6ff;
    background: rgba(70, 198, 255, 0.1);
    border-color: rgba(70, 198, 255, 0.3);
    transform: scale(1.1);
}

.lang-btn.active {
    background: rgba(70, 198, 255, 0.15);
    color: #46c6ff;
    border-color: rgba(70, 198, 255, 0.4);
    box-shadow: 0 0 10px rgba(70, 198, 255, 0.3);
    text-shadow: 0 0 8px rgba(70, 198, 255, 0.5);
}

/* HERO */
.hero {
    text-align: center;
    padding: 160px 10vw;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(70, 198, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(70, 198, 255, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(70, 198, 255, 0.03) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(70, 198, 255, 0.02) 100%),
        radial-gradient(ellipse at center, #0a0a0a 0%, #030303 100%);
    border-bottom: 1px solid rgba(70, 198, 255, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Hero Glow Effect */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(70, 198, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.hero h1 {
    font-size: 3.8rem;
    letter-spacing: 8px;
    color: #46c6ff;
    font-weight: 900;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(70, 198, 255, 0.4),
                 0 0 60px rgba(70, 198, 255, 0.2);
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.hero p {
    font-size: 1.2rem;
    color: #c0c0c0;
    max-width: 700px;
    margin: auto;
    letter-spacing: 2px;
    animation: slideInUp 0.8s ease-out 0.4s both;
    line-height: 1.8;
}

/* PUZZLE FRAGMENTS */
.fragment {
    background: linear-gradient(90deg, transparent, rgba(70, 198, 255, 0.15), transparent);
    background-size: 300% 100%;
    color: rgba(70, 198, 255, 0.6);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(70, 198, 255, 0.3);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fragment::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(70, 198, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.fragment:hover::before {
    left: 100%;
}

.fragment:hover {
    color: #46c6ff;
    border-color: #46c6ff;
    background: linear-gradient(90deg, transparent, rgba(70, 198, 255, 0.25), transparent);
    background-size: 300% 100%;
    text-shadow: 0 0 15px rgba(70, 198, 255, 1);
    box-shadow: 
        0 0 25px rgba(70, 198, 255, 0.6),
        0 4px 15px rgba(70, 198, 255, 0.3),
        inset 0 0 10px rgba(70, 198, 255, 0.1);
    animation: scan 2s linear infinite, fragmentGlow 2s ease-in-out infinite;
    transform: translateY(-3px) scale(1.05);
}

@keyframes fragmentGlow {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(70, 198, 255, 0.6),
            0 4px 15px rgba(70, 198, 255, 0.3),
            inset 0 0 10px rgba(70, 198, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 40px rgba(70, 198, 255, 0.9),
            0 6px 20px rgba(70, 198, 255, 0.5),
            inset 0 0 15px rgba(70, 198, 255, 0.2);
    }
}

@keyframes scan {
    0% { background-position: 0%; }
    100% { background-position: 300%; }
}

/* INTEGRITY NODE */
#integrity-node {
    margin: 80px auto;
    padding: 40px;
    width: 380px;
    background: 
        linear-gradient(135deg, 
            rgba(70, 198, 255, 0.08) 0%,
            rgba(10, 10, 10, 0.85) 50%,
            rgba(70, 198, 255, 0.05) 100%);
    backdrop-filter: blur(15px) saturate(180%);
    border-radius: 12px;
    border: 2px solid rgba(70, 198, 255, 0.25);
    color: #bfcbd2;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Space Grotesk", sans-serif;
    animation: scaleIn 0.6s ease-out;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.1) inset,
        0 4px 20px rgba(70, 198, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Integrity Node Corner Accents */
#integrity-node::before,
#integrity-node::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(70, 198, 255, 0.4);
    pointer-events: none;
}

#integrity-node::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

#integrity-node::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

#integrity-node:hover {
    border-color: #46c6ff;
    background: linear-gradient(135deg, 
        rgba(70, 198, 255, 0.15) 0%,
        rgba(10, 10, 10, 0.95) 50%,
        rgba(70, 198, 255, 0.1) 100%);
    box-shadow: 
        0 0 60px rgba(70, 198, 255, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.2) inset,
        0 8px 30px rgba(70, 198, 255, 0.2),
        inset 0 0 30px rgba(70, 198, 255, 0.1);
    transform: translateY(-8px) scale(1.02);
}

#integrity-node:hover::before,
#integrity-node:hover::after {
    border-color: #46c6ff;
    box-shadow: 0 0 10px rgba(70, 198, 255, 0.6);
}

#integrity-node .title {
    font-size: 1rem;
    letter-spacing: 2px;
    color: #46c6ff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

#integrity-node .bar {
    height: 6px;
    margin: 20px 0;
    background: linear-gradient(90deg, #46c6ff 0%, #46c6ff 30%, rgba(70, 198, 255, 0.2) 30%);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(70, 198, 255, 0.2);
}

#integrity-node .bar.waiting::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(70, 198, 255, 0.7), transparent);
    animation: waiting-pulse 2s ease-in-out infinite;
}

@keyframes waiting-pulse {
    0% { left: -100%; }
    100% { left: 100%; }
}

#integrity-node .subtitle {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 1px;
    margin-top: 15px;
}

/* CIPHER ASSEMBLER */
#cipher-assembler {
    max-width: 640px;
    margin: 20px auto 10px;
    padding: 30px;
    background: 
        linear-gradient(135deg, 
            rgba(70, 198, 255, 0.06) 0%,
            rgba(12, 12, 12, 0.9) 50%,
            rgba(70, 198, 255, 0.04) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    border: 2px solid rgba(70, 198, 255, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.1) inset,
        0 4px 20px rgba(70, 198, 255, 0.1);
    text-align: center;
    animation: scaleIn 0.7s ease-out 0.1s both;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Assembler Scan Effect */
#cipher-assembler::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(70, 198, 255, 0.1) 50%,
        transparent 100%);
    animation: assemblerScan 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes assemblerScan {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

#cipher-assembler.hidden {
    display: none;
}

.assembler-title {
    color: #46c6ff;
    letter-spacing: 3px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.assembler-instructions {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.assembler-slots,
.assembler-pieces {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    justify-content: center;
}

.assembler-slot {
    width: 50px;
    height: 50px;
    border: 2px dashed rgba(70, 198, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(5px);
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    animation: fadeIn 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.assembler-slot:hover {
    border-color: #46c6ff;
    box-shadow: 0 0 8px rgba(70,198,255,0.15);
    animation: pulse 1.5s ease-in-out infinite;
}

.assembler-slot.filled {
    border-color: #46c6ff;
    border-style: solid;
    color: #46c6ff;
    background: rgba(70, 198, 255, 0.1);
    box-shadow: 
        0 0 15px rgba(70, 198, 255, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.3) inset,
        0 4px 12px rgba(70, 198, 255, 0.2);
    animation: slotGlow 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(70, 198, 255, 0.8);
}

@keyframes slotGlow {
    0%, 100% { 
        box-shadow: 
            0 0 15px rgba(70, 198, 255, 0.4),
            0 0 0 1px rgba(70, 198, 255, 0.3) inset,
            0 4px 12px rgba(70, 198, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 25px rgba(70, 198, 255, 0.6),
            0 0 0 1px rgba(70, 198, 255, 0.5) inset,
            0 6px 20px rgba(70, 198, 255, 0.4);
    }
}

.assembler-slot.drag-over {
    border-color: #5ed9ff;
    background: rgba(70, 198, 255, 0.1);
    box-shadow: 0 0 15px rgba(70,198,255,0.4);
}

.assembler-piece {
    min-width: 50px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid rgba(70, 198, 255, 0.15);
    border-radius: 8px;
    color: #e8e8e8;
    cursor: grab;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    animation: fadeIn 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.assembler-piece:active {
    cursor: grabbing;
}

.assembler-piece.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.assembler-piece:hover:not(:disabled) {
    border-color: #46c6ff;
    color: #46c6ff;
    background: linear-gradient(135deg, rgba(70, 198, 255, 0.15) 0%, rgba(70, 198, 255, 0.05) 100%);
    box-shadow: 
        0 0 20px rgba(70, 198, 255, 0.4),
        0 4px 12px rgba(70, 198, 255, 0.2),
        inset 0 0 10px rgba(70, 198, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 0 8px rgba(70, 198, 255, 0.6);
    animation: pieceHover 1.5s ease-in-out infinite;
}

@keyframes pieceHover {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(70, 198, 255, 0.4),
            0 4px 12px rgba(70, 198, 255, 0.2),
            inset 0 0 10px rgba(70, 198, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(70, 198, 255, 0.6),
            0 6px 18px rgba(70, 198, 255, 0.3),
            inset 0 0 15px rgba(70, 198, 255, 0.15);
    }
}

.assembler-piece:disabled,
.assembler-piece.used {
    opacity: 0.35;
    cursor: default;
}

.assembler-msg {
    min-height: 20px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #888;
}

.assembler-msg.success {
    color: #46c6ff;
}

.assembler-msg.error {
    color: #ff4c4c;
}

.assembler-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
}

.assembler-btn {
    padding: 10px 30px;
    background: linear-gradient(135deg, rgba(70, 198, 255, 0.1) 0%, rgba(70, 198, 255, 0.05) 100%);
    border: 1px solid rgba(70, 198, 255, 0.4);
    border-radius: 8px;
    color: #46c6ff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.assembler-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(70, 198, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.assembler-btn:hover::before {
    left: 100%;
}

.assembler-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(70, 198, 255, 0.2) 0%, rgba(70, 198, 255, 0.1) 100%);
    box-shadow: 
        0 0 25px rgba(70, 198, 255, 0.5),
        0 4px 12px rgba(70, 198, 255, 0.3),
        inset 0 0 15px rgba(70, 198, 255, 0.1);
    color: #5ed9ff;
    border-color: #5ed9ff;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(70, 198, 255, 0.6);
}

.assembler-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.assembler-btn:disabled {
    opacity: 0.4;
    cursor: default;
    border-color: #666;
    color: #666;
}

.assembler-btn-clear {
    padding: 10px 12px;
    min-width: auto;
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1;
}

/* CONTENT */
.content {
    padding: 80px 60px;
    max-width: 1000px;
    margin: auto;
    background: 
        radial-gradient(ellipse 100% 30% at 50% 0%, rgba(70, 198, 255, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(70, 198, 255, 0.02) 0%,
            rgba(70, 198, 255, 0.01) 50%,
            transparent 100%);
    position: relative;
    z-index: 2;
}

.content h1 {
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: #46c6ff;
    letter-spacing: 3px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    animation: slideInUp 0.8s ease-out 0.2s both;
    text-shadow: 0 0 20px rgba(70, 198, 255, 0.3);
    position: relative;
    padding-bottom: 20px;
}

.content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #46c6ff, transparent);
    border-radius: 2px;
}

.content p {
    line-height: 1.9;
    color: #d0d0d0;
    margin-bottom: 40px;
    font-size: 1.05rem;
    animation: fadeIn 0.8s ease-out 0.3s both;
    padding: 25px 30px;
    background: 
        linear-gradient(90deg, 
            rgba(70, 198, 255, 0.05) 0%,
            rgba(70, 198, 255, 0.02) 100%);
    border-left: 4px solid rgba(70, 198, 255, 0.4);
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.content p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #46c6ff, #5ed9ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content p:hover {
    background: 
        linear-gradient(90deg, 
            rgba(70, 198, 255, 0.1) 0%,
            rgba(70, 198, 255, 0.05) 100%);
    border-left-color: #46c6ff;
    box-shadow: 
        0 0 25px rgba(70, 198, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(4px);
}

.content p:hover::before {
    opacity: 1;
}

/* FOOTER */
footer {
    margin-top: 60px;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid rgba(70, 198, 255, 0.1);
    font-size: 0.85rem;
    letter-spacing: 1px;
    animation: slideInUp 0.8s ease-out 0.3s both;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(70, 198, 255, 0.02) 100%);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(70, 198, 255, 0.5) 50%,
        transparent 100%);
    box-shadow: 0 0 10px rgba(70, 198, 255, 0.3);
}

/* WELCOME OVERLAY */
#welcome-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(70,198,255,0.1), transparent 45%),
                radial-gradient(circle at 70% 70%, rgba(70,198,255,0.08), transparent 45%),
                rgba(0,0,0,0.98);
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: intro-fade-in 0.5s ease-out;
}

#welcome-overlay.welcome-hidden {
    display: none;
}

#welcome-overlay.welcome-fade-out {
    animation: intro-fade-out 0.7s ease-out forwards;
}

.welcome-content {
    text-align: center;
    display: grid;
    gap: 30px;
    place-items: center;
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.welcome-content h2 {
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: #46c6ff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(70, 198, 255, 0.3);
}

.welcome-content p {
    font-size: 1rem;
    color: #a0a0a0;
    letter-spacing: 1px;
}

.welcome-btn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #46c6ff 0%, #5ed9ff 100%);
    border: 2px solid #46c6ff;
    border-radius: 6px;
    color: #000;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    animation: bounce 0.8s ease-in-out 0.8s backwards;
}

.welcome-btn:hover {
    background: linear-gradient(135deg, #5ed9ff 0%, #7fecff 100%);
    box-shadow: 0 0 30px rgba(70, 198, 255, 0.6);
    transform: translateY(-3px);
}

.welcome-btn:active {
    transform: translateY(-1px);
}

/* INTRO OVERLAY */
#intro-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(70,198,255,0.08), transparent 45%),
                radial-gradient(circle at 70% 70%, rgba(70,198,255,0.08), transparent 45%),
                rgba(0,0,0,0.94);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: intro-fade-in 0.5s ease-out;
}

#intro-overlay.intro-hidden {
    display: none;
}

#intro-overlay.intro-fade-out {
    animation: intro-fade-out 0.7s ease-out forwards;
}

.intro-content {
    text-align: center;
    display: grid;
    gap: 12px;
    place-items: center;
}

.intro-logo {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.5));
    animation: scaleIn 0.8s ease-out;
}

.intro-text {
    color: #46c6ff;
    letter-spacing: 10px;
    font-size: 1.4rem;
    font-weight: 900;
    font-family: 'Space Grotesk', sans-serif;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.intro-sub {
    color: #9bb2c2;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes intro-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes intro-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ADMIN FORM */
.input-wrapper {
    margin-top: 30px;
}

input {
    width: 100%;
    padding: 14px;
    background: rgba(12, 12, 12, 0.9);
    color: #e8e8e8;
    border: 1px solid rgba(70, 198, 255, 0.2);
    border-radius: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:focus {
    outline: none;
    border-color: #46c6ff;
    background: rgba(12, 12, 12, 0.95);
    box-shadow: 
        0 0 25px rgba(70, 198, 255, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.3) inset,
        0 4px 12px rgba(70, 198, 255, 0.2);
    transform: translateY(-1px);
}

button {
    margin-top: 20px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #46c6ff 0%, #5ed9ff 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: #000;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    animation: slideInUp 0.8s ease-out 0.3s both;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(70, 198, 255, 0.3),
        0 0 0 1px rgba(70, 198, 255, 0.2) inset;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    background: linear-gradient(135deg, #5ed9ff 0%, #7fecff 100%);
    box-shadow: 
        0 0 30px rgba(70, 198, 255, 0.6),
        0 6px 20px rgba(70, 198, 255, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.3) inset;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: scale(0.98);
}

#msg {
    margin-top: 10px;
    height: 20px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

#msg.error {
    color: #ff4c4c;
}

#msg.success {
    color: #46c6ff;
}

/* ACCESS GRANTED OVERLAY */
#access-granted-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: overlay-fade-in 0.5s ease-out;
}

#access-granted-overlay.fade-out {
    animation: overlay-fade-out 0.8s ease-out forwards;
}

@keyframes overlay-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes overlay-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.access-granted-content {
    text-align: center;
    animation: access-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes access-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.access-icon {
    font-size: 5rem;
    color: #46c6ff;
    margin-bottom: 30px;
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(70, 198, 255, 0.5),
                     0 0 40px rgba(70, 198, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 30px rgba(70, 198, 255, 0.8),
                     0 0 60px rgba(70, 198, 255, 0.5);
    }
}

.access-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
    color: #46c6ff;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 40px;
    text-shadow: 0 0 30px rgba(70, 198, 255, 0.5);
    animation: title-pulse 1.5s ease-in-out;
}

@keyframes title-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ADVANCED PUZZLE SYSTEM */
.puzzle-container {
    background: 
        linear-gradient(135deg, 
            rgba(70, 198, 255, 0.08) 0%, 
            rgba(10, 10, 10, 0.92) 50%,
            rgba(70, 198, 255, 0.05) 100%);
    backdrop-filter: blur(15px) saturate(180%);
    border: 2px solid rgba(70, 198, 255, 0.3);
    border-radius: 12px;
    padding: 50px;
    margin: 50px auto;
    max-width: 700px;
    animation: scaleIn 0.6s ease-out;
    box-shadow: 
        0 0 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.15) inset,
        0 8px 30px rgba(70, 198, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.puzzle-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(70, 198, 255, 0.6) 50%,
        transparent 100%);
    animation: puzzleScan 3s linear infinite;
}

@keyframes puzzleScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.puzzle-container h2 {
    color: #46c6ff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-shadow: 0 0 15px rgba(70, 198, 255, 0.3);
    text-align: center;
}

.puzzle-instruction {
    color: #d0d0d0;
    font-size: 1.1rem;
    margin: 25px 0;
    line-height: 1.8;
}

.puzzle-text {
    background: rgba(0, 0, 0, 0.5);
    border-left: 4px solid #46c6ff;
    padding: 30px;
    margin: 30px 0;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: #46c6ff;
    border-radius: 4px;
    text-align: center;
    word-break: break-all;
}

.puzzle-input {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.puzzle-input input {
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    color: #46c6ff;
    border: 1px solid rgba(70, 198, 255, 0.3);
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.puzzle-input input:focus {
    outline: none;
    background: rgba(70, 198, 255, 0.12);
    border-color: #46c6ff;
    box-shadow: 
        0 0 25px rgba(70, 198, 255, 0.5),
        0 0 0 1px rgba(70, 198, 255, 0.3) inset,
        0 4px 12px rgba(70, 198, 255, 0.3);
    transform: translateY(-1px);
}

.puzzle-input button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #46c6ff 0%, #5ed9ff 100%);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    box-shadow: 
        0 4px 15px rgba(70, 198, 255, 0.3),
        0 0 0 1px rgba(70, 198, 255, 0.2) inset;
    position: relative;
    overflow: hidden;
}

.puzzle-input button:hover {
    background: linear-gradient(135deg, #5ed9ff 0%, #7fecff 100%);
    box-shadow: 
        0 0 30px rgba(70, 198, 255, 0.6),
        0 6px 20px rgba(70, 198, 255, 0.4),
        0 0 0 1px rgba(70, 198, 255, 0.3) inset;
    transform: translateY(-3px) scale(1.02);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.puzzle-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.puzzle-feedback {
    margin-top: 20px;
    font-size: 1.1rem;
    text-align: center;
    min-height: 30px;
    animation: fadeIn 0.4s ease;
}

#freq-feedback, #pattern-feedback, #cipher-feedback, 
#sequence-feedback, #morse-feedback, #memory-feedback {
    margin-top: 15px;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Memory Puzzle Styles */
#memory-wrapper {
    margin: 30px 0;
}

#memory-sequence {
    position: relative;
    z-index: 1;
}

#memory-start-btn {
    transition: all 0.3s ease;
}

#memory-start-btn:active {
    transform: scale(0.98);
}

#memory-timer {
    font-family: 'Space Grotesk', monospace;
    animation: pulse 1s infinite;
}

.access-code {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 12px;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 30px;
    text-shadow: 0 0 40px rgba(70, 198, 255, 0.8),
                 0 0 80px rgba(70, 198, 255, 0.4);
    animation: code-reveal 1s ease-out 0.5s backwards;
}

@keyframes code-reveal {
    from {
        opacity: 0;
        letter-spacing: 30px;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        letter-spacing: 12px;
        filter: blur(0);
    }
}

.access-subtitle {
    font-size: 1rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    animation: subtitle-fade 1s ease-out 1s backwards;
}

@keyframes subtitle-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        padding: 20px 30px;
        flex-direction: column;
        gap: 20px;
    }

    nav {
        gap: 20px;
    }

    .hero {
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .content {
        padding: 60px 30px;
    }
    
    .access-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .access-code {
        font-size: 2rem;
        letter-spacing: 6px;
    }
    
    .access-icon {
        font-size: 3rem;
    }
}
