* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.converter-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.input-group input, 
.input-group select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-group input {
    font-size: 18px;
    font-weight: bold;
}

.currency-select {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.swap-btn {
    background: #3498db;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.swap-btn:hover {
    background: #2980b9;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.convert-btn, .reverse-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.convert-btn {
    background: #27ae60;
    color: white;
}

.convert-btn:hover {
    background: #219653;
}

.reverse-btn {
    background: #f39c12;
    color: white;
}

.reverse-btn:hover {
    background: #e67e22;
}

.result-section {
    margin-bottom: 30px;
}

.conversion-result {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.exchange-rate, .last-updated {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.quick-currencies {
    margin-top: 30px;
}

.quick-currencies h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.quick-buttons button {
    padding: 8px 15px;
    background: #ecf0f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.quick-buttons button:hover {
    background: #bdc3c7;
}

.history-section {
    margin-top: 40px;
}

.history-section h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    color: #2c3e50;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.clear-btn:hover {
    background: #c0392b;
}

#history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#history-table th, #history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#history-table th {
    background: #f8f9fa;
    font-weight: 500;
}

#history-table tr:hover {
    background: #f8f9fa;
}

.disclaimer {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #7f8c8d;
}

.footer-container {
    width: 100%;
    margin-top: auto;
}

.footer-container object {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    border: none;
    overflow: hidden;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .converter-panel {
        padding: 15px;
    }
    
    .currency-select {
        flex-direction: column;
        align-items: stretch;
    }
    
    .swap-btn {
        align-self: center;
        transform: rotate(90deg);
    }
    
    #history-table {
        display: block;
        overflow-x: auto;
    }
}