/* Currency Converter Styles */

.currency-converter-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.currency-converter-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
    margin-top: 0;
}

.currency-converter-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.currency-converter-form {
    display: grid;
    gap: 20px;
}

.currency-form-group {
    display: flex;
    flex-direction: column;
}

.currency-form-group label {
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.currency-form-group input,
.currency-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
    box-sizing: border-box;
    background: white;
}

.currency-form-group input:focus,
.currency-form-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.currency-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.currency-swap-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -10px 0;
}

.currency-swap-btn {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency-swap-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    transform: rotate(180deg);
}

.currency-swap-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.currency-convert-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.currency-convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

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

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

.btn-loader {
    display: inline-block;
}

/* Results Section */
.currency-results {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    text-align: center;
    color: white;
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.result-amount {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.result-currency {
    font-size: 24px;
    font-weight: 600;
    opacity: 0.9;
}

.result-rate {
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.95;
}

.result-timestamp {
    font-size: 12px;
    opacity: 0.8;
}

/* Error Message */
.currency-error {
    margin-top: 20px;
    padding: 16px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 12px;
    color: #c33;
    text-align: center;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .currency-converter-container {
        padding: 25px;
        margin: 20px auto;
    }

    .currency-converter-title {
        font-size: 24px;
    }

    .result-amount {
        font-size: 36px;
    }

    .result-currency {
        font-size: 20px;
    }
}

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

.btn-loader::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
