@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- CUSTOM VARIABLES & THEME TOKENS --- */
:root {
    --bg-main: #06070d;
    --bg-surface: #0f121d;
    --bg-surface-elevated: #181d2f;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --brand-primary: #5f5af6;
    --brand-primary-glow: rgba(95, 90, 246, 0.25);
    --brand-gold: #fbbf24;
    --brand-gold-glow: rgba(251, 191, 36, 0.2);
    
    --color-yes: #10b981;
    --color-yes-bg: rgba(16, 185, 129, 0.1);
    --color-yes-border: rgba(16, 185, 129, 0.3);
    --color-yes-hover: #059669;
    
    --color-no: #ef4444;
    --color-no-bg: rgba(239, 68, 68, 0.1);
    --color-no-border: rgba(239, 68, 68, 0.3);
    --color-no-hover: #dc2626;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px var(--brand-primary-glow);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-elevated);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: var(--font-sans);
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    transition: var(--transition-fast);
}

input, select {
    font-family: var(--font-sans);
    border: none;
    outline: none;
    color: inherit;
}

/* --- LAYOUT STRUCTURE --- */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

/* --- HEADER / NAVIGATION --- */
header {
    background-color: rgba(6, 7, 13, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-container {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-gold));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(95, 90, 246, 0.4);
}

.brand-logo-star {
    font-size: 1.2rem;
    color: #fff;
    animation: rotateStar 8s linear infinite;
}

@keyframes rotateStar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-text h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-text span {
    background: linear-gradient(90deg, var(--brand-gold), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.9rem;
    padding: 2px 6px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 4px;
    font-weight: 500;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.market-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
}

.stat-item span {
    color: var(--brand-gold);
    font-weight: 600;
}

/* Wallet Button */
.wallet-btn {
    background: linear-gradient(135deg, var(--bg-surface-elevated), var(--bg-surface));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.wallet-btn:hover {
    border-color: var(--brand-gold);
    box-shadow: 0 0 10px var(--brand-gold-glow);
}

.momo-badge {
    background-color: var(--brand-gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* --- HERO FEATURED BANNER --- */
.hero-section {
    margin-bottom: 32px;
    background: linear-gradient(135deg, rgba(24, 29, 47, 0.4), rgba(6, 7, 13, 0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%2306070d" width="100" height="100"/><circle fill="%235f5af6" fill-opacity="0.02" cx="50" cy="50" r="40"/></svg>');
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--brand-primary-glow) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.tag-featured {
    background-color: rgba(95, 90, 246, 0.15);
    border: 1px solid var(--brand-primary);
    color: #a5b4fc;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}

.hero-btn-yes {
    background-color: var(--color-yes);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.hero-btn-yes:hover {
    background-color: var(--color-yes-hover);
    transform: translateY(-2px);
}

.hero-btn-no {
    background-color: var(--color-no);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.hero-btn-no:hover {
    background-color: var(--color-no-hover);
    transform: translateY(-2px);
}

.hero-stats {
    position: relative;
    z-index: 2;
    background: rgba(15, 18, 29, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding-bottom: 10px;
}

.hero-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.hero-stat-value {
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- DASHBOARD NAVIGATION & FILTER --- */
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.category-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--border-color-hover);
    color: #fff;
}

.category-btn.active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--brand-primary-glow);
}

.search-container {
    position: relative;
    min-width: 300px;
    flex-grow: 0;
}

.search-input {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 42px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 8px var(--brand-primary-glow);
}

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

/* --- MARKETS GRID --- */
.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.market-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-normal);
    position: relative;
}

.market-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.market-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-gold);
}

.market-volume {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.market-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--text-primary);
    min-height: 64px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.odds-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.odd-button {
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition-fast);
}

.odd-button.yes {
    background-color: var(--color-yes-bg);
    border: 1px solid var(--color-yes-border);
    color: var(--color-yes);
}

.odd-button.yes:hover {
    background-color: var(--color-yes);
    color: #fff;
}

.odd-button.no {
    background-color: var(--color-no-bg);
    border: 1px solid var(--color-no-border);
    color: var(--color-no);
}

.odd-button.no:hover {
    background-color: var(--color-no);
    color: #fff;
}

.odd-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-weight: 500;
    opacity: 0.85;
}

.odd-val {
    font-size: 1.3rem;
    font-family: var(--font-display);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.resolution-date span {
    color: var(--text-secondary);
}

.view-details-btn {
    color: var(--brand-primary);
    font-weight: 600;
}

.view-details-btn:hover {
    color: #a5b4fc;
}

/* --- MARKET DETAILS VIEW --- */
.details-view {
    display: none; /* Toggled via JS */
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.back-btn:hover {
    color: #fff;
}

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.details-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.details-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.details-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
}

.chart-container {
    height: 320px;
    position: relative;
    margin-bottom: 12px;
}

.details-info-row {
    display: flex;
    gap: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.market-rules {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.rules-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--brand-gold);
}

.rules-content {
    color: var(--text-secondary);
    font-size: 0.92rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- TRADE PANEL --- */
.trade-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 90px;
    height: fit-content;
    box-shadow: var(--shadow-lg);
}

.trade-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 20px;
}

.trade-tab {
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
}

.trade-tab.active {
    background-color: var(--bg-surface-elevated);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.03);
}

.outcome-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.outcome-btn {
    border-radius: var(--radius-md);
    padding: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    transition: var(--transition-fast);
}

.outcome-btn.yes {
    border: 1px solid var(--color-yes-border);
    color: var(--color-yes);
    background-color: var(--color-yes-bg);
}

.outcome-btn.yes.selected {
    background-color: var(--color-yes);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.outcome-btn.no {
    border: 1px solid var(--color-no-border);
    color: var(--color-no);
    background-color: var(--color-no-bg);
}

.outcome-btn.no.selected {
    background-color: var(--color-no);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.trade-input-block {
    margin-bottom: 20px;
}

.input-label-container {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.input-label {
    color: var(--text-secondary);
}

.input-wallet-balance {
    color: var(--text-muted);
}

.input-wallet-balance span {
    color: var(--brand-gold);
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.input-wrapper:focus-within {
    border-color: var(--brand-primary);
}

.currency-symbol {
    font-weight: 700;
    color: var(--brand-gold);
    margin-right: 8px;
    font-size: 1.1rem;
}

.trade-num-input {
    background: none;
    font-size: 1.25rem;
    font-weight: 700;
    width: 100%;
}

.shares-equivalent {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: right;
}

.trade-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    background-color: rgba(255,255,255,0.01);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.02);
}

.trade-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.trade-detail-label {
    color: var(--text-secondary);
}

.trade-detail-value {
    font-weight: 600;
}

.trade-detail-value.profit {
    color: var(--color-yes);
}

.trade-detail-value.roi {
    background-color: var(--color-yes-bg);
    color: var(--color-yes);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.execute-trade-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.execute-trade-btn.yes {
    background-color: var(--color-yes);
    color: #fff;
}
.execute-trade-btn.yes:hover {
    background-color: var(--color-yes-hover);
}

.execute-trade-btn.no {
    background-color: var(--color-no);
    color: #fff;
}
.execute-trade-btn.no:hover {
    background-color: var(--color-no-hover);
}

.execute-trade-btn:disabled {
    background-color: var(--bg-surface-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* --- PORTFOLIO & DASHBOARD VIEW --- */
.portfolio-view {
    display: none; /* Toggled via navigation */
}

.portfolio-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stats-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stats-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stats-card-value {
    font-size: 1.8rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.stats-card-value.positive {
    color: var(--color-yes);
}
.stats-card-value.negative {
    color: var(--color-no);
}

.portfolio-table-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.portfolio-table th {
    background-color: rgba(255,255,255,0.02);
    padding: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.portfolio-table tr:last-child td {
    border-bottom: none;
}

.portfolio-table tr:hover td {
    background-color: rgba(255,255,255,0.01);
}

.pos-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.pos-badge.yes {
    background-color: var(--color-yes-bg);
    color: var(--color-yes);
    border: 1px solid var(--color-yes-border);
}

.pos-badge.no {
    background-color: var(--color-no-bg);
    color: var(--color-no);
    border: 1px solid var(--color-no-border);
}

.table-action-btn {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.table-action-btn:hover {
    border-color: var(--brand-primary);
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* --- LEADERBOARD & CREATE MARKET VIEWS --- */
.leaderboard-view {
    display: none;
}

.rank-badge {
    font-weight: 800;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-badge.rank-1 { background-color: var(--brand-gold); color: #000; }
.rank-badge.rank-2 { background-color: #cbd5e1; color: #000; }
.rank-badge.rank-3 { background-color: #b45309; color: #fff; }

.create-market-view {
    display: none;
    max-width: 680px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--brand-primary);
}

.submit-market-btn {
    background: linear-gradient(135deg, var(--brand-primary), #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px;
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px var(--brand-primary-glow);
    margin-top: 12px;
}

.submit-market-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--brand-primary-glow);
}

/* --- OVERLAY MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 7, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 440px;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.close-modal-btn:hover {
    color: #fff;
}

.momo-header {
    text-align: center;
    margin-bottom: 24px;
}

.momo-logo-img {
    height: 48px;
    margin-bottom: 12px;
}

.momo-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}

.momo-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.provider-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.provider-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    background-color: var(--bg-main);
}

.provider-card.active {
    border-color: var(--brand-gold);
    background-color: var(--bg-surface-elevated);
    box-shadow: 0 0 10px var(--brand-gold-glow);
}

.provider-card.mtn { color: #fbbf24; }
.provider-card.telecel { color: #ef4444; }
.provider-card.at { color: #0ea5e9; }

.momo-loading {
    display: none;
    text-align: center;
    padding: 24px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--brand-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background-color: var(--bg-surface-elevated);
    border-left: 4px solid var(--brand-primary);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 300px;
    max-width: 380px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--color-yes); }
.toast.error { border-left-color: var(--color-no); }
.toast.info { border-left-color: var(--brand-gold); }

.toast-msg {
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: 12px;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    .trade-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    main {
        padding: 16px;
    }
    .header-content {
        padding: 12px 16px;
    }
    .market-stats {
        display: none;
    }
    .hero-section {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .search-container {
        min-width: 100%;
    }
}

/* --- LEGAL KYC ONBOARDING STYLES --- */
.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kyc-badge.unverified {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.kyc-badge.verified {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.kyc-step-view {
    animation: fadeIn var(--transition-normal);
}

#kyc-face-laser {
    animation: laserScan 2s linear infinite;
}

@keyframes laserScan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* --- VOICE EQUALIZER ANIMATION --- */
.equalizer-bar {
    transition: height 0.15s ease-in-out;
    animation: bounce 0.8s ease-in-out infinite alternate;
}
.equalizer-bar:nth-child(1) { animation-delay: 0.1s; }
.equalizer-bar:nth-child(2) { animation-delay: 0.3s; }
.equalizer-bar:nth-child(3) { animation-delay: 0.2s; }
.equalizer-bar:nth-child(4) { animation-delay: 0.4s; }

@keyframes bounce {
    0% { height: 10%; }
    100% { height: 90%; }
}

/* --- PULSING ORACLE AMBER LIGHT --- */
.pulse-light-amber {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0.4);
    animation: pulseAmber 1.8s infinite;
}

@keyframes pulseAmber {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(251, 191, 36, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* --- FLOATING USSD PHONE PULSER --- */
@keyframes pulsePhone {
    0% { transform: scale(1); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 4px 25px rgba(16, 185, 129, 0.7); }
    100% { transform: scale(1); box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
}

#ussd-floating-trigger {
    animation: pulsePhone 2.5s infinite;
    cursor: pointer;
    transition: var(--transition-fast);
}
#ussd-floating-trigger:hover {
    transform: rotate(15deg) scale(1.1);
}

/* --- WELCOME BANNER --- */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0.03) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    gap: 16px;
    animation: slideDownFade 0.5s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-banner-icon {
    font-size: 1.8rem;
    color: var(--brand-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(251, 191, 36, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
}

.welcome-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.welcome-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.welcome-text strong {
    color: var(--brand-gold);
}

.welcome-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.welcome-btn-primary {
    background-color: var(--brand-gold);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.1s;
}

.welcome-btn-primary:hover {
    background-color: #f59e0b;
    transform: scale(1.02);
}

.welcome-btn-primary:active {
    transform: scale(0.98);
}

.welcome-btn-close {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.welcome-btn-close:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .welcome-banner-actions {
        justify-content: space-between;
    }
}

