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

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    color: #00ff00;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.6;
}

.terminal-wrapper {
    width: 100%;
    max-width: 1000px;
    border: 3px solid #00ff00;
    background: #0a0a0a;
    box-shadow: 0 0 20px #00ff00, inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.terminal-header {
    background: #000000;
    border-bottom: 2px solid #00ff00;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.terminal-status {
    color: #ff0000;
    font-weight: bold;
    text-shadow: 0 0 10px #ff0000;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.terminal-content {
    padding: 2rem;
}

.header-image {
    text-align: center;
    margin-bottom: 2rem;
}

.header-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    margin: 0 auto;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 60%, rgba(0,0,0,0.5) 85%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 60%, rgba(0,0,0,0.5) 85%, rgba(0,0,0,0) 100%);
}

.access-denied {
    text-align: center;
    margin-bottom: 2rem;
}

.ascii-art {
    color: #ff0000;
    font-size: 0.6rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 5px #ff0000;
    overflow-x: auto;
}

.system-message {
    margin-top: 1rem;
}

.error-code {
    color: #ff00ff;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.main-message {
    color: #ff0000;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #ff0000;
}

.sub-message {
    color: #00ffff;
    font-size: 1rem;
}

.challenge-info {
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid #00ff00;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    color: #00ffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px #00ffff;
    border-bottom: 2px solid #00ffff;
    padding-bottom: 0.5rem;
}

.challenge-info p {
    margin-bottom: 0.5rem;
    color: #00ff00;
}

.code-inputs {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    color: #ffff00;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-shadow: 0 0 3px #ffff00;
}

.code-input {
    width: 100%;
    background: #000000;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 0.8rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.code-input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
    background: rgba(0, 255, 255, 0.05);
}

.code-input::placeholder {
    color: #004400;
}

.submit-btn {
    width: 100%;
    background: #000000;
    border: 3px solid #00ff00;
    color: #00ff00;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px #00ff00;
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px #00ff00;
}

.submit-btn:active {
    transform: scale(0.98);
}

.feedback {
    min-height: 60px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    font-weight: bold;
    text-align: center;
}

.feedback.error {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.feedback.success {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    animation: successPulse 1s infinite;
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 5px #00ff00; }
    50% { box-shadow: 0 0 20px #00ff00; }
}

.hints {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid #00ffff;
    padding: 1.5rem;
    margin-top: 2rem;
}

.log-entry {
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-left: 3px solid #00ffff;
    padding-left: 1rem;
}

.timestamp {
    color: #ff00ff;
    margin-right: 1rem;
}

.log-text {
    color: #00ffff;
}

.terminal-footer {
    background: #000000;
    border-top: 2px solid #00ff00;
    padding: 1rem;
    text-align: center;
    color: #00ff00;
    font-size: 0.9rem;
}

.terminal-footer span {
    margin: 0 0.5rem;
}

.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.success-modal.active {
    display: flex;
}

.success-content {
    background: #0a0a0a;
    border: 3px solid #00ff00;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 30px #00ff00;
    margin: auto;
}

.success-content h2 {
    color: #00ff00;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ff00;
}

.success-content p {
    color: #00ffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.success-ascii {
    color: #00ff00;
    font-size: 0.7rem;
    margin: 2rem 0;
    white-space: pre;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .terminal-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .header-image img {
        max-height: 300px;
    }
    
    .ascii-art {
        font-size: 0.4rem;
    }
    
    .terminal-content {
        padding: 1rem;
    }
    
    .main-message {
        font-size: 1.1rem;
    }
    
    .success-content {
        padding: 2rem 1.5rem;
    }
    
    .success-content h2 {
        font-size: 1.5rem;
    }
    
    .success-content p {
        font-size: 1rem;
    }
    
    .success-ascii {
        font-size: 0.45rem;
    }
}

@media (max-width: 480px) {
    .header-image img {
        max-height: 250px;
    }
    
    .ascii-art {
        font-size: 0.3rem;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    body {
        padding: 0.5rem;
    }
    
    .success-modal {
        padding: 0.5rem;
    }
    
    .success-content {
        padding: 1.5rem 1rem;
        border-width: 2px;
    }
    
    .success-content h2 {
        font-size: 1.2rem;
    }
    
    .success-content p {
        font-size: 0.9rem;
    }
    
    .success-ascii {
        font-size: 0.35rem;
        margin: 1rem 0;
    }
}
