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

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6366f1; --primary-dark: #7c3aed; --danger: #ef4444;
    --info: #3b82f6; --bg: #0a0a1a; --surface: #0d0d1a;
    --border: rgba(255,255,255,0.08); --input-bg: rgba(255,255,255,0.06);
    --text: #e5e5ea; --muted: #888;
}

body {
    font-family: 'Inter', sans-serif; min-height: 100vh; display: flex;
    flex-direction: column; background: var(--bg); color: var(--text); overflow-x: hidden;
}

/* ── Background ── */
.bg-animation { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; isolation: isolate; }
.bg-animation .orb {
    position: absolute; border-radius: 50%;
    filter: blur(70px); opacity: 0.35;
    animation: floatOrb 20s ease-in-out infinite;
}
.orb:nth-child(1) { width: 500px; height: 500px; background: #4f46e5; top: -10%; left: -5%; }
.orb:nth-child(2) { width: 450px; height: 450px; background: #7c3aed; top: 50%; right: -10%; animation-delay: -7s; animation-duration: 25s; }
.orb:nth-child(3) { width: 400px; height: 400px; background: #2563eb; bottom: -10%; left: 30%; animation-delay: -14s; animation-duration: 22s; }
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 40px) scale(0.95); }
}

/* ── Header ── */
header { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; background: rgba(10,10,26,0.6); border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.logo-text { font-size: 19px; font-weight: 700; }
.logo-text span { background: linear-gradient(135deg, #a5b4fc, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-links { display: flex; gap: 8px; }
.header-links button { background: var(--input-bg); border: 1px solid var(--border); color: #ccc; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.header-links button:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── Main Content ── */
main { position: relative; z-index: 10; flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-container { width: 100%; max-width: 420px; }
.auth-card { 
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.35); position: relative; overflow: hidden;
}
.auth-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.auth-card .subtitle { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

/* ── Tabs ── */
.tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3); }
.tab-btn:not(.active):hover { color: #ccc; }

/* ── Form ─ */
.form-group { margin-bottom: 18px; position: relative; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: #aaa; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 11px 14px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; color: #fff; font-size: 14px; font-family: inherit; outline: none; transition: border 0.2s, box-shadow 0.2s; }
.form-group input::placeholder { color: #555; }
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.form-group input:disabled { opacity: 0.6; cursor: not-allowed; }

/* Password Toggle */
.input-wrapper { position: relative; }
.toggle-password {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #777; cursor: pointer; padding: 4px;
    transition: color 0.2s; display: flex; align-items: center;
}
.toggle-password:hover { color: #bbb; }
.toggle-password:focus-visible { outline: 2px solid var(--primary); border-radius: 4px; }

/* Register fields */
.register-fields { display: none; margin-bottom: 18px; }
.register-fields.visible { display: block; }

.form-options { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 12px; }
.form-options label { display: flex; align-items: center; gap: 5px; color: #aaa; cursor: pointer; }
.form-options label input[type="checkbox"] { accent-color: var(--primary); cursor: pointer; }
.form-options a { color: #818cf8; text-decoration: none; }
.form-options a:hover { text-decoration: underline; }

/* ── Buttons ─ */
.btn-primary { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); position: relative; overflow: hidden; }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary.loading .btn-text { display: none; }
.btn-primary.loading .spinner { display: block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: #555; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.social-buttons { display: flex; gap: 10px; }
.btn-social { flex: 1; padding: 10px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; color: #ccc; font-size: 13px; font-family: inherit; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-social:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
.btn-social:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-social svg { width: 16px; height: 16px; }

/* ── Toasts ── */
.toast-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; align-items: flex-start; justify-content: center; padding-top: 25px; pointer-events: none; }
.toast-overlay.visible { display: flex; }
.toast { background: #150a0a; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 12px; padding: 16px 20px; display: flex; align-items: flex-start; gap: 12px; max-width: 400px; width: 90%; box-shadow: 0 15px 40px rgba(0,0,0,0.5); animation: slideDown 0.3s ease; pointer-events: auto; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast.info { border-color: rgba(59, 130, 246, 0.35); background: #0a101a; }
.toast.info .toast-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.toast.info .toast-content h4 { color: #93c5fd; }
.toast-icon { width: 32px; height: 32px; background: rgba(239, 68, 68, 0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--danger); font-size: 16px; }
.toast-content h4 { font-size: 13px; font-weight: 600; color: #fca5a5; margin-bottom: 3px; }
.toast-content p { font-size: 12px; color: #999; line-height: 1.4; }
.toast-close { background: rgba(255,255,255,0.08); border: none; color: #888; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-left: auto; }
.toast-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Modals ── */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 2000; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.2s; }
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: #0f0f1a; border: 1px solid var(--border); border-radius: 14px; max-width: 750px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px rgba(0,0,0,0.5); animation: slideUp 0.25s; }
@keyframes slideUp { from { transform: translateY(15px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; color: #fff; font-weight: 600; }
.modal-close { background: var(--input-bg); border: 1px solid var(--border); color: #aaa; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.modal-body { padding: 20px; overflow-y: auto; font-size: 13px; line-height: 1.6; color: #bbb; }
.modal-body h4 { color: #e5e5ea; margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body p, .modal-body li { margin: 0 0 8px; }
.modal-body ul { margin: 0 0 10px 18px; }
.modal-body a { color: #818cf8; text-decoration: none; }
.modal-body a:hover { text-decoration: underline; }

/* ── Pricing Modal Specific ── */
.pricing-modal { max-width: 900px; }
.pricing-body { padding: 0; }

/* Deal of the Day */
.deal-of-day {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 0 20px 24px;
    position: relative;
    overflow: hidden;
}
.deal-badge {
    display: inline-block;
    background: linear-gradient(135deg, #eab308, #f59e0b);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.deal-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.deal-title { font-size: 16px; font-weight: 600; color: #fff; }
.deal-price { display: flex; align-items: center; gap: 12px; }
.old-price { text-decoration: line-through; color: #666; font-size: 14px; }
.new-price { font-size: 24px; font-weight: 700; color: #4ade80; }
.discount { background: #ef4444; color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.deal-timer { font-size: 12px; color: #fbbf24; font-family: monospace; }

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 0 20px 24px;
}
.pricing-card {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
}
.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}
.pricing-card:active {
    transform: translateY(-2px);
}
.pricing-card.popular {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(124, 58, 237, 0.05));
}
.pricing-card.popular:hover {
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}
.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.plan-name { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.plan-price { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.plan-price span { font-size: 14px; color: #888; font-weight: 400; }
.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
    font-size: 12px;
}
.plan-features li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #bbb;
}
.plan-features li:last-child { border-bottom: none; }
.btn-plan {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    pointer-events: none;
}
.pricing-card:hover .btn-plan {
    background: var(--primary);
    border-color: var(--primary);
}
.pricing-card.popular .btn-plan {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}

.pricing-footer {
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
}
.disclaimer {
    font-size: 11px;
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.5;
}
.billing-note {
    font-size: 12px;
    color: #888;
}

/* ── Footer ─ */
footer { position: relative; z-index: 10; text-align: center; padding: 20px; font-size: 11px; color: #444; border-top: 1px solid var(--border); }
footer a { color: #666; text-decoration: none; }
footer a:hover { color: #999; }

/* ── Cookie Banner ── */
.cookie-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(110%);
    background: #111118; border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 20px; max-width: 480px; width: 90%; z-index: 3000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cookie-banner.visible { transform: translateX(-50%) translateY(0); }
.cookie-banner p { font-size: 12px; color: #bbb; margin-bottom: 12px; line-height: 1.4; }
.cookie-banner a { color: #818cf8; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie-btn { padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: inherit; border: 1px solid transparent; }
.cookie-btn.primary { background: var(--primary); color: #fff; }
.cookie-btn.primary:hover { background: var(--primary-dark); }
.cookie-btn.secondary { background: transparent; color: #aaa; border-color: var(--border); }
.cookie-btn.secondary:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ── Responsive ─ */
@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .deal-content { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    header { padding: 14px 16px; }
    .auth-card { padding: 24px 20px; }
    .social-buttons { flex-direction: column; }
    .modal-card { max-height: 90vh; }
}