/**
 * Gold & Currency Prices Styles
 * Overhauled to use theme variables and professional design
 */

.gold-prices-page,
.currency-rates-page {
    padding: 50px 0;
    min-height: 80vh;
    background-color: var(--fn-bg-secondary);
}

.currency-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--fn-border-light);
    padding-bottom: 25px;
}

.currency-rates-page .page-header {
    margin: 0;
    text-align: right;
}

.currency-rates-page .page-title {
    font-size: 32px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
}

.prices-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.last-update {
    background: var(--fn-bg-primary);
    padding: 8px 15px;
    border-radius: var(--fn-radius-md);
    border: 1px solid var(--fn-border-light);
    font-size: 13px;
    display: flex;
    gap: 8px;
}

.last-update .label {
    font-weight: 700;
    color: var(--fn-text-secondary);
}

.last-update .time {
    color: var(--fn-primary);
    font-weight: 700;
}

/* Converter Styling */
.converter-section {
    margin-bottom: 50px;
}

.converter-card {
    background: var(--fn-bg-primary);
    border-radius: var(--fn-radius-lg);
    padding: 30px;
    box-shadow: var(--fn-shadow-md);
    border: 1px solid var(--fn-border-light);
}

.converter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: var(--fn-primary);
}

.converter-header h2 {
    font-size: 20px;
    margin: 0;
}

.converter-box {
    display: flex;
    align-items: center;
    gap: 30px;
}

.converter-group {
    flex: 1;
}

.converter-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--fn-text-secondary);
    margin-bottom: 10px;
}

.input-wrap {
    display: flex;
    gap: 10px;
}

.converter-group input {
    flex: 1;
    height: 50px;
    border: 2px solid var(--fn-border-light);
    border-radius: var(--fn-radius-md);
    padding: 0 15px;
    font-size: 18px;
    font-weight: 700;
    direction: ltr;
}

.converter-group input:focus {
    border-color: var(--fn-primary);
    outline: none;
}

.currency-select {
    width: 180px;
    height: 50px;
    border: 2px solid var(--fn-border-light);
    border-radius: var(--fn-radius-md);
    padding: 0 10px;
    font-weight: 600;
    background-color: var(--fn-bg-secondary);
}

.converter-divider {
    font-size: 24px;
    color: var(--fn-primary);
    opacity: 0.5;
    padding-top: 25px;
}

/* Currencies Grid */
.currencies-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
    border-right: 4px solid var(--fn-primary);
}

.currencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1200px;
}

.currency-card {
    background: var(--fn-bg-primary);
    border-radius: var(--fn-radius-lg);
    padding: 24px;
    border: 1px solid var(--fn-border-light);
    box-shadow: var(--fn-shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.currency-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--fn-primary);
    opacity: 0.5;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.city-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.city-main .flag {
    font-size: 24px;
}

.city-main h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.city-info .country {
    display: block;
    font-size: 12px;
    color: var(--fn-text-muted);
    font-weight: 500;
}

.currency-code {
    background: var(--fn-bg-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fn-primary);
}

.currency-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px dashed var(--fn-border-light);
}

.rate-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--fn-text-primary);
    font-family: var(--fn-font-heading);
    direction: ltr;
}

.rate-label {
    font-size: 11px;
    color: var(--fn-text-muted);
    font-weight: 600;
    text-align: right;
}

.gold-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffac00 100%) !important;
    color: #000 !important;
}

/* Gold Premium Card (Global Highlight) */
.global-highlight-section {
    margin-bottom: 50px;
}

.gold-premium-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d3436 100%);
    border-radius: var(--fn-radius-lg);
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.highlight-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.highlight-header i {
    font-size: 32px;
    color: #ffd700;
}

.highlight-header h2 {
    font-size: 24px;
    margin: 0;
    color: white;
}

.highlight-grid {
    display: flex;
    gap: 40px;
}

.highlight-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--fn-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.highlight-item .label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-weight: 600;
}

.highlight-item .value {
    font-size: 32px;
    font-weight: 800;
    color: #ffd700;
    font-family: var(--fn-font-heading);
}

/* Gold Rate Lists */
.gold-rates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gold-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--fn-bg-secondary);
    border-radius: var(--fn-radius-sm);
}

