:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {

    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Navigation Styles (Injected) - Removed to use public/style.css */
/* All .main-nav-*, .dropdown-* styles are now inherited from public/style.css */

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: block; /* Changed from flex to block to fix layout issue */
    min-height: 100vh;
    padding: 2rem;
    padding-top: 100px; /* Header is fixed (70px) + spacing */
}

/* Fixed Navigation Header Override */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto; /* Center the container */
}

.app-header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.logo-area i {
    font-size: 2rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.controls label {
    font-weight: 500;
    color: var(--text-main);
}

.controls input[type="date"] {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.controls input[type="date"]:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background: var(--primary-dark);
}

button:active {
    transform: translateY(1px);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fee2e2;
    text-align: center;
    font-weight: 500;
}

.converter-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1.5fr;
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-items: center;
}

.currency-list {
    max-height: 600px;
    overflow-y: auto;
}

.currency-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1.5fr;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: background-color 0.1s;
}

.currency-row:last-child {
    border-bottom: none;
}

.currency-row:hover,
.currency-row.active {
    background-color: #f0f9ff;
}

.col-flag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.col-name {
    display: flex;
    flex-direction: column;
}

.col-name .code {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.col-name .name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.col-buy,
.col-sell {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.col-input {
    display: flex;
    justify-content: flex-end;
}

.amount-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: all 0.2s;
}

.amount-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.loading-spinner {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .table-header {
        display: none;
        /* Hide header on mobile if too cramped */
    }

    .currency-row {
        grid-template-columns: 1fr auto;
        /* Name/Flag and Input */
        grid-template-rows: auto auto;
        /* Two rows */
        gap: 0.5rem;
        padding: 1rem;
    }

    .col-flag {
        grid-row: 1;
        grid-column: 1;
    }

    .col-name {
        display: none;
        /* Simplify for mobile, or better merge with flag */
    }

    /* Redefine for mobile better */
    .currency-row {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        position: relative;
    }

    .col-flag {
        width: 100%;
        justify-content: space-between;
    }

    .col-buy,
    .col-sell {
        font-size: 0.85rem;
        color: var(--text-muted);
        display: inline-block;
        margin-right: 1rem;
    }

    .col-buy::before {
        content: 'Alış: ';
        font-weight: 600;
    }

    .col-sell::before {
        content: 'Satış: ';
        font-weight: 600;
    }
}