/* Gold Price Modern CSS - 2025 Design */

:root {
    --gold-primary: #FFD700;
    --gold-secondary: #FFA500;
    --gold-light: #FFF8DC;
    --dark-primary: #1a1a2e;
    --dark-secondary: #16213e;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --success: #27ae60;
    --danger: #e74c3c;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hero Section */
.gold-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.gold-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price Cards Grid */
.price-cards-container {
    padding: 40px 0;
    background: #f8f9fa;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.price-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
}

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

.price-card.gold-24k::before { background: linear-gradient(90deg, #FFD700, #FFC700); }
.price-card.gold-22k::before { background: linear-gradient(90deg, #FFA500, #FF8C00); }
.price-card.gold-18k::before { background: linear-gradient(90deg, #CD853F, #D2691E); }

.karat-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.price-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.price-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-change.up {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.price-change.down {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.change-arrow {
    font-size: 1.1rem;
}

/* City Selector */
.city-selector {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

.city-search-box {
    position: relative;
    margin-bottom: 25px;
}

.city-search {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.city-search:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.city-btn {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
}

.city-btn:hover {
    background: var(--gold-light);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.city-btn.active {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    color: white;
    border-color: var(--gold-primary);
}

.city-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.city-price-preview {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Table Section */
.table-section {
    padding: 40px 0;
}

.modern-table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.modern-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modern-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modern-table tbody tr {
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: #f8f9fa;
}

.city-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.city-link:hover {
    color: var(--gold-secondary);
}

.metro-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Chart Section */
.chart-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.chart-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

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

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-tabs {
    display: flex;
    gap: 10px;
}

.chart-tab {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.chart-tab:hover {
    border-color: var(--gold-primary);
}

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

/* Calculator Section */
.calculator-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.calc-input-group {
    margin-bottom: 20px;
}

.calc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.calc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.calc-input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.calc-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.calc-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.calc-result {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    text-align: center;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.info-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer CTA */
.footer-cta {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 50px 0;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-text {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 25px;
}

.cta-btn {
    display: inline-block;
    padding: 14px 30px;
    background: white;
    color: #667eea;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title { font-size: 2.5rem; }
    .price-value { font-size: 2.2rem; }
}

@media (max-width: 992px) {
    .chart-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .gold-hero { padding: 60px 0 50px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .price-grid {
        grid-template-columns: 1fr;
        margin-top: -60px;
    }
    
    .price-value { font-size: 2rem; }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    
    .modern-table {
        font-size: 0.9rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 12px 15px;
    }
    
    .cta-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.75rem; }
    .price-card { padding: 20px; }
    .price-value { font-size: 1.75rem; }
    
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modern-table {
        font-size: 0.85rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 10px 12px;
    }
}

/* Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-price {
    height: 40px;
    border-radius: 4px;
    width: 60%;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #2c3e50;
        --text-primary: #ecf0f1;
        --text-secondary: #bdc3c7;
    }
    
    body {
        background: #1a1a2e;
    }
    
    .price-card,
    .city-selector,
    .modern-table-container,
    .chart-container,
    .calculator-card,
    .info-card {
        background: var(--card-bg);
    }
    
    .city-search,
    .calc-input,
    .calc-select {
        background: #34495e;
        border-color: #4a5f7a;
        color: var(--text-primary);
    }
    
    .city-btn {
        background: #34495e;
        color: var(--text-primary);
    }
    
    .modern-table tbody tr:hover {
        background: #34495e;
    }
}

/* Print Styles */
@media print {
    .gold-hero,
    .footer-cta,
    .city-selector,
    .calculator-card {
        display: none;
    }
    
    .price-grid {
        margin-top: 0;
    }
    
    .modern-table {
        box-shadow: none;
    }
}