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

/* Scrollbar styling - WebKit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.8);
}

::-webkit-scrollbar-thumb:active {
    background: #00d9ff;
}

/* Scrollbar styling - Firefox */
* {
    scrollbar-color: rgba(0, 217, 255, 0.5) rgba(0, 0, 0, 0.2);
    scrollbar-width: thin;
}

html {
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 127, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card,
.mfa-card,
.success-card,
.mfa-setup-card {
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

.mfa-card,
.success-card,
.mfa-setup-card {
    display: none;
}

.mfa-card.hidden,
.success-card.hidden,
.mfa-setup-card.hidden {
    display: none;
}

.mfa-card:not(.hidden),
.success-card:not(.hidden),
.mfa-setup-card:not(.hidden) {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo svg {
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d9ff 0%, #ff007f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00d9ff;
}

.subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #00d9ff;
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.2);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #666;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff 0%, #0099cc 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(0, 217, 255, 0.1);
    color: #00d9ff;
    border: 1px solid rgba(0, 217, 255, 0.3);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.demo-creds {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    font-size: 0.85rem;
    color: #888;
}

.demo-creds p {
    margin-bottom: 0.5rem;
}

.demo-creds code {
    background: rgba(0, 217, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    color: #00d9ff;
    font-family: 'Courier New', monospace;
}

.success-card {
    text-align: center;
}

.success-card textarea {
    margin: 1rem 0;
    background: rgba(0, 217, 255, 0.05);
    border-color: rgba(0, 217, 255, 0.3);
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .login-card,
    .mfa-card,
    .success-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}
