:root {
    --brand: #1E3A5F;
    --brand-dark: #152D4A;
    --brand-light: #4A7FB5;
    --brand-bg: #F5F3EE;
    --accent: #00B894;
    --accent-dark: #00A381;
    --warm: #C49A3C;
    --warm-dark: #A67C2E;
    --danger: #E17055;
    --text: #2D3436;
    --text-secondary: #636E72;
    --border: #E5E1D8;
    --card-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
    --card-shadow-hover: 0 8px 30px rgba(30, 58, 95, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: #FAFBFC;
    -webkit-font-smoothing: antialiased;
}

.container { flex: 1; }

/* ── Navbar ── */
.navbar-brand-custom {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff !important;
}
.navbar-brand-custom .brand-accent { color: var(--warm); }
.navbar-logo {
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}

.site-nav {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border-bottom: none;
    padding: .75rem 0;
    box-shadow: 0 2px 20px rgba(30, 58, 95, 0.2);
}
.site-nav .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    font-size: .9rem;
    padding: .5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.site-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,.12);
}
.nav-cta-primary {
    background: var(--warm) !important;
    color: var(--text) !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    padding: .5rem 1.2rem !important;
    margin-right: .5rem;
    box-shadow: 0 2px 10px rgba(196, 154, 60, .4);
    transition: all .2s;
}
.nav-cta-primary:hover {
    background: var(--warm-dark) !important;
    color: var(--text) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(196, 154, 60, .5);
}
.nav-cta {
    background: rgba(255,255,255,.18) !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    color: #fff !important;
    font-weight: 600 !important;
    margin-left: .25rem;
}
.nav-cta:hover {
    background: rgba(255,255,255,.28) !important;
}
.nav-user {
    color: rgba(255,255,255,.7) !important;
    font-size: .85rem;
    cursor: default;
}

/* ── Hero Section ── */
.hero {
    background: linear-gradient(135deg, var(--brand) 0%, #2A5080 50%, var(--brand-light) 100%);
    color: #fff;
    padding: 3.5rem 0 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: .75rem;
}
.hero p {
    font-size: 1.1rem;
    opacity: .9;
    max-width: 600px;
}
.hero .search-bar {
    max-width: 560px;
}
.hero .form-control {
    border: none;
    border-radius: 50px;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.btn-hero-action {
    background: var(--warm) !important;
    color: var(--text) !important;
    font-weight: 800;
    font-size: 1.15rem;
    padding: .85rem 2rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 20px rgba(196, 154, 60, .5);
    transition: all .25s;
    letter-spacing: .01em;
}
.btn-hero-action:hover {
    background: var(--warm-dark) !important;
    color: var(--text) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(196, 154, 60, .6);
}
.btn-hero-secondary {
    background: rgba(255,255,255,.2) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 1.05rem;
    padding: .85rem 1.75rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,.4) !important;
    transition: all .25s;
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,.3) !important;
    color: #fff !important;
    transform: translateY(-2px);
}
.hero .btn-search {
    border-radius: 50px;
    padding: .75rem 1.75rem;
    font-weight: 600;
    background: var(--warm);
    border: none;
    color: var(--text);
    box-shadow: 0 4px 15px rgba(253,203,110,.3);
}
.hero .btn-search:hover {
    background: var(--warm-dark);
    transform: translateY(-1px);
}

/* ── Category Pills ── */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}
.cat-pill {
    display: inline-block;
    padding: .4rem 1rem;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: #fff;
}
.cat-pill:hover {
    border-color: var(--brand-light);
    color: var(--brand);
    background: var(--brand-bg);
}
.cat-pill.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ── Campaign Cards ── */
.campaign-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: all .25s ease;
    overflow: hidden;
    background: #fff;
}
.campaign-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.campaign-card .card-img-top {
    height: 180px;
    object-fit: cover;
}
.campaign-card .card-body {
    padding: 1.25rem;
}
.campaign-card .card-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
}
.campaign-card .card-title a:hover { color: var(--brand); }
.campaign-card .card-text {
    font-size: .875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.campaign-card .sig-count {
    font-weight: 700;
    font-size: .95rem;
    color: var(--brand);
}
.campaign-card .creator-name {
    font-size: .8rem;
    color: var(--text-secondary);
}

/* ── Promoted Badge & Card ── */
.promoted-badge {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .25rem .6rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--warm), #D4A84B) !important;
    color: var(--text) !important;
}
.promoted-card {
    border: 2px solid var(--warm) !important;
    box-shadow: 0 4px 20px rgba(196, 154, 60, .2);
}
.promoted-card:hover {
    box-shadow: 0 8px 30px rgba(196, 154, 60, .3);
}

