/**
 * Gold Price Tracker - Main Stylesheet
 * Modern dark theme with gold accents
 */

/* ========================================
   1. RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #1a1a2e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   2. LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   3. HEADER
   ======================================== */
.header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    position: relative;
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.header .update-time {
    font-size: 14px;
    color: #4caf50;
    font-weight: 500;
}

/* Top Right Actions */
.top-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   4. LANGUAGE SWITCH & LOGIN BUTTONS
   ======================================== */
.lang-switch {
    display: none;
}

.lang-switch-desktop {
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

/* Login Button */
.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.login-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* User Button (logged in) */
.user-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
    position: relative;
}

.user-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
    transform: scale(1.05);
}

.user-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Tooltip for user button */
.user-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-top: 8px;
    pointer-events: none;
    z-index: 100;
}

.user-btn:hover::after {
    opacity: 1;
    visibility: visible;
}


/* Page Top Bar (for secondary pages) */
.page-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.page-back-link:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.page-back-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.page-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   5. GOLD LIST
   ======================================== */
.gold-list {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.list-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1fr 120px;
    padding: 15px 20px;
    background: rgba(255,215,0,0.1);
    font-size: 12px;
    font-weight: 600;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-item {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1fr 120px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    align-items: center;
    cursor: pointer;
}

.list-item:hover {
    background: rgba(255,255,255,0.05);
}

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

.list-item.expanded {
    background: rgba(255,215,0,0.08);
}

/* Featured item */
.list-item.featured {
    background: rgba(255,215,0,0.05);
}

.list-item.featured .gold-name {
    color: #ffd700;
}

/* Gold name & code */
.gold-name {
    font-weight: 600;
    color: #fff;
}

.gold-code {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Price cells */
.price-cell {
    text-align: right;
}

.price-value {
    font-weight: 600;
    font-size: 15px;
}

.currency-unit {
    font-size: 11px;
    font-weight: 500;
    color: #ffd700;
    margin-left: 2px;
    opacity: 0.8;
}

.price-change {
    font-size: 11px;
    margin-top: 2px;
}

/* Change colors */
.change-up {
    color: #4caf50;
}

.change-down {
    color: #f44336;
}

.change-neutral {
    color: #666;
}

/* Trend badge */
.trend-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.trend-up {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.trend-down {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.trend-stable {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Update cell */
.update-cell {
    font-size: 11px;
    color: #888;
    text-align: right;
}

/* ========================================
   6. WORLD GOLD SECTION
   ======================================== */
.world-gold {
    background: rgba(255,215,0,0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,215,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    cursor: pointer;
}

.world-gold-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.world-gold-icon {
    font-size: 32px;
}

.world-gold-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffd700;
}

.world-gold-code {
    font-size: 12px;
    color: #888;
}

.world-gold-price {
    text-align: right;
}

.world-gold-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.world-gold-change {
    font-size: 14px;
    margin-top: 5px;
}

/* ========================================
   7. HISTORY PANEL
   ======================================== */
.history-panel {
    display: none;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px;
}

.history-panel.show {
    display: block;
}

.history-panel h4 {
    font-size: 13px;
    color: #ffd700;
    margin-bottom: 10px;
}

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

.history-header h4 {
    margin-bottom: 0;
}

.history-header-buttons {
    display: flex;
    gap: 6px;
}

/* History table */
.history-table {
    width: 100%;
    font-size: 12px;
}

.history-table th {
    text-align: left;
    padding: 8px 10px;
    color: #888;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table .day-row {
    cursor: pointer;
    transition: background 0.2s;
}

.history-table .day-row:hover {
    background: rgba(255, 215, 0, 0.1);
}

.history-table .day-row td:first-child {
    position: relative;
    padding-left: 20px;
}

.history-table .day-row td:first-child::before {
    content: '\25B6';
    position: absolute;
    left: 5px;
    font-size: 8px;
    color: #ffd700;
    transition: transform 0.2s;
}

.history-table .day-row.expanded td:first-child::before {
    transform: rotate(90deg);
}

.history-table .entry-row {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.history-table .entry-row.show {
    display: table-row;
}

.history-table .entry-row td {
    font-size: 11px;
    color: #aaa;
    padding: 6px 10px;
}

.history-table .entry-row td:first-child {
    padding-left: 25px;
}

/* ========================================
   8. BUTTONS
   ======================================== */
/* Chart button */
.chart-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #ffd700;
}

.chart-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

.chart-btn svg {
    width: 14px;
    height: 14px;
    fill: #ffd700;
}

/* Detail button */
.detail-btn {
    background: rgba(100, 181, 246, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.4);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64b5f6;
    text-decoration: none;
}

.detail-btn:hover {
    background: rgba(100, 181, 246, 0.3);
    border-color: #64b5f6;
}

.detail-btn svg {
    width: 14px;
    height: 14px;
    fill: #64b5f6;
}

/* Back link */
.back-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255,215,0,0.2);
    border: 1px solid #ffd700;
    border-radius: 8px;
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255,215,0,0.3);
}

/* ========================================
   9. CHART MODAL
   ======================================== */
.chart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chart-modal.show {
    display: flex;
}

.chart-modal-content {
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.chart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-modal-header h3 {
    font-size: 16px;
    color: #ffd700;
    margin: 0;
}

.chart-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chart-modal-close:hover {
    color: #fff;
}

.chart-modal-body {
    padding: 20px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-canvas {
    width: 100%;
    height: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 12px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.chart-legend-buy {
    background: #4caf50;
}

.chart-legend-sell {
    background: #f44336;
}

/* ========================================
   10. FOOTER
   ======================================== */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffd700;
}

.footer-links span {
    color: #444;
}

/* ========================================
   11. COUNTDOWN TIMER
   ======================================== */
.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 10px;
}

#countdownText {
    color: #888;
}

#countdownValue {
    color: #888;
    font-weight: 500;
    font-family: monospace;
    font-size: 10px;
}

.countdown-timer.updating #countdownValue {
    color: #4caf50;
    animation: pulse 1s ease-in-out;
}

/* ========================================
   12. MOBILE TOP MENU
   ======================================== */
.mobile-top-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 15px;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    justify-content: space-between;
    align-items: center;
}

.mobile-top-menu .menu-title {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.mobile-top-menu .menu-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Language Switch Group */
.mobile-top-menu .menu-lang-group {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px;
}

.mobile-top-menu .menu-lang-btn {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    color: #666;
    transition: all 0.2s;
}

.mobile-top-menu .menu-lang-btn.active {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

/* Icon Button Group */
.mobile-top-menu .menu-icon-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-top-menu .menu-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-top-menu .menu-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.mobile-top-menu .menu-icon-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

/* Notify button special state */
.mobile-top-menu .menu-notify-btn.subscribed {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

/* User icon - logged in */
.mobile-top-menu .menu-user-icon {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.mobile-top-menu .menu-user-icon:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #ffd700;
}

/* Login icon */
.mobile-top-menu .menu-login-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #1a1a2e;
}

.mobile-top-menu .menu-login-icon:hover {
    transform: scale(1.05);
}

/* ========================================
   13. MOBILE RELOAD BUTTON
   ======================================== */
.mobile-reload-btn {
    display: none;
    position: fixed;
    left: 20px;
    bottom: 100px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.mobile-reload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.mobile-reload-btn:active {
    transform: scale(0.95);
}

.mobile-reload-btn svg {
    width: 24px;
    height: 24px;
    fill: #1a1a2e;
    transition: transform 0.5s ease;
}

.mobile-reload-btn.loading svg {
    animation: spin 1s linear infinite;
}

/* ========================================
   14. PULL TO REFRESH INDICATOR
   ======================================== */
.pull-indicator {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    opacity: 0;
    transition: opacity 0.2s;
}

.pull-indicator svg {
    width: 20px;
    height: 20px;
    fill: #ffd700;
    transition: transform 0.3s;
}

.pull-indicator.ready svg {
    transform: rotate(180deg);
}

.pull-indicator.refreshing svg {
    animation: spin 1s linear infinite;
}

/* ========================================
   15. SHARE BUTTON & POPUP
   ======================================== */
.share-btn {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,215,0,0.3);
    background: transparent;
    color: #888;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.share-btn:hover {
    border-color: rgba(255,215,0,0.6);
    color: #ffd700;
}

.share-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Share Popup Overlay */
.share-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.share-overlay.active {
    display: flex;
}

/* Share Popup */
.share-popup {
    background: #1e1e2e;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlide 0.3s ease;
}

.share-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #FFD700;
}

.share-popup-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.share-popup-close:hover {
    color: #fff;
}

/* Share Options Grid */
.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    color: #fff;
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.share-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-option-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.share-option-label {
    font-size: 11px;
    color: #ccc;
}

/* Social colors */
.share-facebook .share-option-icon { background: #1877F2; }
.share-twitter .share-option-icon { background: #000000; }
.share-telegram .share-option-icon { background: #0088CC; }
.share-zalo .share-option-icon { background: #0068FF; }
.share-whatsapp .share-option-icon { background: #25D366; }
.share-linkedin .share-option-icon { background: #0A66C2; }
.share-email .share-option-icon { background: #EA4335; }
.share-copy .share-option-icon { background: #6c757d; }

/* Copy Link Section */
.share-copy-section {
    display: flex;
    gap: 8px;
}

.share-copy-input {
    flex: 1;
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 12px;
}

.share-copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-copy-btn:hover {
    transform: scale(1.05);
}

.share-copy-btn.copied {
    background: #28a745;
}

/* ========================================
   16. NOTIFICATION BUTTON & POPUP
   ======================================== */
.notify-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    position: relative;
}

.notify-btn:hover {
    color: #ffd700;
    animation: bellShake 0.5s ease-in-out;
}

.notify-btn.subscribed {
    color: #4caf50;
 #   background: rgba(76, 175, 80, 0.2);
}

.notify-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Tooltip for notify button */
.notify-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-top: 4px;
    pointer-events: none;
}

.notify-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Notification Popup Overlay */
.notify-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.notify-popup-overlay.active {
    display: flex;
}

.notify-popup {
    background: #1e1e2e;
    border-radius: 16px;
    padding: 30px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlide 0.3s ease;
}

.notify-popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.notify-popup-icon.success {
    background: rgba(40, 167, 69, 0.2);
}

.notify-popup-icon.error {
    background: rgba(220, 53, 69, 0.2);
}

.notify-popup-icon.info {
    background: rgba(255, 215, 0, 0.2);
}

.notify-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.notify-popup-message {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 20px;
}

.notify-popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.notify-popup-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    border: none;
    color: #1a1a2e;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.notify-popup-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.notify-popup-btn.cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
}

.notify-popup-btn.cancel:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: none;
}

/* Gold type checkboxes in popup */
/* PWA Installation Guide */
.pwa-guide {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 15px;
    text-align: left;
}

.pwa-guide p {
    margin: 0;
}

.pwa-guide ol {
    margin: 8px 0 0 0;
}

.pwa-guide li {
    margin: 4px 0;
}

.pwa-guide strong {
    color: #ffd700;
}

.notify-gold-types {
    margin: 15px 0;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
}

.notify-gold-type-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.notify-gold-type-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notify-gold-type-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #ffd700;
    cursor: pointer;
}

.notify-gold-type-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
}

.notify-gold-type-item.featured {
    border-left: 3px solid #ffd700;
}

.notify-select-all {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notify-select-all button {
    background: none;
    border: none;
    color: #ffd700;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
}

.notify-select-all button:hover {
    text-decoration: underline;
}

/* ========================================
   17. FILTER POPUP
   ======================================== */
.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    position: relative;
}

.filter-btn:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.filter-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Tooltip for filter button */
.filter-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-top: 4px;
    pointer-events: none;
}

.filter-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Filter Popup Overlay */
.filter-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.filter-popup-overlay.active {
    display: flex;
}

.filter-popup {
    background: #1e1e2e;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlide 0.3s ease;
}

.filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #FFD700;
}

.filter-popup-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.filter-popup-close:hover {
    color: #fff;
}

/* Filter Select Actions */
.filter-select-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-select-btn {
    background: none;
    border: none;
    color: #ffd700;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-select-btn:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Filter Gold Types List */
.filter-gold-types {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.filter-gold-type-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 6px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-gold-type-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.filter-gold-type-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #ffd700;
    cursor: pointer;
}

.filter-gold-type-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    color: #ddd;
}

/* Filter Popup Footer */
.filter-popup-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-popup-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.filter-popup-btn.save {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #1a1a2e;
}

.filter-popup-btn.save:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.filter-popup-btn.cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
}

