:root {
    --bg-dark: #050505;
    --card-bg: rgba(18, 18, 18, 0.65);
    --card-border: rgba(255, 255, 255, 0.12);
    --gold-primary: #d4af37;
    --gold-bright: #f1d592;
    --gold-dim: rgba(212, 175, 55, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --shadow-soft: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(25px);
    
    /* Layout Control Variables */
    --container-width: 1200px;
    --layout-scale: 1;
    --card-padding: 20px;
}

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

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at 50% 0%, #1e1e1e 0%, #050505 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Enhanced Glass Effect */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft), inset 0 0 20px rgba(255, 255, 255, 0.02);
    /* Performance: Offload to GPU */
    transform: translateZ(0);
    will-change: transform;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.logo-d, .logo-img {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    object-fit: contain;
}

.logo-d {
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--gold-bright);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 15px var(--gold-dim), inset 0 0 8px rgba(212, 175, 55, 0.3);
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a,
.top-nav a,
.nav-links a:visited,
.nav-links a.active,
.nav-links a:hover {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Container */
.main-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
}

/* Header Section */
.page-header {
    text-align: right;
    margin-bottom: 2rem;
    border-right: 4px solid var(--gold-primary);
    padding-right: 20px;
}
.main-heading {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(1.2rem, 5vw, 2.1rem);
    font-weight: 800;
    color: #fff;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
.header-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}
.indicators-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--gold-bright);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.indicators-btn:hover {
    transform: translateY(-1px);
    border-color: var(--gold-primary);
    color: #fff6d9;
}
.indicators-btn .chart-icon {
    stroke: var(--gold-primary);
}
.market-status-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
}
.status-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Dashboard Grid System */
.grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

/* Premium Card Design */
.standard-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
    /* 120Hz Optimization: Isolate layout and paint */
    contain: layout paint;
}

.standard-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 20px var(--gold-dim);
}

/* Card Styles - Matches Original Design */
.standard-card {
    position: relative;
    background: #121214;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.standard-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.15);
}

/* Subtle Silver Border for Silver Cards */
#silver-cards-grid .standard-card {
    border: 1px solid rgba(192, 192, 192, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

#silver-cards-grid .standard-card:hover {
    border-color: rgba(225, 225, 235, 0.7) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(192, 192, 192, 0.2) !important;
}

/* Subtle Emerald Border for Currency (Dollar) Cards */
.currency-card {
    border: 1px solid rgba(52, 211, 153, 0.35) !important;
}
.currency-card:hover {
    border-color: rgba(52, 211, 153, 0.65) !important;
}

.card-header {
    padding: 18px 16px 10px;
    text-align: center;
}

.card-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.price-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 20px 14px;
    text-align: center;
}

.price-box.single-price {
    justify-content: center;
}

.price-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.price-type {
    font-size: 0.85rem;
    color: #a1a1aa;
    font-weight: 600;
}

.price-val {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-val .currency {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 600;
    opacity: 0.9;
}

.price-divider {
    width: 1px;
    height: 38px;
    background: rgba(255, 255, 255, 0.12);
}

.spread-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: #a1a1aa;
}

.spread-info strong {
    color: #ffffff;
    font-weight: 700;
}

.chart-container-full {
    position: relative;
    width: 100%;
    height: 190px;
    background: #000000;
    overflow: hidden;
    margin-top: auto;
}

.chart-container-full iframe,
.lazy-chart {
    border: none;
    width: 100%;
    height: 100%;
    display: block;
}

.chart-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to top, rgba(18, 18, 20, 0.8), transparent);
    pointer-events: none;
}

.chart-expand-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.chart-expand-btn svg {
    stroke: #ffffff;
}

.chart-expand-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    color: #ffffff;
    transform: scale(1.1);
}

.chart-expand-btn:active {
    transform: scale(0.95);
}

/* Fullscreen Chart Modal View (No Page Reload) */
.chart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.chart-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.chart-modal-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    min-height: 100%;
    box-sizing: border-box;
}

.chart-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 15px;
    flex-wrap: wrap;
}

.chart-page-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.28);
    color: #ffffff;
    border-color: #d4af37;
    transform: translateY(-2px);
}

.back-btn:active {
    transform: scale(0.96);
}

