/* Modern Crypto/Hacker Theme - Matrix/Terminal Aesthetic */

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

:root {
    --matrix-green: #00ff41;
    --dark-bg: #0d0d0d;
    --panel-bg: #1a1a1a;
    --border-color: #00ff4133;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-muted: #66ff88;
    --error-red: #ff1744;
    --success-green: #00ff41;
}

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 0%, transparent 95%, var(--border-color) 95%, var(--border-color) 100%),
        linear-gradient(transparent 0%, transparent 95%, var(--border-color) 95%, var(--border-color) 100%);
    background-size: 50px 50px;
    opacity: 0.1;
    z-index: 0;
    animation: matrixScroll 20s linear infinite;
}

@keyframes matrixScroll {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styling */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo svg {
    filter: drop-shadow(0 0 8px var(--matrix-green));
}

.logo-text h1 {
    font-size: 24px;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--matrix-green);
    margin: 0;
}

.logo-text .version {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--success-green); }
    50% { opacity: 0.5; box-shadow: 0 0 4px var(--success-green); }
}

.status-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Login Panel */
.login-panel, .success-panel {
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.panel-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.panel-header h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 0 8px var(--matrix-green);
}

.panel-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Error Message */
.error-message {
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid var(--error-red);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--error-red);
    font-size: 13px;
}

/* Form Styling */
.login-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-icon {
    filter: drop-shadow(0 0 4px var(--matrix-green));
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 255, 65, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--matrix-green);
    background: rgba(0, 255, 65, 0.05);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

.form-group input::placeholder {
    color: rgba(0, 255, 65, 0.3);
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(0, 204, 51, 0.1));
    border: 2px solid var(--matrix-green);
    border-radius: 4px;
    color: var(--matrix-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-button:hover::before {
    width: 300px;
    height: 300px;
}

.login-button:hover {
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.button-icon {
    position: relative;
    z-index: 1;
}

/* Security Footer */
.security-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Success Panel */
.success-panel .panel-body {
    padding: 20px 0;
}

.info-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 14px;
}

.encrypted-flag-container {
    background: rgba(0, 255, 65, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.encryption-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 11px;
    color: #ffc107;
    font-weight: bold;
    text-transform: uppercase;
}

.flag-display {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
    margin: 15px 0;
}

.flag-display pre {
    color: var(--matrix-green);
    font-size: 16px;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin: 0;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

.challenge-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 15px 0 0 0;
    line-height: 1.6;
}

.challenge-hint strong {
    color: var(--text-secondary);
}

/* Info Panel */
.info-panel {
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.info-panel h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: bold;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 2px solid var(--border-color);
    background: var(--panel-bg);
    border-radius: 8px;
}

.footer p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .logo-text h1 {
        font-size: 20px;
    }
}

/* Scan line effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 255, 65, 0.02) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    animation: scan 8s linear infinite;
    z-index: 999;
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}