.filter-popup-btn.cancel:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Legacy toast */
.notify-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    animation: toastSlide 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notify-toast.success {
    background: #28a745;
}

.notify-toast.error {
    background: #dc3545;
}

/* ========================================
   17. CONTENT SECTIONS (for static pages)
   ======================================== */
.content {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.section {
    margin-bottom: 25px;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    font-size: 18px;
    color: #ffd700;
    margin-bottom: 10px;
}

.section p {
    color: #ccc;
    line-height: 1.6;
}

.copyright-year {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    color: #ffd700;
}

/* ========================================
   18. DETAIL PAGE SPECIFIC
   ======================================== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.detail-header .top-actions {
    position: static;
}

.detail-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.detail-back:hover {
    color: #ffd700;
}

.detail-back svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.stat-value.positive {
    color: #4caf50;
}

.stat-value.negative {
    color: #f44336;
}

/* ========================================
   19. ANIMATIONS
   ======================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-15deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
    90% { transform: rotate(-5deg); }
}

/* ========================================
   20. RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .mobile-top-menu {
        display: flex;
    }

    body {
        padding-top: 50px;
        font-size: 14px;
    }

    .header h1 {
        display: none;
    }

    .header .lang-switch {
        display: none;
    }

    .header .top-actions {
        display: none;
    }

    .lang-switch-desktop {
        display: none;
    }

    .login-btn {
        display: none;
    }

    .user-btn {
        display: none;
    }

    .page-top-bar {
        display: none;
    }

    .detail-header .top-actions {
        display: none;
    }

    .header {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .list-header,
    .list-item {
        grid-template-columns: 1.5fr 1fr 1fr 80px;
        font-size: 13px;
    }

    .list-header > div:nth-child(4),
    .list-item > div:nth-child(4) {
        display: none;
    }

    .update-cell {
        font-size: 10px;
    }

    .price-value {
        font-size: 12px;
    }

    .price-change {
        font-size: 9px;
    }

    .section-title {
        font-size: 14px;
    }

    .update-time {
        font-size: 12px;
    }

    .footer {
        font-size: 12px;
    }

    .world-gold-value {
        font-size: 22px;
    }

    .world-gold-change {
        font-size: 12px;
    }

    .mobile-reload-btn {
        display: flex;
    }
}

@media (max-width: 480px) {
    .list-header,
    .list-item {
        grid-template-columns: 1.2fr 1fr 1fr;
    }

    .list-header > div:nth-child(5),
    .list-item > div:nth-child(5) {
        display: none;
    }
}

@media (min-width: 769px) {
    .pull-indicator {
        display: none;
    }
}
