﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

/* Simplified Gaming Background */
.gaming-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

    .gaming-bg::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        pointer-events: none;
    }

    .gaming-bg::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.3;
        pointer-events: none;
    }

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Simplified Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .form-input:focus {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    }

    .form-input.error {
        border-color: #ef4444;
    }

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Icon Box */
.icon-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.2s ease;
}

    .feature-card:hover {
        transform: translateY(-3px);
    }

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak {
    width: 33%;
    background: #ef4444;
}

.strength-medium {
    width: 66%;
    background: #f59e0b;
}

.strength-strong {
    width: 100%;
    background: #10b981;
}

/* Form Error Messages */
.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

    .form-error.hidden {
        display: none;
    }

/* ============================================ */
/* TOAST NOTIFICATIONS — fixed bottom-right     */
/* ============================================ */

.toast-notification {
    position: fixed;
    bottom: 1.5rem; /* bottom-6 */
    right: 1.5rem; /* right-6  */
    left: auto;
    top: auto; /* override any legacy top:1rem */
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 22rem; /* ~352px */
    width: calc(100vw - 3rem); /* never wider than viewport */
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Social Login Buttons */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .social-btn:hover {
        border-color: #3b82f6;
        background: #eff6ff;
        transform: translateY(-2px);
    }

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

@media (max-width: 1024px) {
    .gaming-bg {
        padding: 2rem 1rem;
        min-height: 100vh;
    }

    .glass-card {
        max-height: none;
    }

    .fade-in,
    .slide-up {
        animation-duration: 0.3s;
    }
}

@media (max-width: 640px) {
    .gaming-bg {
        padding: 1rem 0.75rem;
        min-height: 100vh;
        animation: none;
        background-position: 0% 50%;
    }

    .max-w-6xl > .grid > div:first-child {
        display: block !important;
        margin-bottom: 1.5rem;
        text-align: center;
    }

        .max-w-6xl > .grid > div:first-child .icon-box {
            display: none;
        }

        .max-w-6xl > .grid > div:first-child > div > h1 {
            font-size: 1.5rem !important;
            line-height: 1.3 !important;
            margin-bottom: 0.5rem !important;
        }

        .max-w-6xl > .grid > div:first-child > div > p {
            font-size: 0.875rem !important;
            line-height: 1.4 !important;
            margin-bottom: 1rem !important;
        }

        .max-w-6xl > .grid > div:first-child .space-y-4 {
            display: none !important;
        }

        .max-w-6xl > .grid > div:first-child .flex.items-center.space-x-8 {
            display: none !important;
        }

    .max-w-6xl > .grid {
        grid-template-columns: 1fr !important;
    }

    .glass-card {
        backdrop-filter: blur(5px);
        padding: 1.5rem !important;
        border-radius: 1.5rem !important;
        margin: 0 auto;
        max-width: 100%;
    }

        .glass-card > div:first-child {
            margin-bottom: 1.25rem !important;
        }

        .glass-card h2 {
            font-size: 1.5rem !important;
            line-height: 1.3 !important;
            margin-bottom: 0.375rem !important;
        }

        .glass-card > div:first-child > p {
            font-size: 0.875rem !important;
            line-height: 1.4 !important;
        }

    .form-input {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }

    label.block {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
        font-weight: 600 !important;
    }

    label i {
        font-size: 0.875rem !important;
    }

    button[type="submit"] {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.4 !important;
    }

        button[type="submit"] i {
            font-size: 0.9375rem !important;
        }

    form.space-y-6 > * + * {
        margin-top: 1rem !important;
    }

    .flex.items-start.space-x-3,
    .flex.items-start.space-x-reverse {
        gap: 0.625rem !important;
    }

    .flex.items-start label {
        font-size: 0.8125rem !important;
        line-height: 1.4 !important;
    }

    input[type="checkbox"] {
        width: 1rem !important;
        height: 1rem !important;
        margin-top: 0.125rem !important;
        flex-shrink: 0;
    }
    .flex.items-center.justify-between {
        flex-direction: row; /* ← keep on same row */
        align-items: center; /* ← vertically centered */
        justify-content: space-between;
        gap: 0;
        flex-wrap: wrap; /* ← wrap only if truly no space */
    }

        .flex.items-center.justify-between label,
        .flex.items-center.justify-between a {
            font-size: 0.8125rem !important; /* slightly smaller on mobile */
        }
    .glass-card > div:last-child {
        margin-top: 1.25rem !important;
    }

        .glass-card > div:last-child p {
            font-size: 0.875rem !important;
            line-height: 1.4 !important;
        }

    .relative button {
        padding: 0.625rem !important;
    }

        .relative button i {
            font-size: 1rem !important;
        }

    /* Toast on mobile — full width with small margin */
    .toast-notification {
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: 100%;
        width: auto;
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }

    .fade-in,
    .slide-up,
    .feature-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

        .btn-primary:hover,
        .feature-card:hover,
        .social-btn:hover {
            transform: none !important;
        }

    .form-input:focus {
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    }

    .form-error {
        font-size: 0.8125rem !important;
        margin-top: 0.375rem !important;
    }
}

@media (max-width: 375px) {
    .gaming-bg {
        padding: 0.75rem 0.5rem;
    }

    .glass-card {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }

        .glass-card h2 {
            font-size: 1.375rem !important;
        }

    .form-input {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.9375rem !important;
    }

    button[type="submit"] {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }

    form.space-y-6 > * + * {
        margin-top: 0.875rem !important;
    }

    label.block {
        font-size: 0.8125rem !important;
    }

    .flex.items-start label {
        font-size: 0.75rem !important;
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gaming-bg {
        animation: none;
    }
}

/* RTL Support */
[dir="rtl"] .toast-notification {
    right: auto;
    left: 1.5rem;
    animation-name: toastSlideInRtl;
}

@keyframes toastSlideInRtl {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    [dir="rtl"] .toast-notification {
        left: 0.75rem;
        right: 0.75rem;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