.chart-page-container {
    width: 100%;
    height: 65vh;
    min-height: 480px;
    background: #000000;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.chart-page-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 600px) {
    .chart-page-container {
        height: 55vh;
        min-height: 360px;
        border-radius: 14px;
    }
    .chart-page-title {
        font-size: 1.15rem;
    }
    .back-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* Sections */
.section-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 3rem 0 2rem;
    text-align: right;
    border-right: 4px solid var(--gold-primary);
    padding-right: 15px;
}

/* Basic Layout */
.layout-wrapper {
    display: flex;
    justify-content: center;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex: 1 0 auto;
}

.main-container {
    flex-grow: 1;
    max-width: var(--container-width);
    padding: 1.5rem;
    /* Faster touch response */
    touch-action: pan-y;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin: 3rem 0 1.5rem;
    padding-right: 1.5rem;
    border-right: 4px solid var(--gold-primary);
}

.main-footer {
    padding: 4rem 2rem;
    background: #080808;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.currency-card {
    text-align: center;
}
.currency-card .card-header-main {
    justify-content: center;
    margin-bottom: 0.8rem;
}
.currency-card .price-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 15px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.currency-card .price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.currency-card .price-label {
    display: block;
    margin: 0 auto 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.currency-card .price-value-wrap {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}
.currency-card .price-amount {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 25px rgba(212, 175, 55, 0.35);
}
.currency-card .price-curr {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-top: 0;
}
.currency-card .spread-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.8rem;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.social-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    opacity: 0.8;
}
.social-link:hover {
    opacity: 1;
    transform: translateY(-4px);
    color: var(--gold-primary);
}
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.social-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}
.social-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes flashUpdateGold {
    0% { color: var(--gold-bright); text-shadow: 0 0 20px var(--gold-bright); }
    100% { color: inherit; text-shadow: none; }
}
.flash-update {
    animation: flashUpdateGold 1.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 0.8rem 0.6rem;
    }
    .grid-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 2rem;
    }
    .price-amount {
        font-size: clamp(0.95rem, 3.2vw, 1.25rem);
    }
    .chart-container-full {
        height: 140px;
    }
    .top-nav {
        padding: 0.6rem 0.8rem;
    }
    .nav-links {
        gap: 8px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap !important;
        max-width: 60%;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-links a {
        white-space: nowrap;
        font-size: 12.5px !important;
        flex-shrink: 0;
    }
}

@media (max-width: 600px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    .layout-wrapper {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .main-container {
        padding: 0.5rem 0.4rem 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .top-nav {
        padding: 0.5rem 0.6rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    .logo-box {
        gap: 6px !important;
        flex-shrink: 0 !important;
    }
    .logo-d, .logo-img {
        width: 30px !important;
        height: 30px !important;
    }
    .logo-text {
        font-size: 0.92rem !important;
    }
    .nav-links {
        gap: 6px !important;
        max-width: 60% !important;
    }
    .nav-links a {
        font-size: 11.5px !important;
        padding: 2px 4px !important;
    }
    .page-header {
        margin-bottom: 0.8rem !important;
        padding-right: 8px !important;
        border-right-width: 3px !important;
    }
    .main-heading {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }
    .section-title {
        font-size: 1.05rem !important;
        margin: 1.2rem 0 0.6rem !important;
    }
    .grid-section {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        margin-bottom: 2rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* PERFORMANCE: Fast and smooth rendering on mobile */
    .glass-effect {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(18, 18, 18, 0.95) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
        border: 1px solid rgba(212, 175, 55, 0.18) !important;
    }
    
    .standard-card {
        border-radius: 16px !important;
        background: #121214 !important;
        border: 1px solid rgba(212, 175, 55, 0.35) !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
        overflow: hidden !important;
        min-height: auto !important;
        padding: 0 !important;
    }

    #silver-cards-grid .standard-card {
        border: 1px solid rgba(192, 192, 192, 0.35) !important;
    }

    #dollar-cards-grid .standard-card,
    .currency-card {
        border: 1px solid rgba(52, 211, 153, 0.35) !important;
    }

    .card-header {
        padding: 10px 6px 4px !important;
        text-align: center !important;
    }

    .card-title {
        font-family: 'Cairo', sans-serif !important;
        font-size: 1.05rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .price-box {
        padding: 4px 6px 8px !important;
    }

    .price-type {
        font-size: 0.72rem !important;
        color: #a1a1aa !important;
    }

    .price-val {
        font-size: 1.08rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.3px !important;
        color: #ffffff !important;
    }

    #main-buy-gold-kilo, #main-sell-gold-kilo {
        font-size: 0.74rem !important;
        letter-spacing: -0.5px !important;
    }

    .price-val .currency {
        font-size: 0.65rem !important;
        color: #ffffff !important;
        opacity: 0.9 !important;
    }

    .price-divider {
        height: 28px !important;
    }

    .spread-info {
        padding: 5px 4px !important;
        font-size: 0.62rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        background: rgba(0, 0, 0, 0.4) !important;
    }

    .card-footer-actions {
        padding: 8px 10px 12px !important;
    }

    .view-chart-btn {
        padding: 8px 10px !important;
        font-size: 0.82rem !important;
        border-radius: 10px !important;
        gap: 6px !important;
    }

    .view-chart-btn .chart-icon {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Chart Button on Cards */
.card-footer-actions {
    padding: 12px 18px 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}
.view-chart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    color: var(--gold-bright);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
    cursor: pointer;
}
.view-chart-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.25);
}
.view-chart-btn:active {
    transform: scale(0.98);
}
.view-chart-btn .chart-icon {
    stroke: var(--gold-primary);
    flex-shrink: 0;
}

/* Secondary Chart Page Styles */
.chart-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.chart-page-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-primary);
    margin: 0;
}
.chart-page-container {
    height: 70vh;
    min-height: 500px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.chart-page-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}



