/* Page 4 - CTF Challenge */
.page-4 {
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Binary Rain */
.binary-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.binary-drop {
    position: absolute;
    top: -50px;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: #00d4aa;
    opacity: 0.3;
    animation: fall linear forwards;
    letter-spacing: 0.1em;
    white-space: pre-line;
    line-height: 1.4;
    text-align: center;
}

@keyframes fall {
    0% {
        top: -50px;
        opacity: 0.4;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Centered Logo Container */
.ctf-logo-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

/* Cyberpunk Title */
.ctf-title-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: #00d4aa;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow:
        0 0 8px rgba(0, 212, 170, 0.3),
        0 0 15px rgba(0, 212, 170, 0.2);
    animation: cyber-glow 5s ease-in-out infinite;
}

@keyframes cyber-glow {
    0%, 100% {
        text-shadow:
            0 0 8px rgba(0, 212, 170, 0.3),
            0 0 15px rgba(0, 212, 170, 0.2);
    }
    50% {
        text-shadow:
            0 0 12px rgba(0, 212, 170, 0.4),
            0 0 20px rgba(0, 212, 170, 0.25);
    }
}

/* Main Logo */
.ctf-main-logo {
    width: 400px;
    height: auto;
    max-width: 80vw;
}

/* Description Text */
.ctf-description {
    margin: 2rem auto 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1rem;
    color: #00d4aa;
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

/* Interactive Prompt */
.ctf-interactive-prompt {
    margin-top: 2.5rem;
    text-align: center;
}

.prompt-question {
    font-family: 'Fira Code', monospace;
    font-size: 1.125rem;
    color: #00d4aa;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.prompt-input-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1rem;
    border: 1px solid #00d4aa;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
}

.prompt-symbol {
    font-family: 'Fira Code', monospace;
    font-size: 1.125rem;
    color: #00d4aa;
}

.ctf-text-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 1.125rem;
    color: #00d4aa;
    width: 200px;
    caret-color: transparent;
}

.input-cursor {
    color: #00d4aa;
    font-family: 'Fira Code', monospace;
    font-size: 1.125rem;
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.prompt-hint {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(0, 212, 170, 0.4);
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
}

.prompt-error {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: #ff4444;
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.prompt-error.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .ctf-title-text {
        font-size: 1.8rem;
        letter-spacing: 0.2em;
    }

    .ctf-main-logo {
        width: 300px;
    }

    .ctf-terminal {
        font-size: 0.875rem;
        max-width: 90%;
    }

    .ctf-cta-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}
