:root {
    --gold-primary: #D4AF37;
    --gold-dark: #B8941E;
    --gold-light: #F4E5C2;
    --dark-bg: #1a1a1a;
    --text-light: #f8f9fa;
}

body {
    padding-top: 76px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

main {
    min-height: 60vh;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d2d2d 100%);
    box-shadow: 0 2px 20px rgba(212, 175, 55, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 30px rgba(212, 175, 55, 0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    font-size: 1.8rem;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary) !important;
}

.nav-link.active {
    color: var(--gold-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.navbar-toggler {
    border: 2px solid var(--gold-primary);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23D4AF37' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.live-rate-badge {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--dark-bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

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

/* ===== FOOTER STYLES ===== */
footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0d0d0d 100%);
    color: var(--text-light);
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-title {
    color: var(--gold-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--gold-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: #b8b8b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    border-radius: 50%;
    margin-right: 0.8rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--gold-primary);
    color: var(--dark-bg);
    border-color: var(--gold-primary);
    transform: translateY(-5px);
}

.footer-bottom {
    background: #0a0a0a;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-contact-info {
    margin-bottom: 1rem;
}

.footer-contact-info i {
    color: var(--gold-primary);
    margin-right: 0.5rem;
}

/* ===== GOLD RATES SECTION ===== */
.gold-rates-section {
    padding: 40px 0;
}

.rate-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.rate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37, #F4E5A1);
}

.rate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.rate-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.rate-value {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    line-height: 1.2;
}

.rate-currency {
    font-size: 18px;
    color: #718096;
    font-weight: 600;
}

.rate-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

.rate-change.positive {
    background-color: #d4edda;
    color: #155724;
}

.rate-change.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.rate-unit {
    font-size: 13px;
    color: #a0aec0;
    margin-top: 8px;
    font-weight: 500;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    color: #2d3748;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-title p {
    color: black;
    font-size: 16px;
    max-width: 80%;
    margin: 0 auto;
    text-align: left;
}

.last-updated {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 30px;
    font-weight: 500;
}

.last-updated i {
    margin-right: 5px;
    color: #D4AF37;
}

.rate-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #2d2d2d;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .nav-link {
        padding: 0.8rem 1rem !important;
        margin: 0.2rem 0;
    }
    
    .live-rate-badge {
        margin: 1rem 0;
        display: inline-block;
    }
    
    footer {
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
        display: flex;
    }
}

@media (max-width: 768px) {
    .rate-card {
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .rate-value {
        font-size: 30px;
    }

    .gold-rates-section {
        padding: 30px 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
}









/* Karat gold price per gram */
    .karat-rates-section {
        padding: 40px 0;
        background-color: #f8f9fa;
    }

    .karat-table-container {
        background: white;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid #e9ecef;
        position: relative;
    }

    .karat-table-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #D4AF37, #F4E5A1);
        z-index: 1;
    }

    .karat-table-container .table-responsive {
        border: none;
    }

    .karat-table-container table {
        margin: 0;
        font-size: 14px;
    }

    .karat-table-container th {
        background-color: #f8f9fa;
        color: #2d3748;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border: none;
        padding: 20px 15px;
        position: relative;
        z-index: 0;
        white-space: nowrap;
    }

    .karat-table-container td {
        padding: 15px;
        color: #2d3748;
        border-color: #e9ecef;
        vertical-align: middle;
    }

    .karat-table-container .gold-type {
        font-weight: 600;
        color: #2d3748;
    }

    .karat-table-container .price {
        font-weight: 500;
        color: #2d3748;
    }

    .karat-table-container .today-price {
        font-weight: 700;
        color: #D4AF37;
    }

    .karat-table-container .change-positive {
        color: #155724;
        font-weight: 600;
        background-color: #d4edda;
        padding: 6px 12px;
        border-radius: 20px;
        white-space: nowrap;
    }

    .karat-table-container .change-negative {
        color: #721c24;
        font-weight: 600;
        background-color: #f8d7da;
        padding: 6px 12px;
        border-radius: 20px;
        white-space: nowrap;
    }

    .karat-table-container .change-zero {
        color: #6c757d;
        font-style: italic;
        font-weight: 500;
        padding: 6px 12px;
        border-radius: 20px;
        white-space: nowrap;
    }

    .karat-table-container tbody tr:hover {
        background-color: #f8f9fa;
    }

    @media (max-width: 768px) {
        .karat-table-container th,
        .karat-table-container td {
            padding: 12px 8px;
            font-size: 13px;
        }

        .section-title h2 {
            font-size: 28px;
        }

        .section-title p {
            font-size: 14px;
        }
    }
/* Karat gold Price Per Gram */





       body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f8f9fa;
        }
        
        main {
            min-height: 60vh;
        }

        .gold-rates-section {
            padding: 40px 0;
        }

        .rate-card {
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            height: 100%;
            position: relative;
            overflow: hidden;
            border: 1px solid #e9ecef;
        }

        .rate-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #D4AF37, #F4E5A1);
        }

        .rate-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        }



        .rate-label {
            font-size: 14px;
            color: #6c757d;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }

        .rate-value {
            font-size: 36px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 5px;
            line-height: 1.2;
        }

        .rate-currency {
            font-size: 18px;
            color: #718096;
            font-weight: 600;
        }

        .rate-change {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            margin-top: 15px;
        }

        .rate-change.positive {
            background-color: #d4edda;
            color: #155724;
        }

        .rate-change.negative {
            background-color: #f8d7da;
            color: #721c24;
        }

        .rate-unit {
            font-size: 13px;
            color: #a0aec0;
            margin-top: 8px;
            font-weight: 500;
        }

        .section-title {
            text-align: center;
            margin-bottom: 40px;
        }

        .section-title h2 {
            color: #2d3748;
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .section-title p {
            color: black;
            font-size: 16px;
            max-width: 80%;
            margin: 0 auto;
            text-align: left;
        }

        .last-updated {
            text-align: center;
            color: #6c757d;
            font-size: 14px;
            margin-top: 30px;
            font-weight: 500;
        }

        .last-updated i {
            margin-right: 5px;
            color: #D4AF37;
        }

        .rate-data {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        @media (max-width: 768px) {
            .rate-card {
                margin-bottom: 20px;
            }

            .section-title h2 {
                font-size: 28px;
            }

            .rate-value {
                font-size: 30px;
            }

            .gold-rates-section {
                padding: 30px 0;
            }
        }




    

    /* Chart Wrapper Styles */
.chart-wrapper {
    margin-left: 6%;
    margin-right: 6%;
    padding: 20px 0;
}

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

.chart-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.chart-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.chart-controls select,
.chart-controls button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chart-controls button:hover {
    background: #f0f0f0;
}

.chart-controls button.active {
    background: blue !important;
    color: white !important;
}

#chartContainer {
    height: 370px;
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Tablet: 768px and below */
@media (max-width: 768px) {
    .chart-wrapper {
        margin-left: 5%;
        margin-right: 5%;
        padding: 15px 0;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-header h3 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .chart-controls {
        justify-content: center;
    }
    
    .chart-controls select,
    .chart-controls button {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    #chartContainer {
        height: 300px;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .chart-wrapper {
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
    }
    
    .chart-header h3 {
        font-size: 1.1rem;
    }
    
    .chart-controls {
        width: 100%;
    }
    
    .chart-controls select {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .chart-controls button {
        flex: 1;
        padding: 10px 8px;
        font-size: 12px;
        min-width: 45px;
    }
    
    #chartContainer {
        height: 250px;
        border-radius: 4px;
    }
}