/* ==================== mineDor Auth — Light Theme ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

*:focus,
*:focus-visible,
button:focus, a:focus, input:focus, textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

button, a, input, textarea, select { outline: none !important; }

:root {
    --brand: #059669;
    --brand-2: #10b981;
    --brand-ink: #065f46;
    --accent: #f59e0b;
    --ink: #101a2e;
    --muted: #5a6b85;
    --bg: #eef2f7;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #e3e9f2;
    --shadow-md: 0 10px 30px rgba(16, 26, 46, 0.10);
    --shadow-lg: 0 20px 50px rgba(16, 26, 46, 0.16);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ==================== BACKGROUND ==================== */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(circle at 1px 1px, rgba(16, 26, 46, 0.05) 1px, transparent 0) 0 0 / 26px 26px,
        linear-gradient(180deg, #f4f7fb 0%, #eaeff6 100%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: float 22s ease-in-out infinite;
}
.orb1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #34d399, transparent 70%);
    top: -180px; left: -160px;
}
.orb2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #60a5fa, transparent 70%);
    bottom: -160px; right: -140px;
    animation-delay: -7s;
}
.orb3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, #fbbf24, transparent 70%);
    top: 45%; left: 55%;
    animation-delay: -14s;
    opacity: 0.22;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.08); }
    50% { transform: translate(-30px, 25px) scale(0.94); }
    75% { transform: translate(-40px, -25px) scale(1.04); }
}

/* ==================== AUTH CARD ==================== */
.auth-container { position: relative; z-index: 10; padding: 20px; }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 46px;
    width: 420px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ==================== LOGO ==================== */
.auth-logo { margin-bottom: 28px; }
.auth-logo i {
    font-size: 2.6rem;
    color: var(--brand);
    filter: drop-shadow(0 4px 8px rgba(5, 150, 105, 0.30));
}
.auth-logo h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.7rem;
    margin-top: 10px;
    color: var(--ink);
    letter-spacing: -0.5px;
}
.auth-logo h1 span { color: var(--brand); }

/* ==================== TABS ==================== */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 26px;
    background: var(--surface-2);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.auth-tab {
    flex: 1;
    padding: 11px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}
.auth-tab.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.30);
}
.auth-tab:hover:not(.active) { color: var(--ink); }

/* ==================== FORMS ==================== */
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form p { color: var(--muted); margin-bottom: 20px; font-size: 0.95rem; }

.auth-form form { display: flex; flex-direction: column; gap: 12px; }

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
}
.auth-form input::placeholder { color: #9aa7bb; }
.auth-form input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.28);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(5, 150, 105, 0.36);
}
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-submit.loading { pointer-events: none; }
.btn-submit.loading::after {
    content: '';
    width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== GOOGLE (legacy) ==================== */
.btn-google {
    width: 100%;
    padding: 16px;
    background: #fff;
    color: #333;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}
.btn-google:hover { background: var(--surface-2); transform: scale(1.01); }
.btn-google i { font-size: 1.3rem; color: #4285f4; }

.loading-spinner {
    display: none;
    width: 20px; height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.btn-google.loading .loading-spinner { display: block; }
.btn-google.loading span { display: none; }

/* ==================== ERROR ==================== */
.error-message {
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.4);
    color: var(--red, #e11d48);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}
.error-message.show { display: block; }

/* ==================== DIVIDER / BONUS ==================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span { padding: 0 15px; }

.bonus-text {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(5, 150, 105, 0.10);
    border: 1px solid rgba(5, 150, 105, 0.35);
    border-radius: 12px;
    color: var(--brand-ink);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
}
.bonus-text i { margin-right: 8px; }

/* ==================== BACK LINK ==================== */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.25s;
}
.back-link:hover { color: var(--brand); }
.back-link i { margin-right: 5px; }

/* ==================== REFERRAL INPUT ==================== */
.referral-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    transition: all 0.25s;
}
.referral-input:focus-within {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.referral-input i { color: #9aa7bb; font-size: 0.9rem; }
.referral-input input {
    border: none !important;
    background: transparent !important;
    padding: 14px 0 !important;
    box-shadow: none !important;
}

.referral-info {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(5, 150, 105, 0.10);
    border: 1px solid rgba(5, 150, 105, 0.30);
    border-radius: 12px;
    color: var(--brand-ink);
    font-size: 0.85rem;
    text-align: center;
}
.referral-info i { margin-right: 8px; }

.warning-text {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.40);
    border-radius: 12px;
    color: #b45309;
    font-size: 0.8rem;
    text-align: center;
}
.warning-text i { margin-right: 8px; }

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #fff;
    border: 1px solid var(--border);
    padding: 15px 22px;
    border-radius: 14px;
    font-weight: 500;
    animation: toastIn 0.35s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.toast.success { border-left: 4px solid #16a34a; }
.toast.success .toast-icon { color: #16a34a; }
.toast.error { border-left: 4px solid #e11d48; }
.toast.error .toast-icon { color: #e11d48; }
.toast.info { border-left: 4px solid #2563eb; }
.toast.info .toast-icon { color: #2563eb; }
.toast.warning { border-left: 4px solid #f59e0b; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast-icon { font-size: 1.3rem; }
.toast-message { flex: 1; color: var(--ink); }
.toast-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.25s;
}
.toast-close:hover { color: var(--ink); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(80px); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 500px) {
    .auth-card { padding: 30px 20px; }
    .auth-logo h1 { font-size: 1.5rem; }
}
