:root {
    /* ================= LIGHT THEME – DARK RED ================= */
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface2: #f0f1f5;

    --primary: #8b1d1d;          /* dark red */
    --primary-dark: #6f1515;
    --primary-soft: rgba(139,29,29,0.12);

    --text: #1a1a1f;
    --text-secondary: #6b6f85;

    --border: rgba(139,29,29,0.22);
    --glow: 0 0 18px rgba(139,29,29,0.25);
}
/* ================= PROGRESS BAR ================= */

.progress-wrapper {
    width: 100%;
    margin-top: 18px;
}

.progress-bar {
    width: 100%;
    height: 34px;
    background: #ececf2;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #c23a3a, var(--primary))!important;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    transition: width 0.8s ease-in-out;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 6px rgba(139,29,29,0.4);
    }
    to {
        box-shadow: 0 0 16px rgba(194,58,58,0.7);
    }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.hidden {
    display: none;
}

.modal-box {
    width: 320px;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.modal-box h3 {
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}
price-chart {
    margin-top: 2rem;
    padding: 1.5rem;
}

.price-chart h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    text-align: center;
}

#priceChart {
    width: 100%;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
}
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.4rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-right a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: 0.2s;
}

.nav-right a:hover {
    color: var(--primary);
}

.nav-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
}

.nav-btn:hover {
    background: rgba(240,185,11,0.08);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ================= BACKGROUND ================= */

.background-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(139,29,29,0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(139,29,29,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

.container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), #c23a3a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Glassmorphism */
.glass {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* Banner */
.banner {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* Logo + Social */
.logo-social-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.main-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 10%;
    background: rgba(240,185,11,0.08);
    padding: 1.2rem;
    border: 2px solid var(--border);
    box-shadow: var(--glow);
}

.social-icons {
    display: flex;
    gap: 1.8rem;
}

.social-icons img {
    width: 44px;
    height: 44px;
}

/* Description */
.description-wrapper {
    background: rgba(240,185,11,0.04);
    padding: 1.8rem;
    border-radius: 16px;
    border: 1px solid rgba(240,185,11,0.15);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ================= GRID ================= */

.content-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 380px;
    gap: 3rem;
    align-items: start;
}

/* ================= CONTRIBUTE CARD ================= */

.contribute-card {
    padding: 2.2rem;
    position: sticky;
    top: 2rem;
}

/* Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.6rem;
}

.card-header h2 {
    font-size: 1.6rem;
}

.badge {
    background: rgba(240,185,11,0.12);
    color: var(--primary);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Form layout */
#contribute-form {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

/* Input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(240,185,11,0.05);
    border: 1px solid rgba(240,185,11,0.2);
    border-radius: 12px;
    padding: 0 1rem;
    height: 52px;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
}

.currency {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 1.05rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), #c23a3a);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.status-message {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* ================= STATS BOX ================= */

.stats-box {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(240,185,11,0.05);
    border: 1px solid rgba(240,185,11,0.15);
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
}

/* ================= TOP BUYERS ================= */

.top-buyers-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(240,185,11,0.15);
}

.top-buyers-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
}

.buyers-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.buyer-item {
    background: rgba(240,185,11,0.05);
    border: 1px solid rgba(240,185,11,0.2);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .contribute-card {
        position: relative;
        top: unset;
        order: -1;
    }
}
