:root {
    --primary-purple: #9d4edd;
    --secondary-purple: #7b2cbf;
    --dark-purple: #5a189a;
    --light-purple: #c77dff;
    --glow-purple: #9d4edd;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-light: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #333333;
    --success-color: #10b981;
    --error-color: #ef4444;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
    background-size: 100px 100px;
    z-index: -1;
    animation: stars 20s linear infinite;
}

@keyframes stars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 
        0 20px 60px rgba(157, 78, 221, 0.15),
        0 0 0 1px rgba(157, 78, 221, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(157, 78, 221, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.arc-reactor {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
    border: 3px solid var(--primary-purple);
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    box-shadow: 
        0 0 20px var(--glow-purple),
        inset 0 0 20px rgba(157, 78, 221, 0.3);
    animation: reactor-pulse 2s ease-in-out infinite alternate;
}

.arc-reactor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--primary-purple);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--glow-purple);
}

@keyframes reactor-pulse {
    0% { 
        box-shadow: 
            0 0 20px var(--glow-purple),
            inset 0 0 20px rgba(157, 78, 221, 0.3);
    }
    100% { 
        box-shadow: 
            0 0 40px var(--glow-purple),
            inset 0 0 30px rgba(157, 78, 221, 0.5);
    }
}

.logo-container h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    text-shadow: 0 0 10px var(--glow-purple);
}

.logo-container p {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-form {
    transition: all 0.3s ease;
}

.auth-form.hidden {
    display: none;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.glow-button {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(45deg, var(--secondary-purple), var(--primary-purple));
    border: none;
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.glow-button:hover,
.glow-button:focus {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(157, 78, 221, 0.4),
        0 0 30px rgba(157, 78, 221, 0.3);
}

.glow-button:active {
    transform: translateY(0);
}

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

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

.link-button {
    background: none;
    border: none;
    color: var(--primary-purple);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.link-button:hover {
    color: var(--light-purple);
}

.code-timer {
    text-align: center;
    margin: 15px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.status-message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .arc-reactor {
        width: 60px;
        height: 60px;
    }
    
    .logo-container h1 {
        font-size: 24px;
    }
}

/* Touch devices - enhance glow effects */
@media (hover: none) and (pointer: coarse) {
    .glow-button:active {
        transform: scale(0.98);
        box-shadow: 
            0 8px 25px rgba(157, 78, 221, 0.5),
            0 0 40px rgba(157, 78, 221, 0.4);
    }
}