/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f59e0b;
    --secondary-color: #1f2937;
    --accent-color: #3b82f6;
    --background-color: #111827;
    --surface-color: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --hover-bg: #374151;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --gold-color: #ffd700;
    --silver-color: #c0c0c0;
    --platinum-color: #e5e7eb;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--surface-color) 0%, #2d3748 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    z-index: 101;
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-brand small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(245, 158, 11, 0.1);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle,
.lang-toggle {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover,
.lang-toggle:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    position: relative;
}

.nav-dropdown .nav-link::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu .nav-link:last-child {
    border-bottom: none;
}

.dropdown-menu .nav-link:hover {
    background-color: var(--hover-bg);
}

/* Mobile Responsive Header */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }
    
    .nav-brand span {
        font-size: 1.1rem;
    }
    
    .nav-brand small {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 100;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        width: 200px;
        text-align: center;
        justify-content: center;
    }
    
    .nav-controls {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 101;
    }
    
    .theme-toggle,
    .lang-toggle {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-lg);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 1rem;
    }
}

/* Main Content */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Sections */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    min-height: 60vh;
}

.hero-small {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.8) 100%);
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #f97316 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gold-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: perspective(1000px) rotateX(15deg) rotateY(-15deg);
}

.gold-bar {
    width: 300px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #fbbf24 100%);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.gold-bar:nth-child(2) {
    animation-delay: -3s;
    transform: translateX(50px);
}

.gold-bar::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-10px) translateX(5px); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Rates Section */
.rates-section {
    padding: 4rem 0;
}

.last-updated {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.country-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.country-selector select {
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    cursor: pointer;
    transition: var(--transition);
}

.country-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.metals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.metal-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.metal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.gold-card::before { background: var(--gold-color); }
.silver-card::before { background: var(--silver-color); }
.platinum-card::before { background: var(--platinum-color); }

.metal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.metal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.metal-icon {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metal-icon i {
    font-size: 1.5rem;
}

.gold-icon { color: var(--gold-color); }
.silver-icon { color: var(--silver-color); }
.platinum-icon { color: var(--platinum-color); }

.metal-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.weight-selector {
    margin-bottom: 2rem;
}

.weight-selector select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.weight-type {
    display: flex;
    gap: 1rem;
}

.weight-type label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.price-display {
    text-align: center;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.price-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.price-change {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
}

.price-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.price-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.market-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.market-status i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Converter Section */
.converter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.8) 100%);
    border-radius: var(--border-radius-lg);
    margin: 2rem 0;
}

