/* CSS Reset & Design Variables */
:root {
    --bg-dark: #0b0c10;
    --bg-card: #14161d;
    --bg-card-hover: #1c1f29;
    --bg-card-border: #262936;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --shadow-glow: 0 10px 25px -5px rgba(239, 68, 68, 0.15);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Account Bar */
.account-bar {
    background-color: #0f1117;
    border-bottom: 1px solid var(--bg-card-border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.account-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.82rem;
}

.status-badge {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

.active-bets-label {
    color: var(--text-muted);
}

.account-balance-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.balance-amount {
    color: var(--accent-green);
    font-weight: 800;
    font-size: 1.05rem;
}

/* Buttons */
.btn {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 12px 24px; font-size: 1.05rem; }
.btn-accent {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}
.btn-accent:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
}
.btn-primary {
    background-color: var(--accent-blue);
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
}
.btn-primary:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-red {
    background-color: var(--accent-red);
    color: white;
}
.btn-red:hover { background-color: var(--accent-red-hover); }
.w-100 { width: 100%; }
.mt-2 { margin-top: 15px; }

/* Header */
.main-header {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-red { color: var(--accent-red); }
.logo-tag {
    font-size: 0.7rem;
    background: var(--bg-card-border);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-sans);
    letter-spacing: 1px;
}
.main-nav {
    display: flex;
    gap: 20px;
}
.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text-main); }
.search-box {
    position: relative;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.search-box input {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 20px;
    padding: 8px 15px 8px 34px;
    color: white;
    font-size: 0.85rem;
    width: 200px;
    transition: all 0.2s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    width: 240px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 50px 40px;
    overflow: hidden;
    max-width: 1240px;
    margin: 0 auto;
    border-radius: 16px;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(11,12,16,0.95) 0%, rgba(11,12,16,0.7) 50%, rgba(11,12,16,0.3) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
}
.hero-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
.hero-title-main {
    font-family: var(--font-heading);
    font-size: 4.8rem;
    line-height: 0.9;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -1px;
}
.hero-title-sub {
    font-family: var(--font-heading);
    font-size: 4.2rem;
    line-height: 1;
    color: #ffffff;
    text-transform: uppercase;
    background: var(--accent-red);
    display: inline-block;
    padding: 2px 14px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.hero-subtitle {
    font-weight: 600;
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-bottom: 25px;
    line-height: 1.4;
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.hero-volume {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Meta Bar */
.meta-bar {
    max-width: 1240px;
    margin: 20px auto 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-card-border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.meta-left { display: flex; align-items: center; gap: 12px; }
.category-tag {
    background-color: var(--accent-red);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.meta-right { display: flex; align-items: center; gap: 15px; }
.meta-right a { color: var(--text-muted); text-decoration: none; font-size: 1rem; transition: color 0.2s; }
.meta-right a:hover { color: var(--text-main); }

/* Main Content Layout */
.main-content {
    max-width: 1240px;
    margin: 30px auto 60px;
    padding: 0 20px;
}
.content-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 35px;
}

/* Category Filter Pills */
.market-category-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

/* Active Markets Selector Cards */
.market-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.market-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.market-card:hover {
    background: var(--bg-card-hover);
    border-color: #3b82f6;
    transform: translateY(-2px);
}
.market-card.active {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 1px var(--accent-blue);
}
.market-card-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.market-card-badge.politics { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.market-card-badge.governance { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.market-card-badge.sports { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.market-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-main);
}
.market-card-top-odds {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--bg-card-border);
    padding-top: 10px;
}

/* Prediction Market Widget */
.prediction-market-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.market-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}
.market-title-group { display: flex; flex-direction: column; gap: 6px; }
.market-category-tag {
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.market-header h3 { font-size: 1.3rem; font-weight: 700; color: white; line-height: 1.3; }
.market-status-live {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.market-description { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; }

/* Dynamic Odds Progress Bars */
.odds-visualizer-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.25);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--bg-card-border);
}
.odds-bar-item { display: flex; flex-direction: column; gap: 6px; }
.odds-bar-header { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 700; }
.odds-bar-label { color: #e5e7eb; }
.odds-bar-percentage { font-family: var(--font-heading); font-size: 1.1rem; }
.odds-progress-track {
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    overflow: hidden;
}
.odds-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Betting Form Interface */
.betting-interface {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--bg-card-border);
    padding: 20px;
    border-radius: 10px;
}
.betting-interface h4 { font-size: 1.05rem; margin-bottom: 15px; color: white; display: flex; align-items: center; gap: 8px; }
.bet-form { display: flex; flex-direction: column; gap: 15px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }

select, input[type="number"], input[type="text"], input[type="email"] {
    width: 100%;
    background-color: #0b0c10;
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
select:focus, input:focus { outline: none; border-color: var(--accent-blue); }

.input-group { position: relative; }
.input-group .currency-symbol { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: bold; }
.input-group input { padding-left: 30px; }

.payout-estimate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #34d399;
}
.payout-multiplier { font-weight: 800; font-size: 0.95rem; }

/* Article Body */
.article-text-container { margin-bottom: 40px; }
.author-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-card-border);
}
.author-avatar {
    width: 46px;
    height: 46px;
    background-color: var(--bg-card-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--accent-red);
}
.author-info { display: flex; flex-direction: column; }
.author-name { font-weight: 700; font-size: 0.92rem; }
.author-title { color: var(--text-muted); font-size: 0.8rem; }

#article-body-content h3 { font-size: 1.4rem; margin: 25px 0 12px; color: white; }
#article-body-content p { margin-bottom: 18px; color: #d1d5db; font-size: 1.02rem; line-height: 1.7; }
.article-quote-box {
    background: rgba(59, 130, 246, 0.06);
    border-left: 4px solid var(--accent-blue);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}
.article-quote-box p { font-style: italic; font-size: 1.05rem; color: #e0f2fe !important; margin-bottom: 8px !important; }
.article-quote-box span { font-size: 0.82rem; font-weight: 700; color: #93c5fd; }

/* Wagers Section */
.my-bets-section {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}
.my-bets-section h3 { font-size: 1.15rem; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.no-bets-placeholder {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}
.no-bets-placeholder i { font-size: 2.2rem; margin-bottom: 10px; opacity: 0.5; }

.bet-history-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}
.bet-card-header { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.bet-card-title { color: #f3f4f6; }
.bet-card-date { color: var(--text-muted); font-weight: 500; font-size: 0.78rem; }
.bet-card-details { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.bet-card-outcome { color: #60a5fa; font-weight: 600; }
.bet-card-amounts { display: flex; gap: 15px; color: var(--text-muted); }
.text-green { color: var(--accent-green); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    padding: 24px;
}
.widget-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.icon-red { color: var(--accent-red); font-size: 1.1rem; }
.icon-gold { color: var(--accent-gold); font-size: 1.1rem; }
.icon-blue { color: var(--accent-blue); font-size: 1.1rem; }
.widget-title h4 { font-size: 0.88rem; font-weight: 800; letter-spacing: 1px; color: #f3f4f6; }

.live-activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--bg-card-border);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
}
.activity-user { color: #9ca3af; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.activity-details { display: flex; justify-content: space-between; font-weight: 700; }
.activity-outcome { color: #38bdf8; }
.activity-amount { color: var(--accent-green); }
.activity-time { font-size: 0.72rem; color: #6b7280; display: block; margin-top: 2px; }

.widget-list { list-style: none; }
.widget-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.4;
}
.widget-list li::before {
    content: '\2713';
    color: var(--accent-red);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.85rem;
    font-weight: bold;
}

.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline-item { display: flex; flex-direction: column; border-left: 2px solid var(--accent-red); padding-left: 12px; }
.timeline-item .date { font-size: 0.78rem; font-weight: 800; color: var(--accent-red); }
.timeline-item .event { font-size: 0.88rem; color: #d1d5db; }

.subscribe-form { display: flex; margin-top: 12px; }
.subscribe-form input { border-radius: 6px 0 0 6px; border-right: none; }
.subscribe-form button { border-radius: 0 6px 6px 0; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: var(--bg-card);
    padding: 30px;
    border: 1px solid var(--bg-card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}
.close-modal:hover { color: white; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
.quick-fund-btn {
    background: #0b0c10;
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    padding: 8px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-fund-btn:hover { background: var(--accent-blue); border-color: var(--accent-blue); }

.message { margin-top: 12px; font-size: 0.85rem; text-align: center; }
.msg-success { color: #34d399; }
.msg-error { color: var(--accent-red); }

/* Footer */
.main-footer {
    border-top: 1px solid var(--bg-card-border);
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-brand { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 8px; }

/* Responsive */
@media (max-width: 960px) {
    .content-grid { grid-template-columns: 1fr; }
    .hero { height: auto; padding: 40px 20px; }
    .hero-title-main { font-size: 3.5rem; }
    .hero-title-sub { font-size: 3rem; }
    .main-nav { display: none; }
}
