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

:root {
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --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;
}

/* Light Theme Support */
body.light-theme {
    --background-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --hover-bg: #f9fafb;
}

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: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    z-index: 1001;
    text-decoration: none;
}

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

.nav-brand span {
    white-space: nowrap;
}

.nav-brand small {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 0.25rem;
    opacity: 0.8;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 2rem;
    height: 0.2rem;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:first-child {
    transform: rotate(45deg);
}

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

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

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

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

.nav-link i {
    font-size: 1rem;
}

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

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

.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);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle i:last-child {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle i:last-child {
    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: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

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

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

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    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.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

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

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

.gold-bar {
    width: 300px;
    height: 80px;
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.gold-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Ad Spaces */
.ad-space-header {
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-secondary);
}

.ad-space-header i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

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

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

.metals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

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

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

.metal-info h3 {
    font-size: 1.5rem;
}

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

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
}

.status-indicator.active {
    box-shadow: 0 0 10px var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

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

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

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

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

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

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.price-change {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    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 {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

/* Converter Section */
.converter-section {
    padding: 4rem 0;
}

.converter-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

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

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

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

.converter-form {
    display: grid;
    grid-template-columns: 1fr 1fr 50px 1fr;
    gap: 1.5rem;
    align-items: end;
}

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

.input-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.swap-button {
    display: flex;
    justify-content: center;
    padding-bottom: 5px;
}

.swap-button button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.swap-button button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.convert-btn {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.convert-btn:hover {
    background: var(--primary-dark);
}

.conversion-result {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

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

.main-chart-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    height: 500px;
}

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

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .metals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    .converter-form {
        grid-template-columns: 1fr 1fr;
    }
    .swap-button {
        grid-column: 1 / -1;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        gap: 2rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        text-align: center;
    }
    
    .dropdown-item {
        justify-content: center;
    }
    
    .metals-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand, .footer-desc {
        max-width: 100%;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links a {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .converter-form {
        grid-template-columns: 1fr;
    }
    .nav {
        padding: 0.75rem 1rem;
    }
    .nav-brand span {
        font-size: 1.1rem;
    }
    .nav-brand small {
        display: none;
    }
}