.converter-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.converter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.converter-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.converter-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group select,
.input-group input {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-button button {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-button button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

.convert-btn {
    grid-column: 1 / -1;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.conversion-result {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 191, 36, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: var(--border-radius-lg);
}

.result-display {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

/* Charts Section */
.main-chart-section {
    padding: 4rem 0;
}

.chart-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.metal-selector .metal-btn,
.timeframe-selector .timeframe-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metal-selector .metal-btn:hover,
.timeframe-selector .timeframe-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.metal-selector .metal-btn.active,
.timeframe-selector .timeframe-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chart-type-selector select {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

.main-chart-container,
.comparison-chart-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    height: 500px;
    position: relative;
}

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

.chart-title h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-title span {
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.chart-title .positive {
    color: var(--success-color);
}

.chart-title .negative {
    color: var(--error-color);
}

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

/* Technical Analysis Section */
.technical-analysis-section {
    padding: 4rem 0;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.analysis-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.analysis-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.indicator-item:last-child {
    border-bottom: none;
}

.indicator-item span {
    color: var(--text-secondary);
}

.indicator-item span:first-child {
    font-weight: 500;
}

.signal {
    font-weight: 600;
}

.signal.bullish { color: var(--success-color); }
.signal.bearish { color: var(--error-color); }
.signal.neutral { color: var(--text-secondary); }

.sentiment-meter {
    margin-top: 1rem;
}

.sentiment-bar {
    background: var(--border-color);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.sentiment-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error-color) 0%, var(--success-color) 100%);
    border-radius: 5px;
}

.sentiment-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.sentiment-value {
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
    color: var(--text-primary);
}

/* Analysis Page Specific Styles */
.market-overview-section {
    padding: 4rem 0;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.overview-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.trend-indicator.bullish {
    color: var(--success-color);
}

.trend-indicator.bearish {
    color: var(--error-color);
}

.sentiment-gauge {
    background: var(--border-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--error-color) 0%, var(--success-color) 100%);
    border-radius: 4px;
}

.volume-indicator,
.volatility-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.volume-indicator.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.volatility-indicator.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.analysis-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.analysis-tab {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.analysis-tab:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.analysis-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.analysis-content {
    position: relative;
}

.analysis-panel {
    display: none;
}

.analysis-panel.active {
    display: block;
}

.indicator-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.indicator-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.indicator-row:last-child {
    border-bottom: none;
}

.sr-levels {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sr-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.sr-level.resistance {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.sr-level.support {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.sr-level.current {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pattern-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pattern-item i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.pattern-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.pattern-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.analysis-summary {
    margin-top: 3rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.analysis-summary h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-signal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
}

.summary-signal.bullish {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.summary-signal.bearish {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.summary-signal.neutral {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-secondary);
}

/* Comparison Charts Section */
.comparison-section {
    padding: 4rem 0;
}

.comparison-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.comparison-timeframe .comparison-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.comparison-timeframe .comparison-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.comparison-timeframe .comparison-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.performance-table {
    margin-top: 3rem;
    overflow-x: auto;
}

.performance-table table {
    width: 100%;
    border-collapse: collapse;
}

.performance-table th,
.performance-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.performance-table th {
    background: var(--surface-color);
    color: var(--text-primary);
    font-weight: 600;
}

.performance-table td {
    color: var(--text-secondary);
}

.performance-table td i {
    margin-right: 0.5rem;
}

.performance-table .positive { color: var(--success-color); }
.performance-table .negative { color: var(--error-color); }

/* Market News Section */
.market-news-section {
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.news-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.news-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.news-impact {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
}

.news-impact.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.news-impact.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.news-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 120px;
}

.news-content {
    flex: 1;
}

.news-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.news-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .metal-selector,
    .timeframe-selector {
        width: 100%;
        justify-content: center;
    }
    
    .chart-type-selector select {
        width: 100%;
    }
    
    .main-chart-container,
    .comparison-chart-container {
        height: 350px;
        padding: 1rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .analysis-grid,
    .news-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .converter-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .swap-button {
        order: 2;
    }
    
    .metals-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .analysis-tab {
        width: 200px;
        text-align: center;
    }
    
    .news-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .news-time {
        min-width: auto;
    }
}

/* Print styles */
@media print {
    .nav-controls,
    .mobile-menu-toggle,
    .hero-cta {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .main-chart-container,
    .comparison-chart-container {
        break-inside: avoid;
    }
}

/* =========================================================
   USDWN PREMIUM UI DESIGN
========================================================= */

:root{
    --usdwn-gold:#fbbf24;
    --usdwn-dark:#0f172a;
    --usdwn-card:#111827;
    --usdwn-border:#1f2937;
    --usdwn-text:#f8fafc;
    --usdwn-muted:#94a3b8;
    --usdwn-green:#10b981;
    --usdwn-red:#ef4444;
}

/* Body Background */
body{
    background:
        radial-gradient(circle at top right, rgba(251,191,36,.08), transparent 25%),
        radial-gradient(circle at bottom left, rgba(59,130,246,.06), transparent 25%),
        #020617;
    color:var(--usdwn-text);
}

/* Main Wrapper */
.usdwn-home{
    width:100%;
    overflow:hidden;
}

/* =========================================================
   HERO
========================================================= */

.usdwn-hero{
    position:relative;
    padding:120px 0 80px;
    min-height:85vh;
    display:grid;
    grid-template-columns:1.2fr 1fr;
    gap:60px;
    align-items:center;
}

.usdwn-hero::before{
    content:'';
    position:absolute;
    top:-200px;
    right:-150px;
    width:500px;
    height:500px;
    background:rgba(251,191,36,.08);
    border-radius:50%;
    filter:blur(100px);
    z-index:-1;
}

.hero-badge{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:10px 18px;
    background:rgba(251,191,36,.12);
    border:1px solid rgba(251,191,36,.2);
    border-radius:999px;
    color:var(--usdwn-gold);
    font-size:.9rem;
    margin-bottom:25px;
    font-weight:600;
}

.hero-title{
    font-size:4.2rem;
    line-height:1.05;
    font-weight:900;
    margin-bottom:25px;
    letter-spacing:-2px;
    background:linear-gradient(to right,#fff,#fbbf24);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.hero-description{
    font-size:1.2rem;
    color:var(--usdwn-muted);
    line-height:1.9;
    max-width:700px;
    margin-bottom:35px;
}

.hero-actions{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:45px;
}

.hero-cta{
    padding:16px 28px;
    border-radius:16px;
    text-decoration:none;
    font-weight:700;
    transition:.3s ease;
    display:inline-flex;
    align-items:center;
    gap:10px;
    border:none;
}

.hero-cta:first-child{
    background:linear-gradient(135deg,#f59e0b,#fbbf24);
    color:#111827;
    box-shadow:0 20px 50px rgba(251,191,36,.25);
}

.hero-cta-secondary{
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
}

.hero-cta:hover{
    transform:translateY(-4px);
}

.hero-stats{
    display:flex;
    gap:40px;
    flex-wrap:wrap;
}

.hero-stats div{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.hero-stats strong{
    font-size:1.4rem;
    color:#fff;
}

.hero-stats span{
    color:var(--usdwn-muted);
    font-size:.95rem;
}

/* =========================================================
   GOLD VISUAL
========================================================= */

.gold-dashboard-card{
    background:linear-gradient(135deg,#111827,#1e293b);
    border:1px solid rgba(255,255,255,.06);
    padding:30px;
    border-radius:28px;
    margin-bottom:30px;
    box-shadow:0 25px 60px rgba(0,0,0,.35);
    backdrop-filter:blur(10px);
}

.gold-dashboard-card span{
    display:block;
    color:var(--usdwn-muted);
    margin-bottom:10px;
}

.gold-dashboard-card strong{
    font-size:3rem;
    color:var(--usdwn-gold);
    display:block;
    margin-bottom:10px;
}

.gold-bars{
    transform:rotate(-10deg);
}

.gold-bar{
    background:linear-gradient(
        135deg,
        #fbbf24 0%,
        #fde68a 30%,
        #f59e0b 70%,
        #b45309 100%
    );
    border-radius:20px;
    box-shadow:
        0 20px 40px rgba(251,191,36,.3),
        inset 0 2px 10px rgba(255,255,255,.3);
}

/* =========================================================
   SECTION HEADER
========================================================= */

.section-label{
    display:inline-block;
    color:var(--usdwn-gold);
    font-weight:700;
    margin-bottom:14px;
    text-transform:uppercase;
    letter-spacing:1px;
    font-size:.8rem;
}

.section-header h2{
    font-size:3rem;
    margin-bottom:20px;
    line-height:1.2;
}

.section-header p{
    font-size:1.1rem;
    color:var(--usdwn-muted);
    line-height:1.9;
}

/* =========================================================
   CARDS
========================================================= */

.feature-card,
.metal-card,
.converter-card,
.article-card,
.faq-item,
.final-cta-card{
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.03),
            rgba(255,255,255,.01)
        );
    border:1px solid rgba(255,255,255,.06);
    backdrop-filter:blur(12px);
}

.feature-card:hover,
.metal-card:hover,
.faq-item:hover{
    transform:translateY(-8px);
    border-color:rgba(251,191,36,.35);
}

/* =========================================================
   METAL CARDS
========================================================= */

.metals-grid{
    gap:30px;
}

.metal-card{
    border-radius:28px;
    padding:30px;
    position:relative;
    overflow:hidden;
}

.metal-card::after{
    content:'';
    position:absolute;
    top:-50px;
    right:-50px;
    width:150px;
    height:150px;
    background:rgba(255,255,255,.03);
    border-radius:50%;
}

.price{
    font-size:3rem;
    font-weight:900;
    margin-bottom:12px;
}

.price-details{
    color:var(--usdwn-muted);
}

.price-change{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    padding:10px 18px;
    border-radius:999px;
    margin-top:15px;
}

/* =========================================================
   SELECTS & INPUTS
========================================================= */

select,
input{
    background:#020617 !important;
    border:1px solid rgba(255,255,255,.08) !important;
    border-radius:16px !important;
    color:#fff !important;
    min-height:58px;
}

select:focus,
input:focus{
    border-color:#fbbf24 !important;
    box-shadow:0 0 0 4px rgba(251,191,36,.12) !important;
}

/* =========================================================
   CONVERTER
========================================================= */

.converter-section{
    border-radius:40px;
    padding:80px 40px;
    background:
        linear-gradient(
            135deg,
            rgba(15,23,42,.9),
            rgba(30,41,59,.9)
        );
    border:1px solid rgba(255,255,255,.05);
}

.converter-card{
    border-radius:32px;
    padding:40px;
}

.convert-btn{
    min-height:60px;
    border-radius:18px;
    font-size:1rem;
    font-weight:800;
    letter-spacing:.5px;
}

/* =========================================================
   TABLE
========================================================= */

.table-container{
    overflow:auto;
    border-radius:24px;
    border:1px solid rgba(255,255,255,.06);
}

table{
    width:100%;
    border-collapse:collapse;
    overflow:hidden;
}

thead{
    background:#0f172a;
}

thead th{
    color:#fff;
    padding:20px;
    font-size:.95rem;
}

tbody tr{
    border-top:1px solid rgba(255,255,255,.05);
    transition:.3s ease;
}

tbody tr:hover{
    background:rgba(255,255,255,.03);
}

tbody td{
    padding:18px 20px;
    color:var(--usdwn-muted);
}

/* =========================================================
   FAQ
========================================================= */

.faq-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:25px;
}

.faq-item{
    padding:28px;
    border-radius:24px;
}

.faq-item h3{
    margin-bottom:15px;
    font-size:1.2rem;
}

.faq-item p{
    color:var(--usdwn-muted);
    line-height:1.8;
}

/* =========================================================
   ARTICLE SECTION
========================================================= */

.article-card{
    padding:45px;
    border-radius:32px;
    max-width:1000px;
    margin:auto;
}

.article-card p{
    color:var(--usdwn-muted);
    line-height:2;
    margin-bottom:20px;
    font-size:1.05rem;
}

/* =========================================================
   FINAL CTA
========================================================= */

.final-cta-section{
    padding:80px 0;
}

.final-cta-card{
    padding:60px;
    border-radius:40px;
    text-align:center;
    position:relative;
    overflow:hidden;
}

.final-cta-card::before{
    content:'';
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at top right,
        rgba(251,191,36,.15),
        transparent 40%);
    z-index:-1;
}

.final-cta-card h2{
    font-size:3rem;
    margin-bottom:20px;
}

.final-cta-card p{
    color:var(--usdwn-muted);
    max-width:700px;
    margin:0 auto 35px;
    line-height:1.9;
}

/* =========================================================
   ADSENSE READY AD BOXES
========================================================= */

.ad-space-header,
.ad-space-inline,
.ad-space-sidebar{
    border:2px dashed rgba(255,255,255,.08);
    border-radius:24px;
    background:rgba(255,255,255,.02);
    padding:30px;
    text-align:center;
    color:var(--usdwn-muted);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:992px){

    .usdwn-hero{
        grid-template-columns:1fr;
        text-align:center;
        padding-top:80px;
    }

    .hero-actions{
        justify-content:center;
    }

    .hero-stats{
        justify-content:center;
    }

    .hero-title{
        font-size:3rem;
    }

    .section-header h2{
        font-size:2.3rem;
    }

    .converter-section{
        padding:50px 20px;
    }
}

@media(max-width:768px){

    .hero-title{
        font-size:2.4rem;
    }

    .section-header h2{
        font-size:2rem;
    }

    .price{
        font-size:2.3rem;
    }

    .result-value{
        font-size:2.2rem;
    }

    .article-card,
    .final-cta-card{
        padding:30px;
    }

    .converter-card{
        padding:25px;
    }
}
/* =========================================================
   MOBILE FIXES - USDWN RESPONSIVE
   Add this at the END of style.css
========================================================= */

@media (max-width: 768px) {

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .main,
    main,
    .usdwn-home {
        width: 100%;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden;
    }

    /* Header */
    .nav {
        padding: 12px 15px !important;
    }

    .nav-brand {
        font-size: 1rem;
    }

    /* Hero */
    .hero,
    .usdwn-hero {
        display: block !important;
        min-height: auto !important;
        padding: 45px 0 35px !important;
        text-align: center;
    }

    .hero-content {
        width: 100%;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 15px !important;
    }

    .hero-description {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 22px !important;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-bottom: 25px;
    }

    .hero-cta {
        width: 100%;
        justify-content: center;
        padding: 14px 18px !important;
        font-size: 0.95rem !important;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 20px;
    }

    .hero-stats div {
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        padding: 12px 6px;
    }

    .hero-stats strong {
        font-size: 1rem;
    }

    .hero-stats span {
        font-size: 0.75rem;
    }

    .hero-image {
        margin-top: 30px;
    }

    .gold-dashboard-card {
        width: 100%;
        padding: 22px !important;
        border-radius: 22px !important;
    }

    .gold-dashboard-card strong {
        font-size: 2rem !important;
    }

    .gold-bars {
        transform: none !important;
        align-items: center;
    }

    .gold-bar {
        width: 230px !important;
        height: 58px !important;
    }

    .gold-bar:nth-child(2) {
        transform: translateX(25px) !important;
    }

    /* Sections */
    section {
        padding-top: 35px !important;
        padding-bottom: 35px !important;
    }

    .section-header {
        margin-bottom: 25px !important;
    }

    .section-header h2 {
        font-size: 1.65rem !important;
        line-height: 1.3 !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    /* Country selector */
    .country-selector {
        display: block !important;
        margin-bottom: 25px !important;
    }

    .country-selector label {
        display: block;
        margin-bottom: 8px;
        color: var(--text-secondary);
    }

    .country-selector select {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Metal cards */
    .metals-grid,
    .features-grid,
    .faq-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .metal-card,
    .feature-card,
    .faq-item {
        padding: 22px !important;
        border-radius: 20px !important;
    }

    .metal-header {
        align-items: flex-start !important;
        gap: 12px;
    }

    .price {
        font-size: 2rem !important;
        word-break: break-word;
    }

    .weight-type {
        flex-wrap: wrap;
        gap: 10px !important;
    }

    /* Market status */
    .market-status {
        flex-direction: column;
        gap: 8px !important;
        padding: 18px !important;
        text-align: center;
    }

    /* Converter */
    .converter-section {
        margin: 20px 0 !important;
        padding: 35px 15px !important;
        border-radius: 24px !important;
    }

    .converter-card {
        padding: 20px !important;
        border-radius: 22px !important;
        width: 100%;
    }

    .converter-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
        text-align: left;
    }

    .converter-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .input-group,
    .input-group select,
    .input-group input {
        width: 100% !important;
    }

    .swap-button {
        order: 3;
        justify-content: center;
    }

    .swap-button button {
        width: 48px !important;
        height: 48px !important;
    }

    .convert-btn {
        width: 100%;
        grid-column: auto !important;
        min-height: 54px !important;
    }

    .conversion-result {
        padding: 20px 12px !important;
    }

    .result-value {
        font-size: 2rem !important;
        word-break: break-word;
    }

    .exchange-rate {
        word-break: break-word;
    }

    /* Chart */
    .chart-container {
        padding: 18px !important;
        border-radius: 20px !important;
        overflow-x: auto;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Article */
    .article-card {
        padding: 22px !important;
        border-radius: 22px !important;
    }

    .article-card p {
        font-size: 0.95rem !important;
        line-height: 1.8 !important;
    }

    /* Table */
    .table-container {
        width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 18px !important;
    }

    table {
        min-width: 720px;
    }

    th, td {
        white-space: nowrap;
        padding: 14px 16px !important;
        font-size: 0.9rem !important;
    }

    /* Final CTA */
    .final-cta-card {
        padding: 28px 18px !important;
        border-radius: 24px !important;
    }

    .final-cta-card h2 {
        font-size: 1.7rem !important;
        line-height: 1.3;
    }

    .final-cta-card p {
        font-size: 0.95rem;
    }

    /* Ads */
    .ad-space-header,
    .ad-space-inline,
    .ad-space-sidebar {
        padding: 22px 12px !important;
        border-radius: 18px !important;
        margin: 20px 0 !important;
    }
}

@media (max-width: 420px) {

    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .gold-bar {
        width: 190px !important;
        height: 50px !important;
    }

    .section-header h2 {
        font-size: 1.45rem !important;
    }

    .price,
    .result-value {
        font-size: 1.75rem !important;
    }
}