.gold-rate-item .label {
    font-size: 13px;
    font-weight: 700;
    color: var(--fn-text-secondary);
}

.gold-rate-item .value {
    font-size: 18px;
    font-weight: 800;
    color: var(--fn-text-primary);
}

.gold-rate-item.special {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.gold-rate-item.special .label {
    color: #b8860b;
}

/* Gold Info Section */
.info-card.gold-info {
    border-right: 4px solid #ffd700;
}

.info-card.gold-info i {
    color: #ffd700;
}

.gold-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.guide-item {
    font-size: 13px;
    background: var(--fn-bg-secondary);
    padding: 10px;
    border-radius: var(--fn-radius-sm);
    color: var(--fn-text-secondary);
}

.guide-item strong {
    color: var(--fn-text-primary);
}

/* Dark Mode Overrides */
body.fn-dark-mode .gold-card .gold-rate-item {
    background: rgba(255, 255, 255, 0.03);
}

body.fn-dark-mode .gold-card .gold-rate-item.special {
    background: rgba(255, 215, 0, 0.05);
}

.disclaimer {
    background: var(--fn-bg-primary);
    border: 1px solid var(--fn-border-light);
    border-right: 4px solid #f59e0b;
    padding: 20px;
    border-radius: var(--fn-radius-md);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.disclaimer i {
    font-size: 24px;
    color: #f59e0b;
}

.disclaimer p {
    margin: 0;
    font-size: 14px;
    color: var(--fn-text-secondary);
    line-height: 1.6;
}

/* Dark Mode Integration */
body.fn-dark-mode .currency-select {
    background-color: var(--fn-bg-secondary);
    color: var(--fn-text-primary);
}

body.fn-dark-mode .converter-group input {
    background-color: var(--fn-bg-secondary);
    color: var(--fn-text-primary);
}

/* Responsive */
@media (max-width: 992px) {
    .currency-header-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .converter-box {
        flex-direction: column;
        gap: 20px;
    }

    .converter-divider {
        padding: 0;
        transform: rotate(90deg);
    }

    .currency-select {
        width: 120px;
    }
}

/* Gold Page Mobile Adjustments */
@media (max-width: 576px) {
    .gold-premium-card {
        padding: 25px 20px;
    }

    .highlight-header h2 {
        font-size: 18px;
    }

    .highlight-grid {
        gap: 15px;
    }

    .highlight-item {
        padding: 15px 12px;
    }

    .highlight-item .value {
        font-size: 20px;
    }

    .highlight-item .label {
        font-size: 12px;
    }

    .prices-meta {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .prices-meta .last-update {
        padding: 8px 10px;
        font-size: 11px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .prices-meta .refresh-btn {
        width: 100%;
        font-size: 13px;
        padding: 8px;
        justify-content: center;
    }

    .gold-header-wrap .page-title {
        font-size: 28px;
    }

    .highlight-grid {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .currencies-grid {
        grid-template-columns: 1fr;
    }
}

/* Oil Prices Page Styles */
.oil-prices-page .oil-header-wrap {
    border-bottom: 2px solid var(--fn-border-light);
    margin-bottom: 40px;
    padding-bottom: 25px;
}

.benchmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.oil-card {
    background: linear-gradient(135deg, #1e272e 0%, #2d3436 100%);
    border-radius: var(--fn-radius-lg);
    padding: 35px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
}

.oil-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.oil-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    border-color: var(--fn-primary);
}

.oil-card.benchmark-brent {
    border-right: 5px solid #3498db;
}

.oil-card.benchmark-wti {
    border-right: 5px solid #e67e22;
}

.oil-card.benchmark-gas {
    border-right: 5px solid #2ecc71;
}

.oil-card .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.oil-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

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

.oil-info i {
    font-size: 32px;
}

.benchmark-brent i {
    color: #3498db;
}

.benchmark-wti i {
    color: #e67e22;
}

.benchmark-gas i {
    color: #2ecc71;
}

.oil-title h3 {
    margin: 0;
    font-size: 20px;
    color: white !important;
}

.oil-title .symbol {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.price-change {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.price-change.up {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.price-change.down {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
}

.price-main .currency {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.price-main .value {
    font-size: 48px;
    font-weight: 900;
    color: white;
    font-family: var(--fn-font-heading);
}

.card-footer .unit {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* Info Section Adjustments */
.info-card.energy-info {
    border-right: 4px solid #3498db;
    background: linear-gradient(to left, rgba(52, 152, 219, 0.05), transparent);
}

.info-card.energy-info i {
    color: #3498db;
}

.energy-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

/* Oil Mobile Adjustments */
@media (max-width: 576px) {
    .oil-card {
        padding: 25px;
    }

    .price-main .value {
        font-size: 36px;
    }

    .energy-guide {
        grid-template-columns: 1fr;
    }
}

/* Prayer Times Page Styles */
.prayer-times-page {
    padding: 50px 0;
    min-height: 80vh;
    background-color: var(--fn-bg-secondary);
}

.prayer-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--fn-border-light);
    padding-bottom: 25px;
}

.prayer-header-wrap .page-header {
    margin: 0;
}

.prayer-header-wrap .page-title {
    font-size: 32px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.city-selector-section {
    margin-bottom: 40px;
}

.city-selector-card {
    background: var(--fn-bg-primary);
    border-radius: var(--fn-radius-lg);
    padding: 30px;
    box-shadow: var(--fn-shadow-md);
    border: 1px solid var(--fn-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.selector-info i {
    font-size: 24px;
    color: var(--fn-primary);
}

.selector-info h2 {
    font-size: 18px;
    margin: 0;
}

.fn-select-wrap {
    position: relative;
    width: 250px;
}

.fn-select {
    width: 100%;
    height: 50px;
    border: 2px solid var(--fn-border-light);
    border-radius: var(--fn-radius-md);
    padding: 0 15px;
    font-size: 16px;
    font-weight: 600;
    background-color: var(--fn-bg-secondary);
    color: var(--fn-text-primary);
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.fn-select:focus {
    border-color: var(--fn-primary);
    outline: none;
}

.fn-select-wrap::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--fn-text-muted);
}

.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.prayer-card {
    background: var(--fn-bg-primary);
    border-radius: var(--fn-radius-lg);
    padding: 25px 20px;
    text-align: center;
    border: 1px solid var(--fn-border-light);
    box-shadow: var(--fn-shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--fn-border-light);
    transition: background 0.3s;
}

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

.prayer-card.active {
    border-color: var(--fn-primary);
    box-shadow: 0 10px 25px rgba(0, 47, 167, 0.15);
}

.prayer-card.active::before {
    background: var(--fn-primary);
}

.prayer-icon {
    font-size: 28px;
    color: var(--fn-text-muted);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.prayer-card.active .prayer-icon {
    color: var(--fn-primary);
}

.prayer-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--fn-text-secondary);
    margin-bottom: 8px;
}

.prayer-time {
    font-size: 24px;
    font-weight: 800;
    color: var(--fn-text-primary);
    font-family: var(--fn-font-heading);
}

.dates-info {
    background: var(--fn-bg-primary);
    border-radius: var(--fn-radius-md);
    padding: 20px;
    border: 1px solid var(--fn-border-light);
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-item i {
    color: var(--fn-primary);
}

.date-item span {
    font-weight: 600;
    color: var(--fn-text-secondary);
}

.prayer-notice {
    background: rgba(0, 47, 167, 0.05);
    border-right: 4px solid var(--fn-primary);
    padding: 20px;
    border-radius: var(--fn-radius-md);
    display: flex;
    align-items: center;
    gap: 15px;
}

.prayer-notice i {
    font-size: 24px;
    color: var(--fn-primary);
}

.prayer-notice p {
    margin: 0;
    font-size: 14px;
    color: var(--fn-text-secondary);
    line-height: 1.6;
}

/* Skeleton Loading Animation */
.prayer-card.loading .prayer-time,
.prayer-card.loading .prayer-name {
    background: var(--fn-bg-secondary);
    color: transparent;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.prayer-card.loading .prayer-time::after,
.prayer-card.loading .prayer-name::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .city-selector-card {
        flex-direction: column;
        align-items: stretch;
    }

    .fn-select-wrap {
        width: 100%;
    }

    .dates-info {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .prayer-times-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}