* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

:root {
    --black-0: #000000;
    --black-1: #080808;
    --black-2: #0e0e0e;
    --black-3: #141414;
    --black-4: #1a1a1a;
    --graphite-1: #222222;
    --graphite-2: #2a2a2a;
    --graphite-3: #333333;
    --graphite-4: #3a3a3a;
    --silver-1: #c0c0c0;
    --silver-2: #d0d0d0;
    --silver-3: #e0e0e0;
    --silver-4: #f0f0f0;
    --white: #ffffff;
    --glow-effect: rgba(255, 255, 255, 0.03);
    --glass-bg: rgba(15, 15, 15, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-silver: linear-gradient(135deg, var(--silver-2) 0%, var(--white) 100%);
    --gradient-silver-vertical: linear-gradient(to bottom, var(--silver-3) 0%, var(--white) 100%);
    --gradient-silver-horizontal: linear-gradient(to right, var(--silver-3) 0%, var(--white) 100%);
    --gradient-dark: linear-gradient(135deg, var(--black-1) 0%, var(--black-3) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.15) 100%);
    --gradient-glass-dark: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    --diamond-gradient: linear-gradient(135deg, rgba(220,220,220,0.8) 0%, rgba(255,255,255,0.9) 50%, rgba(220,220,220,0.8) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--black-0);
    color: var(--silver-2);
    overflow-x: hidden;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    background: var(--gradient-dark);
    background-attachment: fixed;
    will-change: transform, opacity;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-container {
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, box-shadow;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glass);
    opacity: 0.3;
    z-index: -1;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, box-shadow;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glass);
    opacity: 0.3;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Clash Display', sans-serif;
    font-weight: 500;
    letter-spacing: -0.5px;
    background: var(--gradient-silver);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(255,255,255,0.1);
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    color: var(--silver-3);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-field input {
    padding: 15px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--silver-3);
    font-family: 'Inter', sans-serif;
    width: 100%;
    transition: all 0.3s ease;
}

.form-field input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.field-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--silver-3);
    color: var(--silver-3);
    font-size: 0.9rem;
    text-align: center;
}

.alert-danger {
    background: rgba(255, 77, 77, 0.1);
    border-left: 3px solid #ff4d4d;
}

.alert-success {
    background: rgba(77, 255, 77, 0.1);
    border-left: 3px solid #4dff4d;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 42px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    background: transparent;
    color: var(--silver-3);
    border: 1px solid var(--silver-2);
    box-shadow: 0 0 15px var(--glow-effect);
    opacity: 1;
    transform: translateY(0);
    z-index: 1;
    will-change: transform, box-shadow;
    width: 100%;
    margin-top: 10px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.btn:hover {
    color: var(--silver-4);
    box-shadow: 0 0 25px var(--glow-effect);
    transform: translateY(-3px) !important;
}

.btn:hover::before {
    left: 100%;
}

.btn i {
    margin-right: 10px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 100%);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.25) 100%);
}

.btn-secondary {
    background: rgba(25, 25, 25, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--silver-3);
}

.btn-secondary:hover {
    background: rgba(40, 40, 40, 0.8);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.forgot-password {
    color: var(--silver-3);
    text-align: center;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--silver-4);
}

.auth-links {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-links p {
    color: var(--silver-2);
}

.auth-links a {
    color: var(--silver-3);
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--silver-4);
}

/* Error list styling */
.errorlist {
    list-style: none;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Form paragraph styling (for Django's form.as_p) */
.auth-form p {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-form p label {
    color: var(--silver-3);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form p input {
    padding: 15px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--silver-3);
    font-family: 'Inter', sans-serif;
    width: 100%;
    transition: all 0.3s ease;
}

.auth-form p input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.auth-form .errorlist {
    list-style: none;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Referral info styles */
.referral-info {
    color: var(--silver-2);
}

.referral-info h3, .referral-info h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--silver-3);
}

.referral-info ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.referral-info ul ul {
    margin-top: 10px;
    margin-bottom: 10px;
}

.referral-info li {
    margin-bottom: 8px;
}

.referral-info strong {
    color: var(--silver-3);
}

/* Resend email styles */
.resend-email {
    margin-top: 20px;
    text-align: center;
}

.resend-email a {
    color: var(--silver-3);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.resend-email a:hover {
    color: var(--silver-4);
}

#countdown {
    color: var(--silver-2);
    margin-top: 10px;
}

/* Cookie Banner Styles */
.cookie-banner-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.cookie-banner-content {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    max-width: 800px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-content p {
    margin: 0;
    color: #e0e0e0;
    line-height: 1.4;
    flex: 1;
}

.cookie-banner-content form {
    margin: 0;
}

.cookie-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    border: none;
    outline: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 100%);
    border: 1px solid rgba(255,255,255,0.3);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 30px 20px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 0.8rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .cookie-banner-container {
        padding: 10px;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-banner-content .btn {
        width: 100%;
    }
}