/* Silver Section - View Chart Button Overrides */
#silver-cards-grid .view-chart-btn {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(192, 192, 192, 0.05) 100%);
    border-color: rgba(192, 192, 192, 0.3);
    color: #e2e8f0;
}
#silver-cards-grid .view-chart-btn:hover {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3) 0%, rgba(192, 192, 192, 0.1) 100%);
    border-color: #c0c0c0;
    box-shadow: 0 5px 15px rgba(192, 192, 192, 0.2);
}
#silver-cards-grid .view-chart-btn .chart-icon {
    stroke: #c0c0c0;
}

/* Dollar Section - View Chart Button Overrides */
#dollar-cards-grid .view-chart-btn {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(52, 211, 153, 0.03) 100%);
    border-color: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
}
#dollar-cards-grid .view-chart-btn:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2) 0%, rgba(52, 211, 153, 0.08) 100%);
    border-color: #34d399;
    box-shadow: 0 5px 15px rgba(52, 211, 153, 0.15);
}
#dollar-cards-grid .view-chart-btn .chart-icon {
    stroke: #34d399;
}

/* Articles & Guide System Styles - Mobile First */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 641px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.article-card-item {
    display: flex;
    flex-direction: column;
    padding: 20px 18px;
    height: 100%;
    border-radius: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.article-card-item:hover, .article-card-item:active {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
}

.article-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    line-height: 1.3;
}

.article-card-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.45;
    font-family: 'Cairo', sans-serif;
    word-break: break-word;
}

.article-card-desc {
    color: #a1a1aa;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 14px;
    flex-grow: 1;
    word-break: break-word;
}

.article-card-link {
    color: #d4af37;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

/* Pagination Bar */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.page-btn {
    padding: 8px 12px;
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

.page-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #d4af37;
}

.page-btn.active {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer Styles */
.main-footer {
    padding: 3rem 1.5rem 2.5rem;
    background: #08080a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto !important;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 1.5rem;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    color: #d4af37;
    transform: translateY(-2px);
}

.social-icon svg {
    stroke: currentColor;
}

.social-text {
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copyright {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.6;
}

.footer-links-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link-gold {
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    color: #d4af37;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-link-gold:hover {
    color: #ffffff;
}

.footer-link-gray {
    font-family: 'Cairo', sans-serif;
    font-size: 0.78rem;
    color: #71717a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link-gray:hover {
    color: #a1a1aa;
}

.footer-sep {
    color: #3f3f46;
    font-size: 0.75rem;
}


