@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --gold: #b45309;
    --gold-dim: #D97706;
    --success: #059669;
    --danger: #dc2626;
    --border-color: #e5e7eb;
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    width: 100%;
    max-width: 1200px; /* Aligned with market table */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.brand-logo span {
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

/* General Layout */
body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: block; /* Changed from flex for full page flow */
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    margin-top: 60px; /* Nav height */
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-button {
    padding: 1rem 2.5rem;
    background: var(--gold);
    color: white;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 20px -5px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(212, 175, 55, 0.5);
}

/* Sections */
section {
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-align: center;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

/* Market Section */
#market {
    background: white; /* Distinct background for market section */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.container {
    width: 100%;
    max-width: 1100px; /* Reduced from 1400px to make it tighter */
}

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.market-card {
    /* Existing card styles applied inside #market section */
    width: 100%;
    background: var(--bg-color); /* Slight contrast against white section */
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: none; /* Flat inside white section */
    overflow: hidden;
}

/* Grid Layout for Two Columns */
.market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem; /* Reduced gap */
    align-items: start;
}

@media (max-width: 1024px) {
    .market-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.market-column {
    width: 100%;
}

.market-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px; /* Adds space between rows */
}

.market-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0 1rem 1rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
}

.market-table th:last-child {
    text-align: center; /* Centered headers for prices */
}

.market-table th:nth-child(2) {
    text-align: center;
}

.market-row {
    transition: transform 0.2s ease;
}

.market-row:hover {
    transform: translateY(-2px);
}

.market-row td {
    padding: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    background-color: white; /* Row background on light gray card */
    border: 1px solid #e5e7eb;
}

.market-row td:first-child {
    color: var(--text-primary);
    font-weight: 700;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-right: none;
}

.market-row td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-left: none;
}

/* Middle cell border fix */
.market-row td:nth-child(2) {
    border-left: none;
    border-right: none;
}


/* Price Cell Styling - Making them distinct */
.price-cell {
    text-align: center;
    font-feature-settings: "tnum";
    transition: all 0.3s ease;
    background-color: #f3f4f6 !important; /* Contrast against white row */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 4px; /* Creates spacing inside the cell */
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

/* Force override the td padding for price cells to make the inner box look good */
td.price-cell-container {
    padding: 0.5rem;
    background: #f8f9fa;
}

.price-up {
    color: var(--success);
    background-color: #ecfdf5 !important;
    border-color: #a7f3d0;
    font-weight: 700;
}

.price-down {
    color: var(--danger);
    background-color: #fef2f2 !important;
    border-color: #fecaca;
    font-weight: 700;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    width: 100%;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--gold);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section */
.about-content {
    max-width: 900px;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: #111;
    color: white;
    padding: 4rem 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    width: 100%;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #888;
}

.footer-info h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-info p {
    color: #aaa;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nav-links {
        display: none; /* Mobile menu todo */
    }
}

.status-bar {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-dot.connected {
    background-color: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.skeleton {
    color: transparent;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
