:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(148, 163, 184, 0.1);
    --accent: #10b981;
    --accent-hover: #059669;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger: #ef4444;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Resets & Base --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Background Grid Effect --- */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--card-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--card-border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
}

.dot { color: var(--accent); }

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* --- Cards Base --- */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover { 
    transform: translateY(-2px); 
    border-color: rgba(16, 185, 129, 0.3); 
}

.card h1, .card h2, .card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

/* --- Hero Card --- */
.hero-card { 
    grid-column: 1 / -1; 
    text-align: center; 
    padding: 3.5rem 2rem; 
}

.hero-card h1 { 
    font-size: 3rem; 
    margin-bottom: 1rem; 
    letter-spacing: -1px; 
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle { 
    color: var(--text-secondary); 
    font-size: 1.15rem; 
    max-width: 650px; 
    margin: 0 auto 2.5rem; 
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    min-width: 90px;
}

.countdown-item span { 
    font-size: 2.2rem; 
    font-weight: 700; 
    color: var(--accent); 
    line-height: 1;
}

.countdown-item small { 
    color: var(--text-secondary); 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-top: 0.5rem;
}

.timer-label { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}

/* --- Buy Card --- */
.buy-card { 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.price-display { margin: 1.5rem 0; }

.usd-price { 
    display: block; 
    font-size: 2.8rem; 
    font-weight: 700; 
    color: var(--text-primary); 
    line-height: 1;
}

.local-price { 
    display: block; 
    font-size: 1.1rem; 
    color: var(--accent); 
    margin-top: 0.5rem; 
}

.buy-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* --- Benefits Card --- */
.benefits-list { list-style: none; margin-top: 1rem; }

.benefits-list li { 
    margin-bottom: 1.2rem; 
    padding-left: 1.8rem; 
    position: relative; 
    color: var(--text-secondary); 
    font-size: 0.95rem;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
}

.benefits-list li strong { color: var(--text-primary); }

/* --- Bid Card --- */
.bid-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem; 
}

.bid-count { 
    background: var(--bg-dark); 
    padding: 0.3rem 0.8rem; 
    border-radius: 8px; 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    border: 1px solid var(--card-border);
}

.current-bid-display {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.current-bid-display small { 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    letter-spacing: 1px; 
}

.bid-amount { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: var(--accent); 
    margin-top: 0.5rem; 
    line-height: 1;
}

.local-bid { 
    display: block; 
    font-size: 1rem; 
    color: var(--text-secondary); 
    font-weight: 400; 
    margin-top: 0.5rem; 
}

.bid-history {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.4);
}

/* Custom Scrollbar for bid history */
.bid-history::-webkit-scrollbar { width: 6px; }
.bid-history::-webkit-scrollbar-track { background: transparent; }
.bid-history::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }

.bid-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

.bid-row:last-child { border-bottom: none; }

.bid-row .bidder { color: var(--text-primary); font-weight: 500; display: block; }
.bid-row .email { color: var(--text-secondary); font-size: 0.75rem; display: block; margin-top: 2px; }
.bid-row .amount { color: var(--accent); font-weight: 600; display: block; text-align: right; }
.bid-row .date { color: var(--text-secondary); font-size: 0.75rem; text-align: right; margin-top: 2px; display: block;}

.loading-text {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Form & Captcha --- */
.bid-form { display: flex; flex-direction: column; gap: 0.8rem; }

.bid-form input {
    background: var(--bg-dark);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.bid-form input:focus { 
    outline: none; 
    border-color: var(--accent); 
}

.captcha-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.captcha-box label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.captcha-box input {
    width: 100%;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
    width: 100%;
}

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

.btn-secondary { background: var(--text-primary); color: var(--bg-dark); }
.btn-secondary:hover { background: #cbd5e1; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

.form-message { 
    margin-top: 0.5rem; 
    font-size: 0.85rem; 
    text-align: center; 
    min-height: 1.2rem; 
}
.form-message.success { color: var(--accent); }
.form-message.error { color: var(--danger); }

/* --- Footer --- */
.footer { 
    text-align: center; 
    margin-top: 4rem; 
    padding-top: 2rem; 
    border-top: 1px solid var(--card-border); 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
}

.footer p { margin-bottom: 0.5rem; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    .hero-card h1 { font-size: 2.2rem; }
    .countdown-item { min-width: 70px; padding: 0.8rem 1rem; }
    .countdown-item span { font-size: 1.8rem; }
    .usd-price { font-size: 2.2rem; }
    .bid-amount { font-size: 2rem; }
}

@media (max-width: 480px) {
    .container { padding: 1rem; }
    .header { flex-direction: column; gap: 1rem; text-align: center; }
    .card { padding: 1.5rem; }
    .countdown-wrapper { gap: 0.5rem; }
    .countdown-item { min-width: 60px; padding: 0.6rem; }
    .countdown-item span { font-size: 1.5rem; }
}