.no-cover-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--brand-bg) 0%, #E8E2D4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--brand-light);
}

/* ── Category Badge ── */
.category-badge {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .3rem .7rem;
    border-radius: 50px;
    background: var(--brand-bg) !important;
    color: var(--brand) !important;
}

/* ── Progress Bar ── */
.progress {
    height: 6px;
    border-radius: 3px;
    background: #EDE9DF;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--accent), #55EFC4) !important;
    border-radius: 3px;
}

/* ── Signature Count (detail page) ── */
.signature-count {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* ── Sign / Boost Buttons ── */
.btn-sign {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: none;
    color: #fff;
    font-weight: 800;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1.15rem;
    letter-spacing: .01em;
    box-shadow: 0 6px 20px rgba(30, 58, 95, .35);
    transition: all .25s ease;
    animation: pulse-sign 2s ease-in-out infinite;
}
.btn-sign:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(30, 58, 95, .45);
    color: #fff;
}
.btn-sign:active {
    transform: translateY(0) scale(0.98);
}
@keyframes pulse-sign {
    0%, 100% { box-shadow: 0 6px 20px rgba(30, 58, 95, .35); }
    50% { box-shadow: 0 8px 30px rgba(30, 58, 95, .55); }
}

.btn-boost {
    background: linear-gradient(135deg, var(--warm) 0%, #D4A84B 100%);
    border: none;
    color: var(--text);
    font-weight: 800;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1.15rem;
    box-shadow: 0 6px 20px rgba(196, 154, 60, .4);
    transition: all .25s ease;
}
.btn-boost:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(196, 154, 60, .55);
    color: var(--text);
}

/* ── Sticky mobile CTA ── */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    padding: .75rem 1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
    border-top: 1px solid var(--border);
}
.mobile-cta-bar .btn-sign,
.mobile-cta-bar .btn-boost {
    animation: none;
    padding: .85rem;
    font-size: 1.05rem;
}
@media (max-width: 991px) {
    .mobile-cta-bar { display: block; }
    .sign-card { display: none; }
}

/* ── Share Buttons ── */
.share-buttons { gap: .4rem; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .8rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: #fff;
}
.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.share-btn.x-btn:hover { border-color: #000; color: #000; }
.share-btn.fb-btn:hover { border-color: #1877F2; color: #1877F2; }
.share-btn.wa-btn:hover { border-color: #25D366; color: #25D366; }
.share-btn.copy-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ── Sign Card (sidebar) ── */
.sign-card {
    border: 2px solid var(--brand-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(30, 58, 95, .12);
    background: linear-gradient(180deg, #fff 0%, var(--brand-bg) 100%);
}

/* ── Detail Page ── */
.campaign-cover {
    max-height: 420px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--radius-lg);
}
.campaign-description {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #3D3D3D;
}
.meta-info {
    font-size: .9rem;
    color: var(--text-secondary);
}

/* ── Auth Cards ── */
.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 25px rgba(30, 58, 95, 0.1);
    background: #fff;
}
.auth-card .card-body { padding: 2.5rem; }
.auth-card h2 {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
}
.auth-card .form-control {
    border-radius: var(--radius-sm);
    padding: .7rem 1rem;
    border: 1.5px solid var(--border);
    transition: border-color .2s, box-shadow .2s;
}
.auth-card .form-control:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .1);
}
.auth-card .btn-primary {
    background: var(--brand);
    border: none;
    font-weight: 700;
    padding: .75rem;
    border-radius: var(--radius-sm);
}
.auth-card .btn-primary:hover {
    background: var(--brand-dark);
}

/* ── Analytics ── */
.analytics-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    background: #fff;
}
.analytics-card .metric {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.analytics-card .label {
    font-size: .82rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: .25rem;
}
.analytics-card.warn .metric {
    background: linear-gradient(135deg, var(--warm-dark), var(--warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.analytics-card.green .metric {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Cards (general) ── */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.card-header {
    background: #FAFBFC;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .9rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
}
.alert-success { background: #D4EDDA; color: #155724; }

/* ── Form Controls (general) ── */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    padding: .65rem 1rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .1);
}

/* ── Pagination ── */
.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--border);
    margin: 0 .15rem;
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-secondary);
}
.pagination .page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
}

