@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Default variables that don't change */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme='dark'] {
    --bg-main: #0a0b0d;
    --bg-card: rgba(26, 28, 35, 0.8);
    --bg-card-rgb: 26, 28, 35;
    --bg-surface: #1a1c23;
    --bg-input: rgba(10, 11, 13, 0.6);

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-muted: rgba(99, 102, 241, 0.2);

    --text-primary: #f9fafb;
    --text-secondary: #949ba4;
    --text-muted: #6b7280;

    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(99, 102, 241, 0.5);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
}

:root[data-theme='light'] {
    --bg-main: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-rgb: 255, 255, 255;
    --bg-surface: #ffffff;
    --bg-input: rgba(243, 244, 246, 0.6);

    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-muted: rgba(79, 70, 229, 0.1);

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --border: rgba(0, 0, 0, 0.08);
    --border-active: rgba(79, 70, 229, 0.3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --hover-transform: translateY(-2px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
}

/* ===== AUTH PAGE ===== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/img/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    padding: 1.5rem;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-card h1 {
    text-align: center;
    font-size: 2.25rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: -0.5rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-input);
    padding: 0.3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 0.625rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.tab.active {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

#login-form,
#register-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    outline: none;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
    width: 100%;
}

input:focus {
    border-color: var(--accent);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--accent-muted);
}

input::placeholder {
    color: var(--text-muted);
}

.password-field-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-group input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    z-index: 10;
}

.toggle-password:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    padding: 0.875rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.01em;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: var(--hover-transform);
    box-shadow: var(--shadow-hover);
}

.btn-primary:active {
    transform: translateY(0);
}

#auth-message {
    text-align: center;
    font-size: 0.85rem;
    min-height: 1rem;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.2s ease;
}

.toast.removing {
    transform: translateX(110%);
    opacity: 0;
}

.toast::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.toast.success::before {
    background-color: #22c55e;
}

.toast.error::before {
    background-color: #ef4444;
}

.toast.warning::before {
    background-color: #f59e0b;
}

.toast.info::before {
    background-color: var(--accent);
}

@keyframes toast-in {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}