/* ================================================================
   JOLLY GRID - AUTHENTICATION PAGES
   Premium 2026 styling with Light/Dark theme support
   Animated backgrounds, floating orbs, glassmorphism effects
   Uses global theme-variables.css for consistent theming
   ================================================================ */

/* ===== AUTH-SPECIFIC VARIABLES ===== */
:root,
[data-theme="dark"] {
    /* Auth page specific sizing */
    --auth-container-max-width: 440px;
    --auth-border-radius: 24px;
    --auth-input-radius: 14px;
    --auth-button-radius: 14px;
    
    /* Auth spacing */
    --auth-spacing-xs: 0.5rem;
    --auth-spacing-sm: 1rem;
    --auth-spacing-md: 1.5rem;
    --auth-spacing-lg: 2.5rem;
    
    /* Typography */
    --font-family-base: 'Nunito', sans-serif;
    --font-family-decorative: 'Quicksand', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.85rem;
    --font-size-base: 0.95rem;
    --font-size-lg: 1.15rem;
    --font-size-xl: 1.85rem;
    
    /* Auth-specific colors for dark mode */
    --auth-bg: var(--bg-primary);
    --auth-card-bg: rgba(15, 15, 35, 0.75);
    --auth-input-bg: rgba(30, 30, 60, 0.6);
    --auth-input-border: rgba(139, 92, 246, 0.2);
    --auth-text-primary: var(--text-primary);
    --auth-text-secondary: var(--text-secondary);
    --auth-text-muted: var(--text-muted);
    --auth-link-color: var(--accent-pink);
    --auth-link-hover: var(--accent-purple);
    --auth-border-color: rgba(139, 92, 246, 0.15);
    --auth-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --auth-card-border: rgba(255, 255, 255, 0.08);
    
    /* Auth button gradient */
    --auth-btn-gradient: var(--gradient-primary);
    --auth-btn-shadow: var(--shadow-glow-purple);
    
    /* Orb colors */
    --orb-purple: rgba(139, 92, 246, 0.4);
    --orb-pink: rgba(236, 72, 153, 0.35);
    --orb-cyan: rgba(6, 182, 212, 0.3);
    --orb-blue: rgba(59, 130, 246, 0.25);
}

[data-theme="light"] {
    /* Auth-specific colors for light mode */
    --auth-bg: var(--bg-primary);
    --auth-card-bg: rgba(255, 255, 255, 0.85);
    --auth-input-bg: rgba(255, 255, 255, 0.9);
    --auth-input-border: rgba(139, 92, 246, 0.25);
    --auth-text-primary: var(--text-primary);
    --auth-text-secondary: var(--text-secondary);
    --auth-text-muted: var(--text-muted);
    --auth-link-color: var(--accent-purple);
    --auth-link-hover: var(--accent-pink);
    --auth-border-color: rgba(139, 92, 246, 0.12);
    --auth-card-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.15);
    --auth-card-border: rgba(139, 92, 246, 0.1);
    
    /* Orb colors - softer for light mode */
    --orb-purple: rgba(139, 92, 246, 0.2);
    --orb-pink: rgba(236, 72, 153, 0.15);
    --orb-cyan: rgba(6, 182, 212, 0.12);
    --orb-blue: rgba(59, 130, 246, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    background-color: var(--bg-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ===== ANIMATED BACKGROUND ===== */

/* Base gradient layer */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -3;
}

/* Dark mode gradient */
[data-theme="dark"] body::before,
:root body::before {
    background: 
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(139, 92, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 0% 100%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, 
            rgba(10, 10, 25, 1) 0%, 
            rgba(15, 15, 35, 1) 50%,
            rgba(10, 10, 30, 1) 100%
        );
}

/* Light mode gradient */
[data-theme="light"] body::before {
    background: 
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 0% 100%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, 
            rgba(250, 250, 255, 1) 0%, 
            rgba(245, 243, 255, 1) 50%,
            rgba(248, 250, 255, 1) 100%
        );
}

