/* Cyberpunk Theme CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    min-height: 100vh;
}

.cyberpunk-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Animated background grid */
.cyber-grid {
    position: fixed;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
    z-index: -1;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Terminal header container */
.glitch-container {
    text-align: left;
    max-width: 800px;
    margin-left: 0;
    margin-right: 0;
}

/* Cryptic subtitle styling */
.subtitle-container {
    text-align: left;
    margin-bottom: 10px;
    padding: 0 20px;
    margin-left: 0;
    margin-right: 0;
}

.cryptic-subtitle {
    color: #00ff00;
    font-size: clamp(1rem, 3vw, 1.3rem);
    text-shadow: 
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 2px #00ff00;
    margin: 10px 0;
    font-weight: 500;
    letter-spacing: 0.05em;
    animation: subtitle-glow 3s ease-in-out infinite alternate;
}

.cryptic-subtitle-log {
    color: #00d9ff;
    font-size: clamp(1rem, 3vw, 1.3rem);
    text-shadow: 
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 2px #00d9ff;
    margin: 10px 0;
    font-weight: 500;
    letter-spacing: 0.05em;
    animation: subtitle-glow 3s ease-in-out infinite alternate;
}

.cryptic-subtitle-secondary {
    color: #0080ff;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin: 8px 0;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: 
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 2px #0080ff;
}

.cryptic-subtitle-tertiary {
    color: #00ffff;
    font-size: clamp(0.8rem, 2vw, 1rem);
    margin: 8px 0;
    font-style: bold;
    letter-spacing: 0.03em;
    opacity: 0.9;
    text-shadow: 
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 2px #00ffff;
    animation: tertiary-pulse 4s ease-in-out infinite alternate;
}

@keyframes tertiary-pulse {
    0% { 
        opacity: 0.7;
        text-shadow: 
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            0 0 2px #00ffff;
    }
    100% { 
        opacity: 1;
        text-shadow: 
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            0 0 4px #00ffff,
            0 0 8px rgba(0, 255, 255, 0.3);
    }
}

@keyframes subtitle-glow {
    0% { 
        text-shadow: 
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            0 0 2px #00ff00;
    }
    100% { 
        text-shadow: 
            1px 1px 0 #000,
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px 1px 0 #000,
            0 0 4px #00ff00,
            0 0 8px rgba(0, 255, 0, 0.3);
    }
}

.glitch {
    font-family: 'Courier New', monospace;
    font-size: clamp(1.8rem, 7vw, 3.5rem);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    color: #00ff00;
    text-shadow: 0 0 3px #00ff00;
    display: inline-block;
}

.glitch::after {
    content: '_';
    color: #00ff00;
    animation: terminal-cursor 1s infinite;
    margin-left: 2px;
}

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

/* Error page specific terminal style */
.error-glitch {
    color: #ff0000;
    text-shadow: 0 0 3px #ff0000;
}

.error-glitch::after {
    color: #ff0000;
}

.error-code {
    font-size: clamp(3rem, 12vw, 8rem);
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000;
    margin-top: 20px;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* CTF page specific terminal style */
.ctf-glitch {
    color: #00ffff;
    text-shadow: 0 0 3px #00ffff;
}

.ctf-glitch::after {
    color: #00ffff;
}

/* Logo styling */
.logo-container {
    margin: 40px 0;
    position: relative;
}

.logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px #00ff00);
    animation: logo-glow 3s ease-in-out infinite alternate;
}

@keyframes logo-glow {
    0% { filter: drop-shadow(0 0 10px #00ff00); }
    100% { filter: drop-shadow(0 0 20px #00ff00) drop-shadow(0 0 30px #00ff00); }
}

/* Error page logo */
.error-page .logo {
    filter: drop-shadow(0 0 10px #ff0000);
    animation: logo-glow-error 3s ease-in-out infinite alternate;
}

@keyframes logo-glow-error {
    0% { filter: drop-shadow(0 0 10px #ff0000); }
    100% { filter: drop-shadow(0 0 20px #ff0000) drop-shadow(0 0 30px #ff0000); }
}

/* CTF page logo */
.ctf-page .logo {
    filter: drop-shadow(0 0 10px #00ffff);
    animation: logo-glow-ctf 3s ease-in-out infinite alternate;
}

@keyframes logo-glow-ctf {
    0% { filter: drop-shadow(0 0 10px #00ffff); }
    100% { filter: drop-shadow(0 0 20px #00ffff) drop-shadow(0 0 30px #00ffff); }
}

/* Text styling */
.neon-text {
    color: #00ff00;
    text-shadow: 
        0 0 3px #00ff00,
        0 0 6px #00ff00;
    font-size: clamp(1rem, 4vw, 1.5rem);
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
}

.sub-text {
    color: #888;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    text-align: center;
    margin: 10px 0;
    line-height: 1.6;
}

/* CTF content */
.ctf-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    margin: 40px auto;
    padding: 0 20px;
}

.ctf-text {
    color: #00ffff;
    text-shadow: 
        0 0 3px #00ffff,
        0 0 6px #00ffff;
    margin: 30px 0;
    font-weight: 500;
}

.ctf-subtext {
    color: #aaa;
    margin: 20px 0;
}

/* Challenge description styling */
.challenge-description {
    color: #cccccc;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin: 20px 0;
    line-height: 1.6;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(0, 255, 255, 0.3);
    padding: 15px 20px 15px 35px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    position: relative;
}

.challenge-description::before {
    content: '$';
    position: absolute;
    left: 12px;
    top: 15px;
    color: #00ffff;
    font-weight: bold;
    font-size: 1.1em;
}

/* Challenge code styling */
.challenge-code {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 4px;
    padding: 12px 16px;
    margin: 25px 0;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: normal;
    color: #00ff00;
    text-align: left;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.challenge-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #00ff00;
}

/* Error message */
.error-message {
    text-align: center;
    margin: 40px 0;
}

/* Cyber buttons */
.cyber-button {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 20px 10px;
}

/* CTF button specific styling */
.ctf-button {
    border-color: #ff00ff;
    color: #ff00ff;
}

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

.cyber-button:hover::before {
    left: 100%;
}

.cyber-button:hover {
    box-shadow: 
        0 0 10px #00ff00,
        inset 0 0 10px rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 5px #00ff00;
}

.ctf-button:hover {
    box-shadow: 
        0 0 10px #ff00ff,
        inset 0 0 10px rgba(255, 0, 255, 0.1);
    text-shadow: 0 0 5px #ff00ff;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.nav-button {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* Neon border */
.neon-border {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #00ff00;
    pointer-events: none;
    animation: border-flicker 3s infinite;
    z-index: -1;
}

.error-border {
    border-color: #ff0000;
    animation: border-flicker-error 3s infinite;
}

.ctf-border {
    border-color: #00ffff;
    animation: border-flicker-ctf 3s infinite;
}

@keyframes border-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes border-flicker-error {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes border-flicker-ctf {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ff00;
    border-radius: 50%;
    animation: float 6s infinite linear;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 4s;
    animation-duration: 5s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cyberpunk-container {
        padding: 20px 15px;
    }
    
    .glitch {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }
    
    .error-code {
        font-size: clamp(2rem, 10vw, 6rem);
    }
    
    .logo {
        max-width: 150px;
    }
    
    .cyber-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .nav-container {
        top: 15px;
        right: 15px;
    }
    
    .nav-button {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .ctf-content {
        margin: 20px 0;
    }
    
    .neon-text {
        font-size: clamp(0.9rem, 3.5vw, 1.3rem);
    }
    
    .sub-text {
        font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    }
    
    .glitch-container {
        padding: 0 15px 0 30px;
    }
    
    .subtitle-container {
        padding: 0 15px;
        margin-bottom: 15px;
    }
    
    .challenge-description {
        margin: 15px 0;
        padding: 12px 15px 12px 30px;
    }
    
    .challenge-code {
        margin: 20px 0;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .cyberpunk-container {
        padding: 15px 10px;
    }
    
    .glitch {
        font-size: clamp(1.2rem, 5vw, 2.5rem);
    }
    
    .error-code {
        font-size: clamp(1.5rem, 8vw, 4rem);
    }
    
    .logo {
        max-width: 120px;
    }
    
    .cyber-button {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .nav-container {
        top: 10px;
        right: 10px;
    }
    
    .nav-button {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .glitch-container {
        padding: 0 10px 0 25px;
    }
    
    .subtitle-container {
        padding: 0 10px;
        margin-bottom: 12px;
    }
    
    .challenge-description {
        margin: 12px 0;
        padding: 10px 12px 10px 25px;
    }
    
    .challenge-code {
        margin: 15px 0;
        padding: 8px 10px;
    }
}
