:root {
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #555555;
    --gold-accent: #D4AF37;
    --gold-light: #fff9e6;
    --border-radius: 20px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.10);
    --font-family: 'Instrument Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-color);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Header */
.app-header {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    /* Brand Left, Button Right */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.refresh-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.1s;
}

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

.refresh-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

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

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

/* Banner */
.banner-container {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: center;
    padding: 20px;
}

.banner-text h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.banner-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Main Content */
main {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rate-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

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

.metal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.purity-tag {
    background: var(--gold-light);
    color: #997b00;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.price-display {
    margin-bottom: 5px;
}

.main-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #000;
    line-height: 1.1;
    letter-spacing: -1px;
}

.unit-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 5px;
}

/* Indicators */
.label-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: -10px;
    margin-top: 10px;
    padding-left: 5px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.indicator-card {
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

.link-card {
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.link-card:active {
    background: #f9f9f9;
}

.ind-label {
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.ind-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}