/* Custom styles for Gold Rate Website */

:root {
    --primary-color: #d4a574;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-dark: #333;
    --border-light: #e9ecef;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #34a853 100%) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    color: #ffd700 !important;
}

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

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

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}

/* Price Display Cards */
.price-display {
    text-align: right;
}

.price-24k {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.price-change {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Card Hover Effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Table Styles */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

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

/* Price highlighting */
.price-highlight {
    background: linear-gradient(45deg, #ffc107, #ffeb3b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .card-body h2 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 8px;
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffed4a, #ffd700);
}

footer .container {
    position: relative;
    z-index: 2;
}

footer h5 {
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 30px;
    height: 2px;
    background: #ffd700;
}

footer a {
    transition: all 0.3s ease;
    color: #bdc3c7;
    text-decoration: none;
    position: relative;
}

footer a:hover {
    color: #ffd700 !important;
    padding-left: 5px;
}

footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

footer .list-unstyled a::before {
    content: '»';
    margin-right: 5px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

footer .list-unstyled a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

footer .text-center {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    margin-top: 1rem;
}

footer .text-muted {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Social Media Icons (if added later) */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: #6c757d;
}

/* Custom badges */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Animation for price changes */
.price-up {
    animation: priceUp 0.5s ease;
}

.price-down {
    animation: priceDown 0.5s ease;
}

@keyframes priceUp {
    0% { background-color: transparent; }
    50% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

@keyframes priceDown {
    0% { background-color: transparent; }
    50% { background-color: #f8d7da; }
    100% { background-color: transparent; }
}

/* Print styles */
@media print {
    .navbar, .breadcrumb, footer, .btn {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e9ecef;
        --secondary-color: #343a40;
        --border-light: #495057;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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