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

.fas.fa-exchange-alt {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.swap-arrow {
    transition: transform 0.3s ease;
}
.swap-arrow:hover {
  transform: rotate(270deg);
}

.toast-message {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) translateX(-50%); }
    to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

.swap-arrow:hover .fas.fa-exchange-alt {
  transform: rotate(-90deg);
}
.swap-arrow .fas.fa-exchange-alt {
  transition: inherit;
}


body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 100%;
    position: relative;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.creator-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.creator-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-details h1 {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.creator-details h1 i {
    color: #667eea;
    margin-right: 15px;
    transform: none !important;
    transition: none !important;
}

.creator-tagline {
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
}

.creator-tagline a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.creator-tagline a:hover {
    color: #764ba2;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-content p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    flex: 1;
    text-align: center;
}



/* Rate Mode Toggle */
.rate-mode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    line-height: 1;
    margin: 0;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.toggle-label {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
}

/* Smaller toggle for rate display card */
.rate-display-card .toggle-container {
    gap: 6px;
    margin: 0;
    padding: 0;
    min-width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.rate-display-card .toggle-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #718096;
}

.rate-display-card .toggle-switch {
    height: 20px;
}

.rate-display-card .toggle-label-switch {
    width: 40px;
    height: 20px;
    border-radius: 10px;
    padding: 2px;
}

.rate-display-card .toggle-label-switch::before {
    width: 16px;
    height: 16px;
    top: 2px;
    left: 2px;
    transform: translateX(20px);
}

.rate-display-card .toggle-input:not(:checked) + .toggle-label-switch::before {
    transform: translateX(0);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    height: 30px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    position: absolute;
}

.toggle-label-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 30px;
    background: #667eea;
    border-radius: 15px;
    padding: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}

.toggle-label-switch::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateX(30px);
}

.toggle-input:checked + .toggle-label-switch {
    background: #667eea;
}

.toggle-input:not(:checked) + .toggle-label-switch {
    background: #e2e8f0;
}

.toggle-input:not(:checked) + .toggle-label-switch::before {
    transform: translateX(0);
}

/* Comparison Container */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.conversion-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.conversion-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rate-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    opacity: 0.8;
}

