/* ===============================
   🌍 ROOT VARIABLES
================================ */
:root {
    --primary: #003366;
    --accent: #00b0f0;
    --bg: #f4f7f9;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border: #d1d9e0;
}

/* ===============================
   🌐 GLOBAL STYLES
================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===============================
   🔝 NAVBAR
================================ */
.navbar {
    height: 80px;
    width: 1100px;
    margin: 20px auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);

    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    height: 206px;
}

/* ===============================
   🔘 BUTTONS
================================ */
.convert-btn {
    margin-top: 1.5rem;
    padding: 12px;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.convert-btn:hover {
    background: #002244;
}

/* ===============================
   📑 TABS
================================ */
.tabs-wrapper {
    position: relative;
    min-height: 500px;
}

.tabs {
    background: white;
    border-radius: 8px 8px 0 0;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-light);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* ===============================
   🧾 INPUT SECTION
================================ */
.converter-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.converter-body {
    padding: 2rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto 1.5fr;
    gap: 1rem;
    align-items: end;
}

.input-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

/* 🔁 Swap Button */
.swap-icon {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    height: 45px;
    width: 45px;
    cursor: pointer;
}

/* ===============================
   📊 DISPLAY
================================ */
.display-row {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
}

.main-rate h1 {
    font-size: 3rem;
    color: var(--primary);
}

.badge {
    background: #e6f7ff;
    color: #0070e0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ===============================
   📈 GRID
================================ */
.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container,
.info-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
}

/* ===============================
   📊 CHART
================================ */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===============================
   🔄 TAB TRANSITION
================================ */
.tab-content {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.tab-content.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===============================
   📊 USD SECTION
================================ */
.usd-section {
    max-width: 1100px;
    margin: 2rem auto;
}

.full-width {
    width: 100%;
}

/* ===============================
   🌍 BACKGROUND
================================ */
#bg-carousel {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

#bg-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: blur(2px);
    transform: scale(1.05);
    transition: opacity 1s ease-in-out;
}

.bg-slide.active {
    opacity: 0.25;
}

/* ===============================
   🔄 LOADER
================================ */
#loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #003366, #0059b3, #00b0f0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loader.hide {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: white;
}

.symbols {
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 10px;
    animation: bounce 1s infinite alternate;
    text-shadow: 
        0 0 10px rgba(255,255,255,0.6),
        0 0 20px rgba(0,176,240,0.8);
}

.loader-content p {
    margin-top: 10px;
    font-size: 0.9rem;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}