/* Grid pattern overlay - Dark mode */
[data-theme="dark"] body::after,
:root body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -2;
    opacity: 0.8;
}

/* Grid pattern - Light mode */
[data-theme="light"] body::after {
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
    opacity: 0.6;
}

/* ===== FLOATING ORBS ===== */
.auth-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: floatOrb 20s ease-in-out infinite;
}

.auth-orb-1 {
    width: 500px;
    height: 500px;
    background: var(--orb-purple);
    top: -15%;
    right: -10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.auth-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--orb-pink);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
    animation-duration: 22s;
}

.auth-orb-3 {
    width: 350px;
    height: 350px;
    background: var(--orb-cyan);
    top: 50%;
    left: 60%;
    animation-delay: -10s;
    animation-duration: 28s;
}

.auth-orb-4 {
    width: 300px;
    height: 300px;
    background: var(--orb-blue);
    top: 20%;
    left: -5%;
    animation-delay: -15s;
    animation-duration: 24s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -40px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(40px, 30px) scale(1.02);
    }
}

/* Hide legacy splash elements */
.auth-splash,
.auth-splash-1,
.auth-splash-2,
.auth-splash-3,
.pot-light-source,
.light-rays,
.side-lighting,
.light-source-left,
.light-source-right,
.shadow-overlay {
    display: none;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--auth-spacing-lg);
    position: relative;
    z-index: 1;
}

/* Remove legacy pseudo-elements */
.auth-container::before,
.auth-container::after {
    display: none;
}

/* ===== AUTH CARD - PREMIUM GLASSMORPHISM ===== */
.auth-card {
    background: var(--auth-card-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: var(--auth-spacing-lg) var(--auth-spacing-md);
    border-radius: var(--auth-border-radius);
    width: 100%;
    max-width: var(--auth-container-max-width);
    text-align: center;
    position: relative;
    box-shadow: var(--auth-card-shadow);
    border: 1px solid var(--auth-card-border);
    overflow: hidden;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.4s ease,
                border-color 0.4s ease;
}

/* Card hover effect */
.auth-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .auth-card:hover {
    box-shadow: 0 35px 60px -15px rgba(139, 92, 246, 0.2);
}

/* Animated gradient border */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--auth-border-radius);
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.5),
        rgba(236, 72, 153, 0.5),
        rgba(6, 182, 212, 0.5),
        rgba(139, 92, 246, 0.5)
    );
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: gradientShift 8s ease infinite;
    pointer-events: none;
    z-index: 2;
}

.auth-card:hover::before {
    opacity: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Inner shine effect */
.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.auth-card:hover::after {
    left: 100%;
}

/* ===== LOGO & BRANDING ===== */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--auth-spacing-md);
    position: relative;
    z-index: 5;
}

/* Logo link wrapper */
.logo a {
    position: relative;
    display: inline-block;
    padding: 0;
}

.logo a::after {
    display: none;
}

.logo h1,
.logo-text {
    color: var(--text-primary) !important;
    font-family: var(--font-family-decorative) !important;
    font-size: var(--font-size-xl);
    margin: var(--auth-spacing-sm) 0 0;
    letter-spacing: 2px;
    font-weight: 700;
    transition: all 0.4s ease;
    text-transform: uppercase;
}

/* Logo text glow - Dark mode */
[data-theme="dark"] .logo h1,
[data-theme="dark"] .logo-text,
:root .logo h1,
:root .logo-text {
    text-shadow: 
        0 0 20px rgba(139, 92, 246, 0.6),
        0 0 40px rgba(139, 92, 246, 0.3);
}

/* Logo text - Light mode */
[data-theme="light"] .logo h1,
[data-theme="light"] .logo-text {
    text-shadow: none;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGradient 6s ease infinite;
}

@keyframes logoGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Logo SVG container */
.logo-link {
    display: block;
    text-decoration: none;
}

