/* // Custom animations 
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#resultCard:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

// Custom hover effects 
#generateBtn:hover, #randomCityBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#copyBtn:hover {
    transform: scale(1.05);
}

// City selector styles 
#selectedCity {
    background-color: white;
    transition: all 0.2s ease;
}

#selectedCity:hover {
    border-color: #6366f1;
}

#selectedCity:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

#randomCityBtn {
    transition: all 0.2s ease;
}

#randomCityBtn:active {
    transform: scale(0.95);
}

// Responsive adjustments 
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
}

// Custom styling for data display 
#resultCard .font-medium {
    color: #4F46E5;
    letter-spacing: 0.5px;
}

// Emoji animations 
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#generateBtn:active .emoji {
    animation: spin 0.5s ease-out;
}

// Custom scrollbar 
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4F46E5;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4338CA;
}

// Refined History Section Styles 
#historySection {
    transition: all 0.2s ease-out;
}

#historySection .border {
    border-color: #e5e7eb;
}

#historyList {
    padding: 0.5rem;
}

#historyList .history-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1.25;
}

#historyList .history-item:hover {
    background: #f3f4f6;
    transform: translateX(2px);
    border-color: #d1d5db;
}

#historyList .history-item .data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

#historyList .history-item .data-label {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

#historyList .history-item .data-value {
    color: #374151;
    font-weight: 500;
}

#toggleHistoryBtn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

#toggleHistoryBtn:hover {
    background: #e5e7eb;
}

#historySection .action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

#historySection .action-buttons button {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

// Add these styles to the existing CSS 
.history-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.history-item:hover {
    border-color: #d1d5db;
}

.history-item-header {
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #f9fafb;
    transition: background-color 0.2s ease;
}

.history-item-header:hover {
    background: #f3f4f6;
}

.history-item .basic-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.history-item .name {
    font-weight: 500;
    color: #374151;
}

.history-item .dni {
    color: #6b7280;
    font-size: 0.875rem;
}

.history-item .expand-btn {
    color: #6b7280;
    transition: transform 0.2s ease;
}

.history-item-details {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.history-item-details.hidden {
    display: none;
}

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

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

// Animation for expand/collapse 
.history-item-details {
    transition: all 0.3s ease-in-out;
}

.history-item-details:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

// Add animation for the clear button 
#clearHistoryBtn {
    transition: all 0.2s ease-in-out;
}

#clearHistoryBtn:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}
    */



@media (prefers-color-scheme: dark) {
    .select2-search__field {
        background-color: rgb(55, 65, 81) !important;
        color: rgb(255, 255, 255) !important;
        border-color: rgb(75, 85, 99) !important;
    }

    .select2-search__field::placeholder {
        color: rgb(156, 163, 175) !important;
    }

    .select2-search__field:focus {
        border-color: rgb(96, 165, 250) !important;
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2) !important;
    }
}


.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}
    