:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    padding: 20px;
}

.converter-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.amount-section, .from-section, .to-section {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light-text);
}

input, select {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.currency-select {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-select span {
    position: absolute;
    left: 10px;
    z-index: 1;
    font-size: 1.2rem;
}

.currency-select select {
    width: 100%;
    padding-left: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1rem;
}

.swap-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

#swap-currencies {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

#swap-currencies:hover {
    background: var(--secondary-color);
    transform: rotate(180deg);
}

#swap-currencies svg {
    width: 20px;
    height: 20px;
}

.result-section {
    text-align: center;
    margin: 20px 0;
}

#result {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

#last-updated {
    color: var(--light-text);
    font-size: 0.9rem;
}

.convert-btn {
    text-align: center;
}

#convert {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

#convert:hover {
    background: var(--secondary-color);
}

.info-section {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(66, 133, 244, 0.05);
    border-radius: 5px;
}

.info-section h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.language-selector {
    margin-top: 20px;
}

.language-selector select {
    width: 100%;
    margin-top: 5px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--light-text);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--light-text);
}

/* Responsive styles */
@media (min-width: 600px) {
    .converter-container {
        grid-template-columns: 2fr 3fr 1fr 3fr;
        align-items: end;
    }
    
    .swap-btn {
        align-self: center;
        margin-bottom: 20px;
    }
    
    .result-section {
        grid-column: 1 / -1;
    }
    
    .convert-btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 599px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    #result {
        font-size: 1.5rem;
    }
}