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

:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-2: #1a1a2e;
    --border: #2a2a3e;
    --text: #e8e8f0;
    --text-dim: #8888a0;
    --accent: #c8a45c;
    --accent-glow: rgba(200, 164, 92, 0.15);
    --error: #ff4757;
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(200, 164, 92, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(200, 164, 92, 0.04) 0%, transparent 60%);
}

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

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 36px 36px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

.brand {
    text-align: center;
    margin-bottom: 36px;
}

.logo {
    margin-bottom: 16px;
}

.brand h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 6px;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group input::placeholder {
    color: var(--text-dim);
    opacity: 0.5;
}

.toggle-pwd {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s;
}

.toggle-pwd:hover {
    color: var(--text);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #b8943e 100%);
    color: #0a0a0f;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text.hidden, .spinner.hidden {
    display: none;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error {
    text-align: center;
    font-size: 13px;
    color: var(--error);
    padding: 10px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.error.hidden {
    display: none;
}

.footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 28px;
    opacity: 0.6;
}

/* Particles background decoration */
.login-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(200, 164, 92, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
