/* =========================================================
   Lucky Draw Pro - Lottery Page Styles
   ========================================================= */

:root {
    --color-primary: #1e3744;     /* deep slate teal */
    --color-primary-dark: #162935;
    --color-accent: #f5a623;      /* orange */
    --color-accent-dark: #ed8c1a;
    --color-bg: #f5f7fb;
    --color-card: #ffffff;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-light-yellow: #fafbf9;
    --color-light-yellow-border: #f1f1f1;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
    --radius: 14px;
    --radius-sm: 10px;
    --bs-btn-active-bg: var(--color-primary);
    --bs-btn-active-color: var(--color-bg);
}

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

html, body { background: var(--color-bg); }

body {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* ============ Soft card utility ============ */
.card-soft {
    border: 0 !important;
    box-shadow: var(--shadow-sm) !important;
    transition: box-shadow .25s ease, transform .25s ease;
}

.card-soft:hover {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 5%), 0 2px 6px rgba(15, 23, 42, 2%) !important;
}

/* ============ Header ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, .06) !important;
    box-shadow: 0 2px 16px rgba(15, 23, 42, .045);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .2px;
    color: var(--color-primary) !important;
}

.brand i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    box-shadow: 0 4px 12px rgba(245, 166, 35, .35);
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: #fff;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.nav-pill:hover {
    background: #f9fafb;
    color: var(--color-primary);
    border-color: #d4dbe3;
    transform: translateY(-1px);
}

.nav-pill i { font-size: 14px; }

.nav-pill-deposit {
    border: 0;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 166, 35, .30);
}

.nav-pill-deposit:hover {
    color: #fff;
    filter: brightness(1.03);
    box-shadow: 0 8px 18px rgba(245, 166, 35, .42);
}

.nav-pill-deposit i { color: #fff; }

/* ============ Hero ============ */
.hero-section { padding: 24px 0 0; }

.hero-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 166, 35, .10), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(91, 140, 165, .18), transparent 60%),
        linear-gradient(135deg, #162935 0%, #1e3744 45%, #294b5d 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px 36px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: .2px;
}

.hero-sub {
    color: #c8d3df;
    margin: 0;
    font-size: 15px;
}

.balance-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 20px;
    text-align: center;
}

.balance-label {
    color: #b8c4d1;
    font-size: 12px;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.balance-amount {
    color: #ffffff;
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1;
}

.btn-deposit {
    background: var(--color-accent);
    color: #fff;
    border: none;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s;
}

.btn-deposit:hover {
    background: var(--color-accent-dark);
    color: #fff;
}

/* ============ Auth card (logged-out) ============ */
.header-auth-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 28px 24px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 50% -10%, rgba(245, 166, 35, .16), transparent 60%),
        rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 30px rgba(0, 0, 0, .18);
}

/* soft corner glow */
.header-auth-card::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(245, 166, 35, .22), transparent 70%);
    pointer-events: none;
}

.header-auth-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 0 14px;
    border-radius: 50%;
    font-size: 23px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    box-shadow: 0 6px 16px rgba(245, 166, 35, .40);
}

/* concentric ring around the badge */
.header-auth-badge::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(245, 166, 35, .35);
}

.header-auth-title {
    color: #ffffff;
    font-size: 23px;
    font-weight: 700;
    margin: 0 0 5px;
    line-height: 1.25;
    letter-spacing: .2px;
}

.header-auth-sub {
    color: #c8d3df;
    font-size: 13.5px;
    margin: 0 0 16px;
}

.header-auth-perks {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.header-auth-perks li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    color: #d7e0ea;
}

.header-auth-perks i {
    color: var(--color-accent);
    font-size: 13px;
}

.header-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-btn-auth {
    width: 100%;
    font-weight: 600;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
}

.header-btn-auth:active { transform: translateY(1px); }

.header-btn-auth-primary {
    color: #fff;
    border: none;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    box-shadow: 0 8px 18px rgba(245, 166, 35, .32);
}

.header-btn-auth-primary:hover {
    color: #fff;
    box-shadow: 0 10px 24px rgba(245, 166, 35, .45);
    filter: brightness(1.04);
}

.header-btn-auth-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.30);
}

.header-btn-auth-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
}

/* ============ Stats ============ */
.stats-section { padding: 18px 0 8px; }

.stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    text-align: center;
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 2px;
}

.icon-blue,
.icon-amber,
.icon-green {
    background: transparent;
    color: var(--color-primary);
    font-size: 26px;
    transition: color .25s ease;
}

.stat-card:hover .icon-blue,
.stat-card:hover .icon-amber,
.stat-card:hover .icon-green { color: var(--color-accent); }

[theme="dark"] .stat-card .icon-blue,
[theme="dark"] .stat-card .icon-amber,
[theme="dark"] .stat-card .icon-green { color: var(--color-accent); }

.stat-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-info p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--color-muted);
}

/* ============ Section heading ============ */
.steps-section { padding: 18px 0 8px; }

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i { color: var(--color-accent); }

.approved-badge {
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============ Step Cards ============ */
.step-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.step-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.step-tag {
    background: #fff7e0;
    color: #b67a10;
    border: 1px solid #fde9b6;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.step-tag i { color: #e4972c; font-size: 10px; }

.premium-tag {
    color: var(--color-text);
    font-size: 12px;
    font-weight: 500;
}

.step-price {
    color: var(--color-accent);
    font-size: 28px;
    font-weight: 700;
    margin: 4px 0 12px;
    line-height: 1.1;
}

.prize-pool {
    background: var(--color-light-yellow);
    border: 1px solid var(--color-light-yellow-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
    flex-grow: 1;
}

.prize-pool-label {
    color: #8a6a1c;
    font-size: 12px;
    margin: 0 0 2px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prize-pool-desc {
    color: #5a4513;
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

[theme="dark"] .prize-pool {
    background: #ffffff2b;
    border: 1px solid #ffffff61;
}

[theme="dark"] .prize-pool-label {
    color: #FFF;
}
[theme="dark"] .prize-pool-desc {
    color: #FFF;
}

.btn-buy {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    transition: background .2s;
}

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

/* ============ Trust Section ============ */
.trust-section { padding: 18px 0; }

.trust-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text);
}

.trust-item i { color: var(--color-primary); }
.trust-item .text-warning { color: var(--color-accent) !important; }

.trust-pays {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.pay-icon {
    font-size: 24px;
    color: #1f2937;
}

.pay-icon.visa { color: #1a1f71; font-size: 30px; }
.pay-icon.paypal { color: #009cde; font-size: 30px; }

/* ============ Winners + Chart ============ */
.winners-chart-section { padding: 4px 0 24px; }

.winners-card,
.chart-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.card-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winners-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.winners-list li {
    padding: 7px 0;
    font-size: 14px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.winners-list li i {
    color: var(--color-muted);
    font-size: 12px;
}

.chart-card { padding: 14px 18px; }
#winnersChart { width: 100% !important; height: 240px !important; }

.page-end-spacer { height: 24px; }

/* ============ Auth Pages (login / register) ============ */
.auth-body { background: var(--color-bg); min-height: 100vh; }

.auth-section { padding: 40px 0 60px; }

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 36px;
}

.auth-head {
    text-align: center;
    margin-bottom: 22px;
}

.auth-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(245, 166, 35, .12);
    color: var(--color-accent);
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 4px;
}

.auth-sub {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0;
}

.auth-form { margin-top: 6px; }

.form-group-soft { margin-bottom: 14px; }

.form-group-soft label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-size: 14px;
    pointer-events: none;
}

.input-wrap .form-control {
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fafbfc;
    color: var(--color-text);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap .form-control::placeholder { color: #adb5bd; }

.input-wrap .form-control:focus {
    border-color: var(--color-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .15);
    outline: none;
}

.toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--color-muted);
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-pass:hover { color: var(--color-primary); }

.form-check-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
}

.form-check-soft input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.link-accent {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 13px;
    transition: color .2s;
}

.link-accent:hover { color: var(--color-accent-dark); }

.btn-primary-soft {
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .2s;
}

.btn-primary-soft:hover {
    background: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary-soft:active,
.btn-primary-soft:focus,
.btn-primary-soft:active:focus {
    background: var(--color-primary-dark);
    color: #fff;
    box-shadow: none;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--color-muted);
    margin: 16px 0 0;
}

/* ---- Password strength meter ---- */
.password-strength {
    margin-top: 6px;
    height: 4px;
    background: #eef0f3;
    border-radius: 999px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background: transparent;
    border-radius: 999px;
    transition: width .25s ease, background-color .25s ease;
}

.strength-bar.strength-weak   { width: 33%;  background: #ef4444; }
.strength-bar.strength-medium { width: 66%;  background: #f59e0b; }
.strength-bar.strength-strong { width: 100%; background: #16a34a; }

.strength-text {
    margin-top: 4px;
    font-size: 11px;
    color: var(--color-muted);
}

@media (max-width: 575.98px) {
    .auth-card { padding: 24px 20px; }
    .auth-title { font-size: 19px; }
}

/* ============ Responsive ============ */
@media (max-width: 991.98px) {
    .hero-card { padding: 24px; }
    .hero-title { font-size: 22px; }
    .navbar-collapse {
        background: #fff;
        padding: 12px;
        border-radius: 12px;
        margin-top: 8px;
        border: 1px solid var(--color-border);
    }
    .navbar-nav { width: 100%; }
    .nav-pill { width: 100%; justify-content: flex-start; }
}

@media (max-width: 767.98px) {
    .hero-card { padding: 20px; text-align: center; }
    .balance-card { margin-top: 8px; }
    .trust-card { justify-content: center; text-align: center; }
    .trust-pays { order: 3; width: 100%; justify-content: center; }
    .section-title { font-size: 16px; }
    .step-price { font-size: 24px; }
    .balance-amount { font-size: 28px; }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 19px; }
    .hero-sub { font-size: 13px; }
    .stat-card { padding: 14px; }
    .stat-info h3 { font-size: 16px; }
    .btn-deposit { font-size: 12px; padding: 7px 14px; }
}

/* ============ Dark Mode ============ */
[theme="dark"] {
    --color-bg: #0b1622;
    --color-card: #14202e;
    --color-text: #e6eaf0;
    --color-muted: #9aa6b3;
    --color-border: #1f2d3d;
}

[theme="dark"] .site-header,
[theme="dark"] .stat-card,
[theme="dark"] .step-card,
[theme="dark"] .trust-card,
[theme="dark"] .winners-card,
[theme="dark"] .chart-card,
[theme="dark"] .nav-pill {
    background: var(--color-card);
    color: var(--color-text);
    border-color: var(--color-border);
}

[theme="dark"] .brand,
[theme="dark"] .section-title,
[theme="dark"] .stat-info h3,
[theme="dark"] .card-heading {
    color: #fff !important; /* base .brand sets color with !important, so the override needs it too */
}

[theme="dark"] .site-header {
    background: rgba(20, 32, 46, .82);
    border-bottom-color: var(--color-border) !important;
}

/* Keep the amber Deposit CTA vivid in dark mode (overrides the generic .nav-pill dark rule) */
[theme="dark"] .nav-pill-deposit {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #fff;
    border: 0;
}

[theme="dark"] .winners-list li,
[theme="dark"] .trust-item { color: var(--color-text); }

/* Step "Step N" chip: cream → translucent amber so it reads on dark cards */
[theme="dark"] .step-tag {
    background: rgba(245, 166, 35, .14);
    border-color: rgba(245, 166, 35, .35);
    color: var(--color-accent);
}
[theme="dark"] .step-tag i { color: var(--color-accent); }

/* Buy button: add definition against the dark card */
[theme="dark"] .btn-buy {
    background: #243a4a;
    border: 1px solid var(--color-border);
}
[theme="dark"] .btn-buy:hover { background: #2c4658; }

/* Trust payment icons / chart legend stay legible */
[theme="dark"] .card-heading,
[theme="dark"] .balance-amount { color: #fff; }

/* ---- Auth pages (login / register) share this stylesheet ---- */
[theme="dark"] .auth-body { background: var(--color-bg); }
[theme="dark"] .auth-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}
[theme="dark"] .auth-title,
[theme="dark"] .form-group-soft label { color: var(--color-text); }
[theme="dark"] .auth-icon { background: rgba(245, 166, 35, .16); }
[theme="dark"] .input-wrap .form-control {
    background: #0f1b27;
    border-color: var(--color-border);
    color: var(--color-text);
}
[theme="dark"] .input-wrap .form-control:focus { background: #0b1622; }
[theme="dark"] .input-wrap .form-control::placeholder { color: var(--color-muted); }