.logo svg.logo-svg {
    width: 90px;
    height: 90px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    border: 2px solid rgba(139, 92, 246, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(139, 92, 246, 0.08);
}

/* Logo SVG - Dark mode */
[data-theme="dark"] .logo svg.logo-svg,
:root .logo svg.logo-svg {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.9));
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Logo SVG - Light mode */
[data-theme="light"] .logo svg.logo-svg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 
        0 10px 40px rgba(139, 92, 246, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Logo hover - unified effect */
.logo-link:hover svg.logo-svg {
    transform: scale(1.12) rotate(-3deg);
    border-color: var(--accent-purple);
}

/* Logo hover - Dark mode */
[data-theme="dark"] .logo-link:hover svg.logo-svg,
:root .logo-link:hover svg.logo-svg {
    box-shadow: 
        0 0 40px rgba(139, 92, 246, 0.5),
        0 0 60px rgba(139, 92, 246, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Logo hover - Light mode */
[data-theme="light"] .logo-link:hover svg.logo-svg {
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.3),
        0 15px 45px rgba(139, 92, 246, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ===== SVG ELEMENT ANIMATIONS ===== */

/* Individual squares - base transition */
.logo-square {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Squares glow on hover */
.logo-link:hover .logo-green {
    filter: drop-shadow(0 0 8px rgba(27, 239, 138, 0.7));
}

.logo-link:hover .logo-yellow {
    filter: drop-shadow(0 0 8px rgba(255, 222, 62, 0.7));
}

.logo-link:hover .logo-blue {
    filter: drop-shadow(0 0 8px rgba(32, 100, 130, 0.7));
}

.logo-link:hover .logo-red {
    filter: drop-shadow(0 0 8px rgba(249, 40, 80, 0.7));
}

/* Eyes - subtle blink animation */
.logo-eye {
    transition: all 0.3s ease;
    transform-origin: center;
}

.logo-link:hover .logo-eye {
    animation: eyeBlink 2s infinite;
}

@keyframes eyeBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

/* Smile animation */
.logo-smile {
    transition: all 0.4s ease;
    transform-origin: center;
}

.logo-link:hover .logo-smile {
    animation: smileWiggle 0.8s ease-in-out;
    stroke-width: 9;
}

@keyframes smileWiggle {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-2px) rotate(-2deg); }
    75% { transform: translateY(-2px) rotate(2deg); }
}

/* Face glow on hover */
.logo-face {
    transition: all 0.4s ease;
}

.logo-link:hover .logo-face {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Gentle scale on hover only - no constant animation */
.logo-link:hover svg.logo-svg {
    animation: none;
}

.title {
    font-family: var(--font-family-decorative);
    color: var(--text-primary);
    margin: 0 0 var(--auth-spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.4s ease;
}

/* ===== FORM ELEMENTS ===== */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: var(--auth-spacing-xs);
    position: relative;
    z-index: 1;
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--auth-spacing-sm);
    width: 100%;
    position: relative;
}

/* Modern input styling */
.input-container input {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--auth-input-border);
    border-radius: var(--auth-input-radius);
    background-color: var(--auth-input-bg);
    color: var(--auth-text-primary);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    width: 100%;
    max-width: 340px;
    text-align: center;
    height: 3.25rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode input styling */
[data-theme="dark"] .input-container input,
:root .input-container input {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(139, 92, 246, 0);
}

/* Light mode input styling */
[data-theme="light"] .input-container input {
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 1px 2px rgba(0, 0, 0, 0.02);
    background-color: rgba(255, 255, 255, 0.95);
}

.input-container input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-container input:focus {
    border-color: var(--accent-purple);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 4px var(--accent-purple-15),
        0 0 20px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .input-container input:focus {
    background-color: #ffffff;
    box-shadow: 
        0 0 0 4px var(--accent-purple-15),
        0 4px 12px rgba(139, 92, 246, 0.1);
}

/* ===== BUTTON STYLING ===== */
button {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% 200%;
    color: #ffffff;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--auth-button-radius);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 700;
    font-family: var(--font-family-base);
    width: 100%;
    max-width: 340px;
    height: 3.25rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    margin-top: var(--auth-spacing-sm);
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        0 0 0 0 rgba(139, 92, 246, 0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: buttonGradient 6s ease infinite;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Button shimmer effect */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: left 0.6s ease;
}

button:hover:not([disabled])::before {
    left: 100%;
}

/* Button hover state */
button:hover:not([disabled]) {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 35px rgba(139, 92, 246, 0.5),
        0 0 40px rgba(168, 85, 247, 0.3);
}

button:active:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.4),
        0 0 25px rgba(168, 85, 247, 0.2);
}

/* Button disabled state */
button:disabled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
    animation: none;
}

/* Light mode button */
[data-theme="light"] button {
    box-shadow: 
        0 4px 20px rgba(139, 92, 246, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] button:hover:not([disabled]) {
    box-shadow: 
        0 12px 40px rgba(139, 92, 246, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===== LINKS & TEXT ===== */
a {
    color: var(--auth-link-color);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--auth-link-hover);
}

/* Animated underline */
a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover::after {
    width: 100%;
}

/* Dark mode link glow */
[data-theme="dark"] a:hover,
:root a:hover {
    text-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}

.register-text,
.login-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: var(--auth-spacing-md);
    transition: color 0.4s ease;
}

/* ===== CHECKBOX STYLING ===== */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid var(--border-medium);
    background: var(--auth-input-bg);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    margin-right: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

input[type="checkbox"]:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-10);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 4px var(--accent-purple-15);
    outline: none;
}

/* ===== THEME TOGGLE FOR AUTH PAGES ===== */
.auth-theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border: none;
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--auth-card-border);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-theme-toggle:hover {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-color: transparent;
    transform: scale(1.1) rotate(15deg);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(139, 92, 246, 0.2);
}

