:root {
    --primary-color: #6f42c1;
    --secondary-color: #20c997;
    --dark-bg: #1a1a2e;
    --light-accent: #16213e;
    --gold: #ffd700;

    /* Light mode colors (default) */
    --page-bg: white;
    --page-text: #212529;
    --section-bg: white;
    --section-alt-bg: #f8f9fa;
    --card-bg: white;
    --card-border: #dee2e6;
    --highlight-bg: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    --testimonial-bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --story-h2-color: #6f42c1;
    --story-h3-color: #16213e;
    --table-stripe: rgba(0,0,0,0.05);
    --modal-bg: white;
    --modal-text: #212529;
    --pain-point-bg: #fff3cd;
    --pain-point-border: #ffc107;
    --pain-point-text: #212529;
    --solution-box-bg: #d1e7dd;
    --solution-box-border: #0f5132;
    --solution-box-text: #212529;
    --white-box-bg: white;
    --white-box-text: #212529;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode colors */
        --page-bg: #0d1117;
        --page-text: #e6edf3;
        --section-bg: #161b22;
        --section-alt-bg: #0d1117;
        --card-bg: #1c2128;
        --card-border: #30363d;
        --highlight-bg: linear-gradient(135deg, #667eea25 0%, #764ba225 100%);
        --testimonial-bg: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
        --story-h2-color: #9d7dd4;
        --story-h3-color: #58a6ff;
        --table-stripe: rgba(255,255,255,0.05);
        --modal-bg: #1c2128;
        --modal-text: #e6edf3;
        --pain-point-bg: #3d2e00;
        --pain-point-border: #ffc107;
        --pain-point-text: #e6edf3;
        --solution-box-bg: #0d3a1f;
        --solution-box-border: #20c997;
        --solution-box-text: #e6edf3;
        --white-box-bg: #1c2128;
        --white-box-text: #e6edf3;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--page-bg);
    color: var(--page-text);
}

.hero-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-accent) 100%);
    padding: 0.75rem 0 0.75rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') repeat-x bottom;
    background-size: cover;
    opacity: 0.3;
}

.logo-section {
    background: var(--section-bg);
    padding: 1rem 0 0.5rem 0;
}

.logo-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0.5rem;
}

.logo-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.tldr-section {
    background: var(--section-bg);
    padding: 1.5rem 0 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tldr-content {
    background: var(--highlight-bg);
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.testimonials-section {
    background: var(--testimonial-bg);
    padding: 4rem 0;
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.testimonial-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid var(--primary-color);
}

.testimonial-caption {
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: var(--page-text);
}

.testimonial-initials {
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: bold;
}

.testimonial-earnings {
    color: var(--secondary-color);
    font-size: 1.3em;
    font-weight: bold;
    display: block;
    margin-top: 0.5rem;
}

.story-section {
    background: var(--section-bg);
    padding: 4rem 0;
}

.story-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.story-content h2 {
    color: var(--story-h2-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.story-content h3 {
    color: var(--story-h3-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.story-content ul {
    margin-left: 1.5rem;
}

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

.highlight-box {
    background: var(--highlight-bg);
    border-left: 5px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.pain-point {
    background: var(--pain-point-bg);
    border-left: 5px solid var(--pain-point-border);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    color: var(--pain-point-text);
}

.solution-box {
    background: var(--solution-box-bg);
    border-left: 5px solid var(--solution-box-border);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    color: var(--solution-box-text);
}

.icon-feature {
    text-align: center;
    padding: 2rem 1rem;
}

.icon-feature i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-join {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #17a2b8 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-join:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #17a2b8 0%, var(--secondary-color) 100%);
}

.slot-count {
    background: var(--gold);
    color: var(--dark-bg);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.pricing-tier-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    margin: 0.5rem;
}

.modal-image {
    max-width: 430px;
    height: auto;
    border-radius: 10px;
    display: block;
}

#imageModal .modal-dialog {
    max-width: fit-content;
    width: auto;
    margin: 1.75rem auto;
}

#imageModal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem;
}

#imageModal .modal-content {
    max-height: 95vh;
    background: var(--modal-bg);
    color: var(--modal-text);
}

@media (max-width: 500px) {
    .modal-image {
        max-width: 100%;
    }

    #imageModal .modal-dialog {
        max-width: 95vw;
    }
}

.dlg-label {
    font-weight: bold;
    text-align: right;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 0.5rem 0;
    }

    .hero-section h1 {
        font-size: 1.2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .logo-container {
        max-width: 400px;
    }

    .testimonial-card {
        max-width: 200px;
    }

    .testimonial-card img {
        height: 140px;
    }

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

    .tldr-content {
        padding: 1rem;
    }

    .dlg-label {
        text-align: left;
    }
}

/* Animated background particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 15s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-50px) translateX(50px); }
    50% { transform: translateY(-100px) translateX(0); }
    75% { transform: translateY(-50px) translateX(-50px); }
}

/* Override Bootstrap bg classes for dark mode */
section.bg-white,
div.bg-white {
    background: var(--section-bg) !important;
}

section.bg-light,
div.bg-light {
    background: var(--section-alt-bg) !important;
}

.card {
    background-color: var(--card-bg);
    color: var(--page-text);
}

.table {
    color: var(--page-text);
}

.table-light {
    background-color: var(--section-alt-bg) !important;
    color: var(--page-text) !important;
}

.modal-content {
    background-color: var(--modal-bg);
    color: var(--modal-text);
}

.modal-header,
.modal-footer {
    border-color: var(--card-border);
}

/* Password match status - dark mode compatible */
.password-match-success {
    color: #198754;
}

.password-match-error {
    color: #dc3545;
}

@media (prefers-color-scheme: dark) {
    .password-match-success {
        color: #20c997;
    }

    .password-match-error {
        color: #ff6b6b;
    }
}

/* Equal height boxes in rows */
.row.equal-height {
    display: flex;
    flex-wrap: wrap;
}

.row.equal-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.row.equal-height .pain-point,
.row.equal-height .solution-box,
.row.equal-height .highlight-box,
.row.equal-height .icon-feature {
    flex: 1;
    display: flex;
    flex-direction: column;
}