/* ── Footer ── */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
}
.site-footer p {
    color: var(--text-secondary);
    font-size: .85rem;
    margin: 0;
}

/* ── Boost Page ── */
.boost-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: .5rem;
}
.boost-option:hover, .boost-option.selected {
    border-color: var(--warm);
    background: #FDFBF5;
}
.boost-option input[type="radio"] { accent-color: var(--warm-dark); }
.boost-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

/* ── Success Page ── */
.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent) 0%, #55EFC4 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 184, 148, .25);
}

/* ── Signed Badge ── */
.signed-badge {
    background: linear-gradient(135deg, #D4EDDA, #C3E6CB);
    color: #155724;
    border-radius: var(--radius-sm);
    padding: .6rem 1rem;
    font-weight: 600;
    font-size: .9rem;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 991px) {
    .mobile-cta-bar { display: block; }
    .sign-card { display: none; }

    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    .btn-hero-action {
        font-size: 1rem;
        padding: .75rem 1.5rem;
    }
    .btn-hero-secondary {
        font-size: .95rem;
        padding: .75rem 1.25rem;
    }

    .campaign-cover { max-height: 300px; }
}

/* Mobile */
@media (max-width: 768px) {
    .hero { padding: 2rem 0 1.5rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: .9rem; }
    .hero .search-bar { flex-direction: column; }
    .hero .search-bar .btn-search { width: 100%; }

    .btn-hero-action, .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }

    .signature-count { font-size: 2.5rem; }
    .campaign-cover { max-height: 220px; border-radius: var(--radius); }
    .campaign-description { font-size: .95rem; }

    .category-pills { gap: .35rem; }
    .cat-pill { font-size: .75rem; padding: .3rem .75rem; }

    .campaign-card .card-img-top { height: 150px; }

    .auth-card .card-body { padding: 1.5rem; }
    .auth-card h2 { font-size: 1.3rem; }

    .analytics-card .metric { font-size: 1.8rem; }

    .share-buttons { gap: .3rem; }
    .share-btn { font-size: .75rem; padding: .35rem .6rem; }

    h1 { font-size: 1.5rem !important; }

    .container.mt-4 { margin-top: 1rem !important; }

    .site-footer { padding: 1.5rem 0; margin-top: 2rem; }

    /* Add bottom padding so mobile CTA bar doesn't cover content */
    body { padding-bottom: 80px; }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.35rem; }
    .hero p { font-size: .85rem; max-width: 100%; }

    .navbar-brand-custom { font-size: 1.15rem; }

    .campaign-card .card-title a { font-size: .95rem; }
    .campaign-card .card-text { font-size: .8rem; }
    .campaign-card .card-img-top { height: 130px; }

    .boost-amount { font-size: 1.1rem; }
    .boost-option { padding: .75rem 1rem; }
}

/* Navbar mobile adjustments */
@media (max-width: 991px) {
    .site-nav .navbar-collapse {
        padding-top: .75rem;
    }
    .site-nav .navbar-collapse .nav-link {
        padding: .6rem .5rem;
    }
    .nav-cta-primary, .nav-cta {
        display: inline-block;
        margin: .35rem .25rem;
    }
}
