:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --hover-color: #f1f5f9;
    --input-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    overscroll-behavior: none; /* Prevents pull-to-refresh on mobile */
}.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
}

.last-updated {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    color: #64748b;
    font-size: 0.875rem;
}

.refresh-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.currency-calculator {
    position: relative;
}.currency-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}.currency-line {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 4px;
}

.currency-line:hover {
    border-color: var(--secondary-color);
    background-color: var(--hover-color);
}.currency-line.input-line {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
}

.currency-line.input-line .currency-input {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.currency-line.input-line .currency-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.currency-flag {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.currency-symbol {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 60px;
    color: var(--primary-color);
}

.currency-line.input-line .currency-symbol {
    color: white;
}

.currency-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 12px 16px;
    background: var(--hover-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: right;
}

.currency-input:focus {
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error {
    text-align: center;
    padding: 20px;
    color: #dc2626;
    background-color: #fef2f2;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

.hidden {
    display: none;
}@media (max-width: 768px) {
    .container {
        padding: 12px;
        margin: 0;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .last-updated {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 10px;
        font-size: 0.7rem;
    }
    
    .refresh-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
        width: 100%;
        max-width: 200px;
        border-radius: 6px;
    }
    
    .currency-line {
        padding: 8px 12px;
        gap: 8px;
        margin-bottom: 2px;
        border-radius: 6px;
    }
    
    .currency-input {
        font-size: 1rem;
        padding: 6px 8px;
        border-radius: 4px;
    }
    
    .currency-flag {
        width: 32px;
        height: 24px;
    }

    .currency-symbol {
        min-width: 36px;
        font-size: 0.85rem;
    }

    body {
        padding: 8px 4px;
    }

    .loading {
        padding: 15px;
    }

    .spinner {
        width: 25px;
        height: 25px;
    }
    
    .currency-lines {
        gap: 2px;
    }
}/* Extra small devices */
@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 10px 8px;
        margin: 0;
    }
    
    .currency-line {
        padding: 8px 10px;
        border-radius: 4px;
        margin-bottom: 1px;
    }
    
    .currency-flag {
        width: 28px;
        height: 21px;
    }
    
    .currency-symbol {
        min-width: 32px;
        font-size: 0.8rem;
    }
    
    .currency-input {
        font-size: 0.95rem;
        padding: 4px 6px;
    }
    
    .currency-lines {
        gap: 1px;
    }
    
    .last-updated {
        margin-bottom: 8px;
    }
    
    .refresh-btn {
        padding: 4px 10px;
        border-radius: 4px;
    }
}
