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

:root {
    --depth-black: #0b0b0b;
    --rich-dark: #121212;
    --panel-bg: rgba(18, 18, 18, 0.75);
    --text-primary: #efefef;
    --text-soft: #bbbbbb;
    --accent-steel: #c0c0c0;
    --accent-dim: #7e7e7e;
    --glow: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --error-red: #ff4d4d;
    --success-green: #4caf50;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--depth-black);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.2px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    filter: blur(0.8px) brightness(0.9);
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

.auth-card {
    max-width: 500px;
    width: 100%;
    margin: 20px auto;
    padding: 48px 40px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 48px;
    animation: fadeSlideUp 0.8s ease-out;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.logo-section img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.9;
}

.logo-section h2 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-steel);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#statusMessage {
    color: var(--text-soft);
    font-size: 1.1rem;
    font-weight: 350;
    text-align: center;
    line-height: 1.6;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.error-container.hidden {
    display: none;
}

#errorMessage {
    color: var(--error-red);
    font-size: 1.1rem;
    font-weight: 350;
    text-align: center;
    line-height: 1.6;
}

.btn {
    text-decoration: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 450;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: var(--transition);
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 20px -12px black;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transform: skewX(-15deg) translateX(-100%);
    transition: transform 0.9s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 22px 30px -16px rgba(192, 192, 192, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:hover::before {
    transform: skewX(-15deg) translateX(100%);
}

.btn:active {
    transform: scale(0.98);
    transition: 0.1s;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .auth-card {
        padding: 36px 28px;
        border-radius: 36px;
        margin: 15px auto;
    }

    .logo-section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 28px;
        margin: 10px auto;
    }

    .logo-section {
        gap: 12px;
    }

    .logo-section img {
        width: 40px;
        height: 40px;
    }

    .logo-section h2 {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
}
