:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --light-text: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body {
    background: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
}

h1 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 24px;
}

.converter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.currency-group {
    display: flex;
    flex: 1;
    height: 60px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.currency-select {
    display: flex;
    align-items: center;
    padding: 0 15px;
    cursor: pointer;
    position: relative;
    min-width: 120px;
    border-right: 1px solid #e0e0e0;
}

.currency-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.currency-info {
    display: flex;
    flex-direction: column;
}

.currency-code {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 16px;
}

.currency-name {
    font-size: 10px;
    color: var(--light-text);
}

.amount-input {
    flex: 1;
    height: 100%;
    background-color: var(--light-bg);
    padding: 0 15px;
    font-size: 18px;
    border: none;
    outline: none;
    font-weight: 500;
    color: var(--dark-text);
    text-align: right;
}

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

.swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4361ee;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
    position: relative;
    overflow: hidden;
}

.swap-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.swap-btn i {
    font-size: 14px;
    line-height: 1;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    will-change: transform;
    display: block;
}

.swap-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.swap-btn:hover .fa-long-arrow-up {
    transform: rotate(180deg) translateY(2px);
}

.swap-btn:hover .fa-long-arrow-down {
    transform: rotate(180deg) translateY(-2px);
}

.swap-btn:active {
    transform: scale(0.95);
}

.swap-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.swap-btn:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }

    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

.conversion-rate {
    font-size: 10px;
    color: var(--light-text);
    text-align: right;
    padding: 0 15px 5px 0;
    margin-top: 5px;
}

select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

@keyframes moneyCount {
    0% {
        transform: translateY(5px);
        opacity: 0;
    }

    50% {
        transform: translateY(-2px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.money-counting {
    animation: moneyCount 0.5s ease-out;
}

.loading {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Nuevas animaciones para el conteo de dinero */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counting-animation {
    animation: countUp 0.5s ease-out;
}

.result-counting {
    transition: all 0.3s ease-out;
    color: var(--primary-color);
    font-weight: bold;
}

@media (max-width: 767px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 0;
        border-radius: 0;
    }

    .converter-row {
        flex-direction: column;
        gap: 5px;
    }

    .currency-group {
        width: 100%;
        flex: 0 0 100%;
        height: auto;
        flex-wrap: wrap;
    }

    .currency-select {
        min-width: 30%;
        flex: 1;
        border-right: none;
        padding: 10px;
    }

    .amount-input {
        min-width: 60%;
        flex: 2;
        padding: 10px;
        font-size: 16px;
    }

    .swap-container {
        margin: 5px 0;
    }

    .conversion-rate {
        width: 100%;
        text-align: center;
        padding: 5px 0;
    }
}

@media (max-width: 480px) {
    .currency-select {
        min-width: 40%;
    }

    .amount-input {
        min-width: 50%;
    }
}

.currency-select .select2-container--default .select2-selection--single {
    background-color: #f8f9fa;
    border: 0px solid transparent !important;
    border-radius: 0px !important;
}

.select2-container--open .select2-dropdown--below {
    border: 1px solid var(--bs-muted-100) !important;
    border-radius: 10px !important;
    margin-top: 0px !important;
    box-shadow: 0px 14px 25px -5px rgba(63, 64, 91, 0.05);
}

.currency-select .select2-container {
    box-sizing: border-box;
    display: inline-block;
    margin: 0;
    position: relative;
    vertical-align: middle;
    width: 200px !important;
}

.select2-container .select2-selection--single {
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    background-color: var(--light-bg) !important;
    border: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 0px !important;
}

.select2-dropdown {
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
}

.select2-results__option {
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 10px !important;
}

.content-container {
    margin-top: 100px;
    margin-left: 10px;
    margin-right: 10px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-top: 20px;
}

@media (max-width: 767px) {
    .content-container {
        margin-top: 80px;
    }

    .container {
        margin-top: 10px;
    }
}

.disclaimer {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: var(--light-bg);
    color: var(--light-text);
    border-left: 4px solid var(--secondary-color);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.4;
}
.disclaimer strong {
    color: var(--dark-text);
}
