/* ===== FlashLINK — Membership Portal Stylesheet ===== */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5849C2;
    --primary-light: #A29BFE;
    --bg: #0F0F23;
    --bg-card: #1A1A2E;
    --bg-alt: #16162B;
    --text: #EAEAEA;
    --text-muted: #8888A0;
    --border: #2A2A40;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #FF7675;
    --radius: 12px;
    --max-width: 1140px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-user {
    color: var(--primary-light);
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-outline:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ===== Hero ===== */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(108, 92, 231, 0.15), transparent 60%);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Pricing ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
    transition: transform 0.2s;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-popular {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.15);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.price {
    margin-bottom: 24px;
    font-size: 2.5rem;
    font-weight: 800;
}

.currency {
    font-size: 1.2rem;
    vertical-align: super;
}

.amount {
    color: var(--text);
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ===== Auth ===== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 24px;
    min-height: calc(100vh - 60px);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

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

.auth-switch a {
    color: var(--primary-light);
    text-decoration: none;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
    max-width: 360px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

/* ===== Dashboard ===== */
.dashboard {
    padding: 48px 0;
}

.dashboard-title {
    font-size: 1.8rem;
    margin-bottom: 32px;
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}

.status-icon {
    font-size: 2rem;
}

.status-text {
    flex: 1;
}

.status-text strong {
    display: block;
    font-size: 1.1rem;
}

.status-text span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-expiry {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-bar {
    margin-top: 12px;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s;
}

.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.config-section h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.config-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.config-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.qr-display {
    margin-top: 24px;
    text-align: center;
}

.qr-display img,
#qrcode canvas,
#qrcode img {
    border-radius: var(--radius);
}

.qr-hint {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 8px;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .status-banner {
        flex-wrap: wrap;
    }

    .status-expiry {
        width: 100%;
        margin-top: 8px;
    }
}