.card-controls {
    margin-top: 0;
    padding-top: 10px;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.refresh-btn {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    box-shadow: none;
}

.refresh-btn:hover {
    background: #cbd5e0;
    color: #475569;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.refresh-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

.refresh-btn:disabled {
    background: #f1f5f9;
    color: #cbd5e0;
    border-color: #e2e8f0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Icon-only refresh button without border */
.refresh-btn-icon {
    background: transparent;
    color: #64748b;
    border: none;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    width: 24px;
    height: 24px;
    box-shadow: none;
    flex-shrink: 0;
}

.refresh-btn-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

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

.refresh-btn-icon i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.refresh-btn-icon:hover i {
    transform: rotate(180deg);
}

.refresh-btn-icon:disabled {
    background: transparent;
    color: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.card-header h3 {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
}

.rate-display-card {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.rate-label {
    color: #718096;
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.rate-info {
    display: flex;
    align-items: center;
    min-width: 170px;
    flex-shrink: 0;
    gap: 8px;
    overflow: hidden;
}

.rate-value {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 120px;
    text-align: left;
    flex-shrink: 0;
    margin-left: 4px;
}

.currency-inputs {
    display: flex;
    flex-direction: column;
    gap: 0px;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.input-group:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.input-group:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.15);
}

.input-group label {
    color: #718096;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 1px;
}

.input-group select {
    background: transparent;
    border: none;
    padding: 6px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    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 0 center;
    background-size: 18px;
    padding-right: 28px;
    width: 100%;
    pointer-events: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    word-wrap: break-word;
    word-break: break-all;
}

/* Flag styling for circular appearance */
.flag-circle {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    font-size: 16px;
}

.input-group select:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

.input-group input {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    transition: all 0.3s ease;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0;
}

.label-select-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #a0aec0;
}

.input-group input[readonly] {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #667eea;
    font-weight: 600;
    cursor: default;
    opacity: 0.9;
}

.input-group input[readonly]:focus {
    border-color: #e2e8f0;
    box-shadow: none;
    outline: none;
}

.swap-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin: -15px auto -15px;
    background: white;
    border: 2px solid #e2e8f0;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}



.swap-arrow:hover {
    background: #667eea;
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.swap-arrow i {
    color: #718096;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    transform: rotate(90deg);
}

.swap-arrow:hover i {
    color: white !important;
    transform: rotate(270deg);
}

.swap-arrow:active i {
    transform: rotate(180deg);
}

/* Currency Symbol Input */
.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 8px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.top-input {
    margin-bottom: 15px;
}

.bottom-input {
    margin-top: 15px;
}

.currency-symbol {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Result group styling */
.result-group {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

/* Rate display styling */
.rate-display {
    margin: 0;
    text-align: left;
    width: 100%;
}

.rate-text {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

.bottom-input {
    position: relative;
}

.bottom-input .currency-name {
    display: none; /* Hide the separate currency name since it's now part of the input value */
}

.input-with-symbol input {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    outline: none;
    box-shadow: none !important;
}

.input-with-symbol input:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.input-with-symbol input:active {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.input-with-symbol input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.input-with-symbol input::placeholder {
    color: #a0aec0;
    font-weight: 600;
}

.input-with-symbol input:focus::placeholder {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Special styling for result fields (readonly) */
.bottom-input {
    width: 100%;
    margin-top: 0;
}

.bottom-input input {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a202c;
    box-shadow: none;
    cursor: default;
    text-align: left;
    padding: 4px 0 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.bottom-input input:focus {
    border: none;
    box-shadow: none;
    transform: none;
    outline: none;
}

/* New result display styling */
.result-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.result-display .currency-name {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.result-display .result-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    text-align: left;
    flex: 1;
}

/* Mobile responsive for result display */
@media (max-width: 768px) {
    .result-display .result-value {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #667eea !important;
    }
    
    .input-with-symbol input {
        box-shadow: none !important;
    }
    
    .input-with-symbol input:focus {
        box-shadow: none !important;
        outline: none !important;
        border: none !important;
    }
    
    .input-with-symbol input:active {
        box-shadow: none !important;
        outline: none !important;
        border: none !important;
    }
@media (max-width: 480px) {
    .result-display .result-value {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #667eea !important;
    }
    
    .input-with-symbol input {
        box-shadow: none !important;
    }
    
    .input-with-symbol input:focus {
        box-shadow: none !important;
        outline: none !important;
        border: none !important;
    }
    
    .input-with-symbol input:active {
        box-shadow: none !important;
        outline: none !important;
        border: none !important;
    }
}

.swap-arrow:hover i {
    color: #667eea;
    transform: rotate(180deg);
}

/* Manual Rate Field */
.manual-rate-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f4f8;
    border-radius: 8px;
}

.manual-rate-field label {
    color: #2d3748;
    font-weight: 500;
    font-size: 0.9rem;
}

.manual-rate-field input {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #2d3748;
    transition: all 0.3s ease;
}

.manual-rate-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Comparison Result */
.comparison-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    min-height: 0;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.comparison-result.hidden {
    opacity: 0;
    transform: scale(0.95);
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.comparison-result h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.result-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.result-value {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.result-difference {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    grid-column: 1 / -1;
}

.difference-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.difference-value {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Exchange Rate Info */
.exchange-rate-info {
    text-align: center;
    margin-top: 20px;
    padding: 10px 10px 2px 10px;
    color: #718096;
    font-size: 0.9rem;
}

#rateText {
    color: #2d3748;
    font-weight: 500;
    margin-right: 10px;
}

.last-updated {
    color: #718096;
    font-size: 0.85rem;
}

/* Rate Accuracy Note */
.rate-accuracy-note {
    text-align: center;
    margin-top: 2px;
    padding: 0;
}

.rate-accuracy-note p {
    color: #718096;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}



/* Conversion Difference */
.conversion-difference {
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.difference-info {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
}

.difference-label {
    color: #718096;
    font-weight: 500;
    font-size: 0.9rem;
}

.difference-value {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

.difference-description {
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

/* Quick Conversions */
.quick-conversions {
    padding: 25px;
}

.quick-conversions h3 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.quick-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.quick-amount {
    display: block;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.quick-result {
    display: block;
    color: #667eea;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    /* Fix modal positioning for mobile */
    body .modal[style*="display: block"] {
        align-items: flex-start !important;
        padding: 10px !important;
        padding-top: 5vh !important;
    }
    
    body .modal[style*="display: block"] .modal-content {
        height: auto !important;
        max-height: 80vh !important;
        margin-top: 0 !important;
    }
    
    body .modal[style*="display: block"] .modal-body {
        height: auto !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        padding: 15px 20px !important;
    }
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-icon {
    font-size: 16px;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
}

/* Prevent scrolling when loading is active */
body.loading-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Prevent double-tap zoom on mobile */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection in input fields and textareas */
input, textarea, select {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent zoom on input focus (iOS) */
input[type="text"], input[type="number"], textarea {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading p {
    color: #718096;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .loading {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }
    
    .container {
        padding: 15px;
        margin: 0;
        border-radius: 12px;
    }
}

@media (max-width: 400px) {
    .refresh-btn-icon {
        display: inline-flex !important;
    }
}

    .creator-info {
        flex-direction: column;
        gap: 10px;
    }

    .creator-details h1 {
        font-size: 1.8rem;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header-content p {
        text-align: center;
        font-size: 0.9rem;
    }

    .comparison-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .conversion-difference {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .difference-info {
        flex-direction: column;
        gap: 4px;
        padding: 6px 12px;
    }

    .conversion-card {
        padding: 20px;
        background: white;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    /* Compact card elements for mobile */
    .card-header {
        margin-bottom: 12px;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .input-group {
        margin-bottom: 12px;
    }
    
    .input-group label {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .input-group select {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    
    .input-group .input-with-symbol {
        width: 100%;
    }
    
    .input-group .input-with-symbol input {
        padding: 8px 12px;
        font-size: 0.95rem;
        width: 100%;
    }
    
    /* Maintain card-style layout in mobile */
    .conversion-card .currency-inputs .input-group {
        padding: 12px;
        margin-bottom: 8px;
        display: flex;
        flex-direction: column;
    }
    
    .conversion-card .currency-inputs .input-group label {
        margin-bottom: 1px;
        font-size: 0.8rem;
    }
    
    .conversion-card .currency-inputs .input-group select {
        padding: 6px 0;
        font-size: 0.95rem;
        padding-right: 28px !important;
        background-position: right 0 center !important;
        background-size: 18px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        min-width: 0;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol {
        margin-top: 8px;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol input {
        padding: 10px 12px;
        font-size: 1rem;
    }
    
    /* Ensure toAmount fields remain as plain text in mobile */
    .conversion-card .result-group .bottom-input input {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #1a202c !important;
        cursor: default !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
        outline: none !important;
    }
    
    .conversion-card .result-group .bottom-input input:focus {
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
        outline: none !important;
    }
    
    .swap-arrow {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        margin: -15px auto -15px;
        background: white;
        border: 2px solid #e2e8f0;
        position: relative;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .swap-arrow:hover {
        background: #667eea;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .swap-arrow:active {
        transform: scale(0.95);
    }
    
    .swap-arrow i {
        color: #718096;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }
    
    .swap-arrow:hover i {
        color: white !important;
    }
    
    .swap-arrow:active i {
        transform: rotate(180deg);
    }
    
    .rate-display-card {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .rate-label {
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .rate-value {
        font-size: 0.9rem;
        flex-shrink: 1;
    }
    
    .rate-info {
        min-width: 120px;
        flex-shrink: 1;
        margin-right: 8px;
    }
    
    .manual-rate-field {
        margin-top: 8px;
    }
    
    .manual-rate-field label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .manual-rate-field input {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .footer-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .footer-action-buttons {
        justify-content: center;
        gap: 10px;
    }

    .footer-external-links {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-btn {
        font-size: 0.85rem;
        padding: 5px 10px;
    }

    .footer-text {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .footer-text-left, .footer-text-right {
        font-size: 0.75rem;
    }

    .rate-accuracy-note {
        margin-top: 1px;
        padding: 0;
    }

    .rate-accuracy-note p {
        font-size: 0.7rem;
    }

    /* Mobile Modal - Centered */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .modal-content {
        width: 100%;
        max-width: 500px;
        max-height: 85vh;
        height: auto;
        border-radius: 12px;
        animation: modalSlideIn 0.3s ease;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .modal-header {
        padding: 15px 20px;
        position: relative;
        flex-shrink: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .modal-header::before {
        display: none;
    }

    .modal-body {
        flex: 1;
        padding: 20px 25px;
        overflow-y: auto;
        min-height: 0;
        max-height: 60vh;
    }

    .modal-body textarea {
        min-height: 120px;
        resize: none;
    }

    .modal-footer {
        padding: 20px 25px;
        background: white;
        flex-shrink: 0;
        border-top: 1px solid #f0f0f0;
    }
    
    /* Mobile Modal Override for 768px and below */
    /* Ensure modals are hidden by default on mobile */
    body .modal:not([style*="display: block"]) {
        display: none !important;
    }
    
    /* Force modal to show when display is set to block or flex */
    body .modal[style*="display: block"],
    body .modal[style*="display: flex"] {
        display: flex !important;
    }
    
    /* Mobile Modal Override - Force centering and prevent scrolling */
    body .modal[style*="display: block"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: 2000 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 10px !important;
        padding-top: 5vh !important;
        box-sizing: border-box !important;
        background-color: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(3px) !important;
        overflow: hidden !important;
        /* Prevent mobile browser address bar from showing/hiding */
        position: fixed !important;
        /* Force viewport to stay fixed */
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    /* Mobile-specific modal content adjustments */
    body .modal[style*="display: block"] .modal-content {
        width: 100% !important;
        max-width: 500px !important;
        max-height: 45vh !important;
        height: auto !important;
        border-radius: 12px !important;
        animation: modalSlideIn 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
        /* Ensure content stays above keyboard */
        background: white !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Mobile modal body adjustments */
    body .modal[style*="display: block"] .modal-body {
        flex: 1 !important;
        padding: 12px 20px !important;
        overflow-y: hidden !important;
        min-height: 0 !important;
        max-height: 35vh !important;
        /* Ensure textarea is properly sized */
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Mobile textarea adjustments */
    body .modal[style*="display: block"] textarea {
        flex: 1 !important;
        min-height: 80px !important;
        max-height: 80px !important;
        resize: none !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100% !important;
    }
    
    /* Mobile footer adjustments */
    body .modal[style*="display: block"] .modal-footer {
        padding: 12px 20px !important;
        background: white !important;
        border-top: 1px solid #f0f0f0 !important;
        flex-shrink: 0 !important;
        /* Ensure buttons are properly sized for touch */
        display: flex !important;
        gap: 10px !important;
        justify-content: flex-end !important;
    }
    
    /* Mobile button adjustments */
    body .modal[style*="display: block"] .modal-footer button {
        min-height: 40px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        border: none !important;
        cursor: pointer !important;
        /* Prevent text selection */
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* Mobile modal header adjustments */
    body .modal[style*="display: block"] .modal-header {
        padding: 10px 15px !important;
    }
    
    body .modal[style*="display: block"] .modal-header h3 {
        font-size: 1rem !important;
    }
    
    /* Enhanced mobile modal for dynamic sizing */
    body .modal[style*="display: block"] {
        align-items: center !important;
        padding: 15px !important;
    }
    
    body .modal[style*="display: block"] .modal-content {
        height: calc(100vh - 30px) !important;
        max-height: calc(100vh - 30px) !important;
    }
    
    body .modal[style*="display: block"] .modal-body {
        height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
        padding: 15px 20px !important;
    }
    
    body .modal[style*="display: block"] textarea {
        min-height: 60px !important;
        padding: 10px 12px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .loading {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }
    
    /* Mobile Modal Override - Force centering and prevent scrolling */
    /* Ensure modals are hidden by default on mobile */
    body .modal:not([style*="display: block"]) {
        display: none !important;
    }
    
    /* Force modal to show when display is set to block or flex */
    body .modal[style*="display: block"],
    body .modal[style*="display: flex"] {
        display: flex !important;
    }
    
    /* Mobile Modal Override - Force centering and prevent scrolling */
    body .modal[style*="display: block"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: 2000 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 10px !important;
        padding-top: 5vh !important;
        box-sizing: border-box !important;
        background-color: rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(3px) !important;
        overflow: hidden !important;
        /* Prevent mobile browser address bar from showing/hiding */
        position: fixed !important;
        /* Force viewport to stay fixed */
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    /* Mobile-specific modal content adjustments */
    body .modal[style*="display: block"] .modal-content {
        width: 100% !important;
        max-width: 500px !important;
        max-height: 45vh !important;
        height: auto !important;
        border-radius: 12px !important;
        animation: modalSlideIn 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
        /* Ensure content stays above keyboard */
        background: white !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Mobile modal body adjustments */
    body .modal[style*="display: block"] .modal-body {
        flex: 1 !important;
        padding: 12px 20px !important;
        overflow-y: hidden !important;
        min-height: 0 !important;
        max-height: 35vh !important;
        /* Ensure textarea is properly sized */
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Mobile textarea adjustments */
    body .modal[style*="display: block"] textarea {
        flex: 1 !important;
        min-height: 80px !important;
        max-height: 80px !important;
        resize: none !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100% !important;
    }
    
    /* Mobile footer adjustments */
    body .modal[style*="display: block"] .modal-footer {
        padding: 12px 20px !important;
        background: white !important;
        border-top: 1px solid #f0f0f0 !important;
        flex-shrink: 0 !important;
        /* Ensure buttons are properly sized for touch */
        display: flex !important;
        gap: 10px !important;
        justify-content: flex-end !important;
    }
    
    /* Mobile button adjustments */
    body .modal[style*="display: block"] .modal-footer button {
        min-height: 40px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        border: none !important;
        cursor: pointer !important;
        /* Prevent text selection */
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* Mobile modal header adjustments */
    body .modal[style*="display: block"] .modal-header {
        padding: 10px 15px !important;
    }
    
    body .modal[style*="display: block"] .modal-header h3 {
        font-size: 1rem !important;
    }
    
    /* Enhanced mobile modal for dynamic sizing */
    body .modal[style*="display: block"] {
        align-items: center !important;
        padding: 15px !important;
    }
    
    body .modal[style*="display: block"] .modal-content {
        height: calc(100vh - 30px) !important;
        max-height: calc(100vh - 30px) !important;
    }
    
    body .modal[style*="display: block"] .modal-body {
        height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
        padding: 15px 20px !important;
    }
    
    body .modal[style*="display: block"] textarea {
        min-height: 60px !important;
        padding: 10px 12px !important;
    }
    
    body .modal-content {
        width: 100% !important;
        max-width: 500px !important;
        max-height: 80vh !important;
        height: auto !important;
        border-radius: 12px !important;
        animation: modalSlideIn 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
        background-color: white !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    }
    
    .modal-body {
        flex: 1;
        padding: 20px 25px;
        overflow-y: auto;
        min-height: 0;
        max-height: 50vh;
    }
    
    .modal-footer {
        padding: 20px 25px;
        background: white;
        border-top: 1px solid #f0f0f0;
        flex-shrink: 0;
    }
    
    .container {
        padding: 10px;
        border-radius: 8px;
    }
    
    .creator-details h1 {
        font-size: 1.6rem;
    }
    
    .header-content p {
        font-size: 0.8rem;
    }
    
    .comparison-container {
        gap: 10px;
    }
    
        .conversion-card {
        padding: 20px;
        background: white;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 8px;
    }
    
    .card-header h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .rate-controls {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .card-controls {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    .input-group {
        margin-bottom: 8px;
    }
    
    .input-group label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .input-group select {
        font-size: 0.85rem;
        padding: 6px 8px;
    }
    
    .input-group .input-with-symbol {
        width: 100%;
    }
    
    .input-group .input-with-symbol input {
        font-size: 0.85rem;
        padding: 6px 8px;
        width: 100%;
    }
    
    /* Maintain card-style layout in mobile */
    .conversion-card .currency-inputs .input-group {
        padding: 10px;
        margin-bottom: 6px;
        display: flex;
        flex-direction: column;
    }
    
    .conversion-card .currency-inputs .input-group label {
        margin-bottom: 1px;
        font-size: 0.75rem;
    }
    
    .conversion-card .currency-inputs .input-group select {
        padding: 5px 0;
        font-size: 0.9rem;
        padding-right: 28px !important;
        background-position: right 0 center !important;
        background-size: 18px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        min-width: 0;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol {
        margin-top: 6px;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol input {
        padding: 8px 10px;
        font-size: 0.95rem;
    }
    
    /* Ensure toAmount fields remain as plain text in mobile */
    .conversion-card .result-group .bottom-input input {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #1a202c !important;
        cursor: default !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
        outline: none !important;
    }
    
    .conversion-card .result-group .bottom-input input:focus {
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
        outline: none !important;
    }
    
    .swap-arrow {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        margin: -15px auto -15px;
        background: white;
        border: 2px solid #e2e8f0;
        position: relative;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .swap-arrow:hover {
        background: #667eea;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .swap-arrow:active {
        transform: scale(0.95);
    }
    
    .swap-arrow i {
        color: #718096;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }
    
    .swap-arrow:hover i {
        color: white !important;
    }
    
    .swap-arrow:active i {
        transform: rotate(180deg);
    }
    
    .refresh-btn {
        min-width: 24px;
        height: 24px;
        padding: 3px 5px;
        font-size: 0.75rem;
    }
    
    .rate-display-card {
        width: 100%;
        justify-content: space-between;
        gap: 4px;
        padding: 6px 8px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .rate-label {
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .rate-value {
        font-size: 0.85rem;
        flex-shrink: 1;
    }
    
    /* Ensure rate-value shows only 2 decimal places on mobile */
    .rate-value {
        font-size: 0.85rem;
        flex-shrink: 1;
    }
    
    .rate-info {
        min-width: 100px;
        flex-shrink: 1;
        margin-right: 4px;
    }
    
    .manual-rate-field {
        margin-top: 6px;
    }
    
    .manual-rate-field label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .manual-rate-field input {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
    
    .footer-buttons {
        gap: 8px;
    }
    
    .footer-btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .footer-text-left, .footer-text-right {
        font-size: 0.7rem;
    }
    
    .rate-accuracy-note p {
        font-size: 0.65rem;
    }
}

/* App Footer */
.app-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Row: Action Buttons */
.footer-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-action-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Middle Row: External Links */
.footer-external-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.external-link {
    position: relative;
}

.external-link .fa-external-link-alt {
    font-size: 0.7rem;
    margin-left: 4px;
    opacity: 0.7;
}

/* Footer Button Styling */
.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.footer-btn:hover {
    background: #f0f4f8;
    color: #764ba2;
    transform: translateY(-1px);
}

.footer-btn i {
    font-size: 0.9rem;
}

/* Bottom Row: Text */
.footer-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-text-left, .footer-text-right {
    color: #888;
    font-size: 0.85rem;
    font-weight: 400;
}

.footer-text-left a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-text-left a:hover {
    color: #764ba2;
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

/* Hide drag handle on desktop */
.modal-header::before {
    display: none;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close {
    color: #999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-field {
    margin-bottom: 20px;
}

.modal-body .form-field:last-child {
    margin-bottom: 0;
}

.modal-body .form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.modal-body input[type="text"],
.modal-body input[type="email"] {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s ease;
    box-sizing: border-box !important;
    background: white;
    min-width: 0;
}

.modal-body input[type="text"]:focus,
.modal-body input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-body input[type="text"]::placeholder,
.modal-body input[type="email"]::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.modal-body textarea {
    width: 100% !important;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box !important;
    min-height: 120px;
    margin-bottom: 0;
    background: white;
    min-width: 0;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-body textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e8e8e8;
}

.send-btn {
    background: #667eea;
    color: white;
}

.send-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Force horizontal layout for mobile input groups - highest priority */
@media (max-width: 768px) {
    /* Override main dropdown styles for mobile */
    .conversion-card .currency-inputs .input-group select {
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: content-box !important;
        width: auto !important;
        background-position: right 0 center !important;
        padding-right: 28px !important;
    }
    .conversion-card .currency-inputs .input-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .conversion-card .currency-inputs .input-group label {
        margin-bottom: 0 !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }
    
    .conversion-card .currency-inputs .input-group select {
        width: auto !important;
        flex-shrink: 0 !important;
        background-position: right 0 center !important;
        background-size: 18px !important;
        padding-right: 28px !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-align: left !important;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Override main dropdown styles for mobile */
    .conversion-card .currency-inputs .input-group select {
        max-width: none !important;
        min-width: 0 !important;
        box-sizing: content-box !important;
        width: auto !important;
        background-position: right 0 center !important;
        padding-right: 28px !important;
    }
    
    .conversion-card .currency-inputs .input-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
    }
    
    .conversion-card .currency-inputs .input-group label {
        margin-bottom: 0 !important;
        min-width: 35px !important;
        flex-shrink: 0 !important;
    }
    
    .conversion-card .currency-inputs .input-group select {
        width: auto !important;
        flex-shrink: 0 !important;
        background-position: right 0 center !important;
        background-size: 18px !important;
        padding-right: 28px !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-align: left !important;
    }
    
    .conversion-card .currency-inputs .input-group .input-with-symbol {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

    /* ULTIMATE MOBILE DROPDOWN ARROW FIX - HIGHEST PRIORITY */
    @media (max-width: 768px) {
        .conversion-card .currency-inputs .input-group {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            flex-shrink: 0 !important;
        }
    
    .conversion-card .currency-inputs .input-group select,
    .conversion-card .currency-inputs .input-group select:focus,
    .conversion-card .currency-inputs .input-group select:hover {
        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") !important;
        background-repeat: no-repeat !important;
        background-position: right 8px center !important;
        background-size: 18px !important;
        padding: 6px 8px 6px 8px !important;
        padding-right: 32px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        text-align: left !important;
        margin-right: 0 !important;
        flex: 1 !important;
        display: block !important;
    }
}

    @media (max-width: 480px) {
        .conversion-card .currency-inputs .input-group {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            flex-shrink: 0 !important;
        }
    
    .conversion-card .currency-inputs .input-group select,
    .conversion-card .currency-inputs .input-group select:focus,
    .conversion-card .currency-inputs .input-group select:hover {
        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") !important;
        background-repeat: no-repeat !important;
        background-position: right 8px center !important;
        background-size: 18px !important;
        padding: 6px 8px 6px 8px !important;
        padding-right: 32px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        text-align: left !important;
        margin-right: 0 !important;
        flex: 1 !important;
        display: block !important;
    }
}

/* FINAL OVERRIDE - FORCE FULL WIDTH AND ARROW POSITIONING */

.fas.fa-exchange-alt {
    transition: transform 0.3s ease;
}

.fas.fa-exchange-alt:hover {
    transform: rotate(180deg);
}
@media (max-width: 768px) {
    .conversion-card .currency-inputs .input-group select {
        width: 100% !important;
        max-width: 100% !important;
        background-position: right 8px center !important;
        padding-right: 32px !important;
        flex: 1 !important;
        display: block !important;
    }
    
    .conversion-card .currency-inputs .input-group .label-select-group {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
    }
    
    .conversion-card .currency-inputs .input-group .label-select-group select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .conversion-card .currency-inputs .input-group select {
        width: 100% !important;
        max-width: 100% !important;
        background-position: right 8px center !important;
        padding-right: 32px !important;
        flex: 1 !important;
        display: block !important;
    }
    
    .conversion-card .currency-inputs .input-group .label-select-group {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
    }
    
    .conversion-card .currency-inputs .input-group .label-select-group select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}
