:root {
    --bg-dark: #09090b;
    --card-bg: #111111;
    --card-border: #222222;
    --gold-primary: #d4af37;
    --gold-dim: rgba(212, 175, 55, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Nav */
.top-nav {
    display: flex;
    align-items: center;
    padding: 1.5rem 3rem;
}
.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

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

/* Header */
.page-header {
    margin-bottom: 3rem;
}
.sub-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}
.main-heading {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.market-status-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-green);
}
.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: flashGreen 2s infinite;
}
.market-status-group .last-updated {
    color: var(--accent-green);
    font-weight: 700;
}

/* Dashboard Top Section */
.top-dashboard {
    display: block;
    margin-bottom: 2rem;
}

/* Hero Card (24K) */
.hero-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 420px;
    overflow: hidden;
}
.hero-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1;
}
.hero-tag {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    display: block;
}
.hero-price {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--text-primary);
}
.hero-currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}
.hero-trend {
    text-align: right;
}
.trend-val {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-primary);
    margin-bottom: 0.3rem;
}
.trend-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-graph {
    position: relative;
    margin-top: 2rem;
    width: 100%;
    height: 250px;
    z-index: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}
.hero-graph iframe {
    width: 100%;
    height: 100%;
}
.card-chart-bottom {
    width: 100%;
    height: 200px;
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    border: 1px solid var(--card-border);
}

/* Sidebar Stack */
.sidebar-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.small-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}
.small-stat-tag {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.small-stat-val {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    color: var(--text-primary);
}
.small-stat-cur {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.down-trend {
    color: var(--accent-red);
    font-size: 0.75rem;
    font-weight: 600;
}
.trend-up {
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 600;
}
.trend-neutral {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.wealth-banner {
    background: transparent;
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    padding: 2rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}
.wealth-tag {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}
.wealth-banner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}
.wealth-banner p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Grid Cards */
.grid-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.standard-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}
.standard-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
}
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.card-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0.8;
}
.purity-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.main-price {
    margin-bottom: 2rem;
}
.main-price .price-val {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.main-price .price-cur {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: 0.2rem;
}
.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
    padding-top: 1rem;
}
.stat-col {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.stat-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Animations */
@keyframes valueFlashUpdate {
    0% { color: var(--gold-primary); text-shadow: 0 0 15px var(--gold-dim); }
    100% { color: var(--text-primary); text-shadow: none; }
}
.flash-update {
    animation: valueFlashUpdate 1s ease-out;
}
@keyframes flashGreen {
    0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Insights */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.insights-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
}
.insight-img {
    width: 50%;
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 400px;
    filter: contrast(0.9) brightness(0.8) grayscale(0.2);
}
.insight-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100%;
    background: linear-gradient(to right, var(--card-bg), transparent);
}
.insight-badge {
    display: none;
}
.insight-text {
    width: 50%;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.insight-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}
.insight-text h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}
.insight-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}
.read-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}
.read-more:hover {
    color: var(--gold-primary);
}

/* Footer */
.app-footer {
    padding: 4rem 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--card-border);
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.footer-links {
    display: flex;
    gap: 2rem;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .top-dashboard { grid-template-columns: 1fr; }
    .grid-section { grid-template-columns: repeat(2, 1fr); }
    .insights-container { flex-direction: column; }
    .insight-img { width: 100%; min-height: 250px; }
    .insight-img::after { background: linear-gradient(to top, var(--card-bg), transparent); }
    .insight-text { width: 100%; padding: 2rem; }
    .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 600px) {
    .grid-section { grid-template-columns: 1fr; }
    .hero-price { font-size: 3.5rem; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .top-nav { padding: 1.5rem; flex-wrap: wrap; }
}
