:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --error-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-card: #242b3d;
    --text-primary: #ffffff;
    --text-secondary: #a0a9c0;
    --text-muted: #6b7280;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(102, 126, 234, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(600px circle at 20% 30%, rgba(102, 126, 234, 0.15), transparent),
        radial-gradient(800px circle at 80% 70%, rgba(118, 75, 162, 0.15), transparent),
        radial-gradient(600px circle at 40% 80%, rgba(79, 172, 254, 0.1), transparent);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(20px); }
}

.container {
    max-width: 500px;
    width: 100%;
}

.login-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.form-section {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--text-secondary);
}

.key-input-wrapper {
    position: relative;
}

.key-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: monospace;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
}

.key-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.key-input::placeholder {
    color: var(--text-muted);
    letter-spacing: normal;
    text-transform: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.key-input.error {
    border-color: #ff6b6b;
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.error-message {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 0.9rem;
    animation: shake 0.5s ease-out;
}

.error-message.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.success-message {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 8px;
    color: #4facfe;
    font-size: 0.9rem;
}

.success-message.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.loading {
    display: none;
}

.btn.loading .normal-text {
    display: none;
}

.btn.loading .loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.info-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.info-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

/* Extracted inline styles */
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}