:root {
    --gold-primary: #D4AF37;
    --gold-dark: #B8860B;
    --gold-light: #FFD700;
    --bg-dark: #0a0e27;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-blue: #00d4ff;
    --border-glass: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header Section */
.header-container {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--gold-primary);
}

.header-graphic {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.header-fallback {
    display: none;
    height: 150px;
    background: linear-gradient(135deg, #1a1f3a, #0a0e27);
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    text-align: center;
    padding: 20px;
}

/* ============================================
   STOCK TICKER STYLES - BASE (Desktop)
   ============================================ */
.ticker-wrap {
    width: 100%;
    background: rgba(0,0,0,0.8);
    border-bottom: 1px solid var(--gold-primary);
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    position: relative;
}

.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
    padding-left: 100%; /* Start off-screen */
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
    font-weight: 600;
    font-size: 0.95rem;
}

.ticker-item .symbol {
    color: var(--gold-primary);
    margin-right: 8px;
    font-weight: 700;
}

.ticker-item .up { color: #00ff88; }
.ticker-item .down { color: #ff4757; }

/* Date Time Display */
.datetime-container {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    border-bottom: 1px solid var(--border-glass);
}

.datetime {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Banner Ad */
.banner-container {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    text-align: center;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}

.banner-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light), var(--gold-primary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
}

.card:hover::before {
    opacity: 1;
}

.card-full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 15px;
    flex-shrink: 0;
}

.card-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: var(--gold-primary);
    flex-shrink: 0;
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Data Points Grid System */
.data-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary) rgba(0,0,0,0.3);
}

.data-grid::-webkit-scrollbar {
    height: 6px;
}

.data-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

.data-grid::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 3px;
}

/* Column configurations */
.data-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.data-grid.four-cols {
    grid-template-columns: repeat(4, 1fr);
}

.data-grid.six-cols {
    grid-template-columns: repeat(5, 1fr);
}

.data-grid.scrollable {
    flex-wrap: nowrap;
}

.data-point {
    text-align: center;
    padding: 12px 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    min-width: 0;
    word-wrap: break-word;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.data-point.highlight {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
}

.data-point.highlight-double {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
    border-width: 2px;
}

.data-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.2;
    word-break: break-all;
}

.data-change {
    font-size: 0.8rem;
    margin-top: 5px;
}

.positive { color: #00ff88; }
.negative { color: #ff4757; }

/* Chart Containers */
.chart-container {
    position: relative;
    height: 200px;
    min-height: 150px;
    margin-top: 20px;
    width: 100%;
}

.chart-container.chart-small {
    height: 150px;
}

.chart-container.chart-medium {
    height: 220px;
}

/* Exchange Rates Specific */
.region-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.region-tabs::-webkit-scrollbar {
    display: none;
}

.region-tab {
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.region-tab.active, .region-tab:hover {
    background: var(--gold-primary);
    color: #000;
    font-weight: 600;
}

.currency-region {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.currency-item {
    background: rgba(0,0,0,0.3);
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-glass);
    min-width: 0;
}

.currency-code {
    font-weight: 700;
    color: var(--gold-primary);
    font-size: 1rem;
    white-space: nowrap;
}

.currency-rate {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
    word-break: break-all;
}

.currency-inverse {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

/* Disclaimer Text */
.disclaimer-text {
    font-size: 0.7rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

/* Signature Section */
.signature-section {
    margin-top: 60px;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), transparent);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.signature-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    margin-bottom: 20px;
}

.signature-text {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    margin-top: 10px;
    line-height: 1;
}

.signature-title {
    color: var(--accent-blue);
    font-size: 0.9rem;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
}

/* Social Share */
.social-share {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-btn:hover::before {
    width: 100%;
    height: 100%;
}

.social-linkedin { background: #0077b5; }
.social-twitter { background: #000; border: 1px solid #333; }
.social-whatsapp { background: #25d366; }
.social-facebook { background: #4267B2; }

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: rgba(0,0,0,0.5);
    border-top: 2px solid var(--gold-primary);
    text-align: center;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.disclosures {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--gold-primary);
    max-height: 250px;
    overflow-y: auto;
}

.copyright {
    font-family: 'Cinzel', serif;
    color: var(--gold-primary);
    font-size: 1rem;
    margin-top: 20px;
}

.footer-powered {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fff;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE STYLES
   ============================================ */

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .data-grid.three-cols,
    .data-grid.four-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-grid.six-cols {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .data-grid.four-cols.scrollable,
    .data-grid.six-cols.scrollable {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .data-grid.four-cols.scrollable .data-point,
    .data-grid.six-cols.scrollable .data-point {
        min-width: 85px;
        flex-shrink: 0;
    }
    
    .data-value {
        font-size: 1rem;
    }
    
    .data-label {
        font-size: 0.6rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .chart-container {
        height: 180px;
    }
    
    .datetime {
        font-size: 12px;
    }
    
    .header-fallback {
        font-size: 1.5rem;
        height: auto;
        min-height: 120px;
    }
    
    /* ============================================
       MOBILE TICKER - HORIZONTAL SCROLL
       REMOVED display: none - NOW VISIBLE!
       ============================================ */
    .ticker-wrap {
        display: block; /* CHANGED FROM display: none */
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
        padding: 8px 0;
        background: rgba(0,0,0,0.9);
        scrollbar-width: none; /* Hide scrollbar */
        -ms-overflow-style: none;
    }
    
    .ticker-wrap::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }
    
    .ticker {
        animation: none; /* Stop animation on mobile */
        padding-left: 10px;
        display: inline-flex; /* Use inline-flex for horizontal layout */
        gap: 15px;
    }
    
    .ticker-item {
        flex-shrink: 0;
        background: rgba(212, 175, 55, 0.1);
        padding: 8px 15px;
        border-radius: 6px;
        border: 1px solid var(--border-glass);
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
    }
    
    .signature-text {
        font-size: 2.5rem;
    }
    
    .social-share {
        gap: 15px;
    }
    
    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .data-grid {
        gap: 6px;
    }
    
    .data-point {
        padding: 8px 4px;
    }
    
    .data-value {
        font-size: 0.9rem;
    }
    
    .data-label {
        font-size: 0.55rem;
    }
    
    .card-icon {
        font-size: 1.5rem;
        margin-right: 10px;
    }
    
    .disclosures {
        font-size: 0.75rem;
        padding: 15px;
    }
    
    .footer {
        padding: 30px 15px;
    }
    
    /* Mobile ticker even smaller */
    .ticker-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    .ticker-wrap,
    .social-share,
    .banner-container {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card-title {
        color: #000;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #fff;
    }
    
    .data-point {
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ticker {
        animation: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--gold-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }