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

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg:           #07080f;
    --surface-1:    rgba(255,255,255,0.03);
    --surface-2:    rgba(255,255,255,0.06);
    --border:       rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.15);

    --accent:       #7c6cf3;
    --accent-2:     #c84fff;
    --accent-glow:  rgba(124,108,243,0.35);
    --accent-grad:  linear-gradient(135deg, #7c6cf3, #c84fff);

    --text-1:       #f5f5f7;
    --text-2:       rgba(245,245,247,0.6);
    --text-3:       rgba(245,245,247,0.35);

    --green:        #30d158;
    --red:          #ff453a;
    --yellow:       #ffd60a;

    --radius-sm:    10px;
    --radius-md:    16px;
    --radius-lg:    24px;
    --radius-xl:    32px;

    --shadow-card:  0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    --shadow-glow:  0 0 60px rgba(124,108,243,0.3);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { -webkit-font-smoothing: antialiased; }

body {
    background: var(--bg);
    color: var(--text-1);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(124,108,243,0.4) 0%, transparent 70%);
    top: -200px; left: -200px;
    animation: drift1 25s ease-in-out infinite alternate;
}

.blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(200,79,255,0.3) 0%, transparent 70%);
    bottom: -150px; right: -150px;
    animation: drift2 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(60px, 80px) scale(1.15); }
}

@keyframes drift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-50px, -60px) scale(1.2); }
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 92%;
    max-width: 500px;
    z-index: 1;
    position: relative;
    box-shadow: var(--shadow-card);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    margin: auto;
}

.container.wide {
    max-width: 700px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   LOGO / BRAND
   ============================================ */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.brand-logo {
    width: 56px; height: 56px;
    background: var(--accent-grad);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px var(--accent-glow);
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-1);
    text-align: center;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-1);
}

p.subtitle {
    font-size: 14px;
    color: var(--text-2);
    text-align: center;
    margin-bottom: 36px;
    line-height: 1.5;
}

/* ============================================
   AUTH CONTAINER INNER
   ============================================ */
.auth-container {
    padding: 0;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-1);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: var(--accent);
    background: rgba(124,108,243,0.06);
    box-shadow: 0 0 0 3px rgba(124,108,243,0.18);
}

input::placeholder { color: var(--text-3); }
input[readonly] { cursor: default; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
    position: relative;
    overflow: hidden;
    width: 100%;
    letter-spacing: -0.1px;
}

.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
    color: #fff;
}

/* Default .btn (gradient for backwards compat) */
.btn:not(.btn-outline):not(.btn-primary) {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn:not(.btn-outline):not(.btn-primary):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
    background: var(--surface-1);
    border: 1px solid var(--border);
    color: var(--text-2);
}

.btn-outline:hover {
    background: var(--surface-2);
    border-color: var(--border-hover);
    color: var(--text-1);
    transform: none;
    box-shadow: none;
}

.btn-small {
    width: auto;
    padding: 9px 18px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

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

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    animation: slideUp 0.3s ease both;
}

.alert-error {
    background: rgba(255,69,58,0.12);
    border: 1px solid rgba(255,69,58,0.3);
    color: #ff6961;
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s, opacity 0.2s;
}

a:hover { opacity: 0.8; }

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 13.5px;
    color: var(--text-3);
}

.auth-switch a { color: var(--text-2); font-weight: 500; }
.auth-switch a:hover { color: var(--text-1); opacity: 1; }

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================
   DASHBOARD - HEADER
   ============================================ */
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.flex-header h1 {
    text-align: left;
    margin-bottom: 0;
    font-size: 22px;
}

/* ============================================
   DASHBOARD - STATUS CARD
   ============================================ */
.status-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.status-row:last-child { border-bottom: none; padding-bottom: 0; }
.status-row:first-child { padding-top: 0; }

.status-label {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.badge-active   { color: var(--green); }
.badge-expired  { color: var(--red); }
.badge-pending  { color: var(--yellow); }

/* ============================================
   CONNECTION LINK BOX
   ============================================ */
.link-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.link-section > p {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
    margin-bottom: 12px;
}

.copy-box {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.copy-box:hover { border-color: var(--border-hover); }

.copy-box input {
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-3);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
    box-shadow: none !important;
}

.copy-box input:focus { box-shadow: none !important; border: none !important; }

.copy-box button {
    background: var(--surface-2);
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-1);
    padding: 14px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-box button:hover { background: var(--accent); color: #fff; }

/* ============================================
   PLAN CARD
   ============================================ */
.plans-grid {
    display: grid;
    gap: 14px;
}

.plan-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.plan-card:hover {
    border-color: rgba(124,108,243,0.4);
    background: rgba(124,108,243,0.04);
    transform: translateY(-1px);
}

.plan-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-1);
}

.plan-info p {
    font-size: 13px;
    color: var(--text-3);
}

/* ============================================
   GENERAL CARD (for pricing/legal pages)
   ============================================ */
.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; }

.modal-container {
    background: #111118;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 28px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: var(--surface-2);
    border: none;
    color: var(--text-3);
    font-size: 18px;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.modal-close:hover { background: var(--surface-2); color: #fff; }

.modal-body {
    padding: 4px 28px 24px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-2);
}

.modal-footer {
    padding: 16px 28px;
    background: rgba(255,255,255,0.01);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border);
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    background: rgba(255,255,255,0.25);
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(5); opacity: 0; }
}

/* ============================================
   BADGE / TAG
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(48,209,88,0.12);
    color: var(--green);
    border: 1px solid rgba(48,209,88,0.2);
}

.badge-tag-accent {
    background: rgba(124,108,243,0.12);
    color: var(--accent);
    border: 1px solid rgba(124,108,243,0.2);
}

/* ============================================
   CANCEL BUTTON
   ============================================ */
.btn-danger {
    background: rgba(255,69,58,0.1);
    border: 1px solid rgba(255,69,58,0.25);
    color: #ff6961;
    width: auto;
}

.btn-danger:hover {
    background: rgba(255,69,58,0.18);
    border-color: rgba(255,69,58,0.45);
    color: #ff453a;
    transform: none;
    box-shadow: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    width: 100%;
    text-align: center;
    padding: 28px 20px;
    font-size: 12.5px;
    color: var(--text-3);
    z-index: 1;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--text-3);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

footer a:hover { color: var(--text-1); opacity: 1; }

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    margin: 28px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-body p, .legal-body li {
    font-size: 14.5px;
    color: var(--text-2);
    line-height: 1.7;
}

.legal-body ul {
    margin-left: 20px;
    margin-top: 8px;
}

.legal-body li { margin-bottom: 6px; }

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }