﻿:root {
    /* ❄️ Frost Ice Theme - Cool, crystalline colors */
    --ice-white: #f0f8ff;
    --ice-blue: #c5e4f7;
    --ice-cyan: #8dd3f0;
    --frost-primary: #29b6f6;
    --frost-deep: #0288d1;
    
    /* Acrylic frost glass effects */
    --acrylic-bg: rgba(20, 30, 48, 0.75);
    --acrylic-border: rgba(197, 228, 247, 0.12);
    --acrylic-glow: rgba(141, 211, 240, 0.25);
    
    /* Frost gradients */
    --gradient-primary: linear-gradient(135deg, #b3e5fc 0%, #4fc3f7 50%, #0288d1 100%);
    --gradient-ice: linear-gradient(135deg, #e1f5fe 0%, #81d4fa 50%, #29b6f6 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(129, 212, 250, 0.3), transparent 70%);
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(240, 248, 255, 0.85);
    --text-muted: rgba(197, 228, 247, 0.65);
    
    /* Accent colors */
    --accent-primary: #4fc3f7;
    --accent-hover: #29b6f6;
    --accent-glow: rgba(79, 195, 247, 0.5);
    
    /* Background - Frosty Ice */
    --bg-dark: #0a1929;
    --bg-frost: #0d1f2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a1929 0%, #0d1f2d 50%, #0a1929 100%);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ❄️ Animated frost/ice background with crystalline effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* Large ice crystals */
        radial-gradient(circle at 15% 20%, rgba(225, 245, 254, 0.18) 0%, transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(129, 212, 250, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 45% 60%, rgba(41, 182, 246, 0.12) 0%, transparent 25%),
        radial-gradient(circle at 70% 30%, rgba(179, 229, 252, 0.14) 0%, transparent 30%),
        radial-gradient(circle at 30% 80%, rgba(225, 245, 254, 0.1) 0%, transparent 28%),
        /* Frost gradient overlay */
        linear-gradient(135deg, 
            rgba(225, 245, 254, 0.05) 0%,
            rgba(129, 212, 250, 0.08) 25%,
            rgba(41, 182, 246, 0.06) 50%,
            rgba(2, 136, 209, 0.08) 75%,
            rgba(13, 31, 45, 0) 100%
        );
    animation: frostMove 25s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes frostMove {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    25% { 
        transform: translate(3%, -2%) scale(1.05);
        opacity: 0.9;
    }
    50% { 
        transform: translate(-2%, 3%) scale(0.95);
        opacity: 1;
    }
    75% { 
        transform: translate(2%, 2%) scale(1.03);
        opacity: 0.85;
    }
}

/* ❄️ Floating ice crystals/snowflakes effect - MORE VISIBLE */
body::after {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: 
        /* Bright floating ice crystals */
        radial-gradient(circle at 20% 30%, rgba(225, 245, 254, 0.25) 0%, rgba(129, 212, 250, 0.1) 15%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(129, 212, 250, 0.22) 0%, rgba(79, 195, 247, 0.08) 18%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(79, 195, 247, 0.18) 0%, rgba(41, 182, 246, 0.05) 12%, transparent 22%),
        radial-gradient(circle at 35% 75%, rgba(41, 182, 246, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 65% 25%, rgba(179, 229, 252, 0.2) 0%, rgba(129, 212, 250, 0.06) 15%, transparent 28%),
        radial-gradient(circle at 90% 40%, rgba(225, 245, 254, 0.16) 0%, transparent 20%),
        radial-gradient(circle at 10% 60%, rgba(129, 212, 250, 0.14) 0%, transparent 22%);
    animation: iceFloat 30s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes iceFloat {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    33% { 
        transform: translate(5%, -4%) rotate(120deg);
        opacity: 0.8;
    }
    66% { 
        transform: translate(-4%, 5%) rotate(240deg);
        opacity: 0.9;
    }
}

/* ❄️ Frosted grid overlay - crystalline pattern */
.auth-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Fine ice crystal pattern */
        linear-gradient(rgba(129, 212, 250, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 212, 250, 0.04) 1px, transparent 1px),
        /* Larger frost pattern */
        linear-gradient(rgba(179, 229, 252, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(179, 229, 252, 0.03) 2px, transparent 2px);
    background-size: 40px 40px, 40px 40px, 120px 120px, 120px 120px;
    background-position: 0 0, 0 0, 20px 20px, 20px 20px;
    pointer-events: none;
    z-index: 1;
    animation: gridShimmer 15s ease-in-out infinite;
}

@keyframes gridShimmer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Acrylic glass card - Windows 11 style with frost effect */
.glass-card {
    background: var(--acrylic-bg);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid var(--acrylic-border);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 80px rgba(129, 212, 250, 0.08);
    max-width: 420px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

/* Subtle frost shine effect on card */
.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(225, 245, 254, 0.03) 50%,
        transparent 70%
    );
    animation: cardShine 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes cardShine {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Auth layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 5;
}

/* Form elements - Fluent design */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 14px 48px 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
    position: relative;
}

.form-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 0 3px var(--acrylic-glow),
        0 4px 16px rgba(79, 195, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus ~ .input-icon {
    opacity: 0.8;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Fluent button design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 2px 8px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.btn-primary:hover {
    box-shadow: 
        0 4px 16px rgba(79, 195, 247, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Alerts - Fluent design */
.alert-info,
.alert-warning,
.text-error,
.text-success {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    backdrop-filter: blur(10px);
    animation: alertSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-error {
    background: rgba(245, 87, 108, 0.08);
    border-color: rgba(245, 87, 108, 0.25);
    color: #ff8a9b;
    box-shadow: 0 0 20px rgba(245, 87, 108, 0.1);
}

.text-success {
    background: rgba(67, 233, 123, 0.08);
    border-color: rgba(67, 233, 123, 0.25);
    color: #5cff93;
    box-shadow: 0 0 20px rgba(67, 233, 123, 0.1);
}

.alert-warning {
    background: rgba(254, 202, 87, 0.08);
    border-color: rgba(254, 202, 87, 0.25);
    color: #ffd76b;
    box-shadow: 0 0 20px rgba(254, 202, 87, 0.1);
}

.alert-info {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.3);
    color: #b3e5fc;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.15);
}

/* Links - Fluent design */
a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 12px var(--accent-glow);
}

a:hover::after {
    width: 100%;
}

/* Typography */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password strength indicator */
.password-strength {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 10px currentColor;
}

.password-strength-weak {
    width: 33%;
    background: linear-gradient(90deg, #f5576c, #f093fb);
}

.password-strength-medium {
    width: 66%;
    background: linear-gradient(90deg, #feca57, #ff9a9e);
}

.password-strength-strong {
    width: 100%;
    background: linear-gradient(90deg, #43e97b, #38f9d7);
}

/* Responsive */
@media (max-width: 768px) {
    .glass-card {
        padding: 36px 28px;
        border-radius: 14px;
    }
    
    h1 {
        font-size: 28px;
    }
}

/* Text utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 12px;
}

.mb-3 {
    margin-bottom: 16px;
}