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

:root {
    --bg-gradient: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2a1b1b 100%);
    --card-bg: rgba(30, 30, 30, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: rgba(255, 255, 255, 0.1);
    --primary-color: #a35d38;
    /* Rust/Orange from design */
    --primary-hover: #b86e45;
    --text-main: #ffffff;
    --text-muted: #888888;
    --error-color: #ff4d4d;
    --success-color: #4caf50;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(4, 159, 110, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(200, 80, 0, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(20, 20, 30, 1) 0%, rgba(0, 0, 0, 1) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background overlay hint to match the colorful blur in the screenshot */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 100, 0, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.auth-container {
    width: 100%;
    max-width: 550px;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 4px;
    width: fit-content;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 8px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.tab-btn:hover:not(.active) {
    color: #ccc;
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Chrome/Safari Autofill Override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    cursor: pointer;
}

.checkbox {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked+.checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked+.checkbox::after {
    content: '✓';
    font-size: 12px;
    color: white;
}

.forgot-password {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #fff;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    background: #6d5b4b;
    /* Base fallback */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1)), var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 16px;
}

/* Social Login */
.social-buttons {
    display: flex;
    gap: 16px;
}

.social-btn {
    flex: 1;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.social-btn:hover {
    background: rgba(40, 40, 40, 0.8);
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255, 77, 77, 0.15);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ffcccc;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #ccffcc;
}

/* Dropdown styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select.form-input option {
    background-color: #1a1a1a;
    color: white;
}