.auth-theme-toggle:hover i {
    color: #ffffff;
    transform: scale(1.1);
}

.auth-theme-toggle i {
    font-size: 1.35rem;
    color: var(--text-primary);
    transition: all 0.4s ease;
}

/* Sun/Moon icon visibility */
.auth-theme-toggle .fa-sun {
    display: var(--theme-icon-display-sun);
}

.auth-theme-toggle .fa-moon {
    display: var(--theme-icon-display-moon);
}

/* ===== SOCIAL DIVIDER ===== */
.social-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin: var(--auth-spacing-md) 0;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.social-divider span {
    padding: 0 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== ERROR & VALIDATION STATES ===== */
.input-container input.error {
    border-color: var(--error-text) !important;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 4px var(--error-bg),
        0 0 15px rgba(239, 68, 68, 0.2) !important;
}

.input-container input.valid {
    border-color: var(--success-text) !important;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 4px var(--success-bg),
        0 0 15px rgba(34, 197, 94, 0.2) !important;
}

.error-message {
    color: var(--error-text);
    font-size: var(--font-size-xs);
    margin-top: 0.35rem;
    text-align: left;
    width: 100%;
    max-width: 340px;
    animation: fadeIn 0.3s ease;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide Django's default error messages */
.errorlist {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: var(--auth-spacing-md);
    }
    
    .auth-card {
        padding: var(--auth-spacing-md);
        border-radius: 20px;
    }
    
    .auth-theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Smaller orbs on mobile */
    .auth-orb-1 { width: 300px; height: 300px; }
    .auth-orb-2 { width: 250px; height: 250px; }
    .auth-orb-3 { width: 200px; height: 200px; }
    .auth-orb-4 { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    :root {
        --auth-spacing-md: 1rem;
        --auth-spacing-lg: 1.75rem;
        --font-size-xl: 1.5rem;
    }
    
    .logo img {
        width: 65px;
    }
    
    .input-container input,
    button {
        height: 3rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .auth-card {
        border-radius: 18px;
    }
}

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-orb {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 3px;
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-accent {
    color: var(--accent-purple) !important;
}
