/**
 * PREMIUM AUTH PAGES STYLING
 * Premium design for authentication pages
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gold: #D4AF37;
    --gold-light: #F4E4A1;
    --gold-dark: #B8941F;
    --primary-dark: #0D1117;
    --secondary-dark: #161B22;
    --accent-green: #00D084;
    --accent-red: #FF4757;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-medium: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0D1117 0%, #1C2128 50%, #0D1117 100%);
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 208, 132, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 71, 87, 0.1) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Floating Particles */
.auth-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.auth-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Auth Container */
.auth-container {
    background: var(--glass-bg-medium);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Logo Section */
.logo {
    text-align: center;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 70px;
    width: auto;
    animation: pulse 3s infinite;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:hover {
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    color: var(--primary-dark);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.5),
        0 0 0 1px rgba(212, 175, 55, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn span {
    position: relative;
    z-index: 1;
}

/* Google Button */
.google-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: var(--glass-bg-medium);
    border-color: var(--primary-gold);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Error Messages */
.error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid var(--accent-red);
    border-left: 4px solid var(--accent-red);
    color: var(--accent-red);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.success {
    background: rgba(0, 208, 132, 0.15);
    border: 1px solid var(--accent-green);
    border-left: 4px solid var(--accent-green);
    color: var(--accent-green);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Links */
.links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.links a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s ease;
}

.links a:hover::after {
    width: 100%;
}

.links a:hover {
    color: var(--gold-light);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    margin: 24px 0;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.divider span {
    padding: 0 16px;
}

/* Back to Home Link */
.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link a:hover {
    color: var(--primary-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 40px 30px;
        max-width: 90%;
        margin: 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid var(--primary-dark);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.form-group input:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
