:root {
    --primary: #1e5a96;
    --primary-dark: #0f3a5f;
    --accent: #d4af37;
    --text: #1a1a2e;
    --text-light: #666;
    --border: #e0e0e0;
    --light: #f8f9fa;
    --dark: #1a1a2e;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    margin: 0 1.5rem;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* ===== CONTENT & SECTIONS ===== */
.content {
    padding: 3rem 2rem;
    background: white;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.content ul {
    margin: 1rem 0 1rem 2rem;
    color: var(--text-light);
}

.content li {
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.category-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
}

/* ===== FAQ SECTION ===== */
.faq {
    padding: 3rem 0;
}

.faq-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.faq-item h3,
.faq-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item.open p,
.faq-item.active p {
    display: block;
}

.faq-item p {
    display: none;
    color: var(--text-light);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle,
.faq-item.open .faq-toggle {
    transform: rotate(180deg);
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
    color: white;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent);
    color: var(--text);
}

.btn-secondary:hover {
    background: #c4922a;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
}

/* ===== PRICING SECTION ===== */
.pricing {
    padding: 4rem 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.price-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.price-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(30, 90, 150, 0.1);
    transform: translateY(-4px);
}

.price-card.featured {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

.price {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: bold;
    margin: 1rem 0;
}

.price-period {
    color: var(--text-light);
    font-size: 1rem;
}

.price-features {
    text-align: left;
    margin: 2rem 0;
    min-height: 200px;
}

.price-features li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

/* ===== CONTACT FORM ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-card a:hover {
    text-decoration: underline;
}

form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.1);
}

/* ===== CHECKOUT ===== */
.checkout-container {
    max-width: 600px;
}

.checkout-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checkout-summary {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ===== LEADERBOARD ===== */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaderboard-table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.leaderboard-table tr:hover {
    background: var(--light);
}

.rank-badge {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rank-badge.gold {
    background: var(--accent);
    color: var(--text);
}

.rank-badge.silver {
    background: #c0c0c0;
    color: var(--text);
}

.rank-badge.bronze {
    background: #cd7f32;
    color: white;
}

/* ===== ADMIN ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.metric-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.metric-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 0.5rem;
}

.metric-change {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--error);
}

/* ===== ALERTS & NOTIFICATIONS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #7f1d1d;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background: #fef3c7;
    color: #78350f;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary);
}

/* ===== REFERRAL SECTION ===== */
.referral-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.referral-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.referral-hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.referral-code-box {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.referral-code {
    font-size: 1.3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    nav a {
        margin: 0;
        padding: 0.5rem 0;
    }

    .content {
        padding: 1.5rem;
    }

    .content h1,
    h1 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features-grid,
    .pricing-grid,
    .contact-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .price-card.featured {
        transform: scale(1);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .faq-item {
        padding: 1rem;
    }

    .metric-value {
        font-size: 1.5rem;
    }
}
