/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Country Selection Section */
.country-selection {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.country-selection h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

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

.group-btn {
    padding: 1rem 1.5rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.group-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* Multiple Buttons */
.multiple-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Results Section */
.results {
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.results-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: #666;
}

/* Selection Mode Controls */
.selection-mode-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #1565c0;
    transition: color 0.2s ease;
}

.mode-label:hover {
    color: #0d47a1;
}

.mode-label input[type="radio"] {
    accent-color: #1976d2;
    transform: scale(1.1);
}

/* Multiple Selection Controls */
.multiple-selection-controls {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff3e0;
    border-radius: 8px;
    border: 1px solid #ffcc02;
}

.selection-help {
    margin-bottom: 1rem;
    color: #f57c00;
    font-weight: 500;
    text-align: center;
}

.selected-groups {
    margin-bottom: 1rem;
    min-height: 2rem;
}

.selected-group-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.selected-group-tag:hover {
    background: #5a6fd8;
}

.selected-group-tag .remove {
    margin-left: 0.5rem;
    font-weight: bold;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: color 0.2s ease;
}

.filter-label:hover {
    color: #667eea;
}

.filter-label input[type="radio"] {
    accent-color: #667eea;
    transform: scale(1.1);
}

/* Destinations Grid */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.destination-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.destination-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.destination-country {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visa-type-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 0.25rem;
}

.visa-type-visa_free {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.visa-type-visa_on_arrival {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #faeeba;
}

.visa-type-online {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.destination-details {
    margin-top: 0.75rem;
}

.destination-details.hover-details {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.destination-card:hover .destination-details.hover-details {
    opacity: 1;
    max-height: 100px;
}

.destination-duration {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.destination-notes {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error Message */
.error-message {
    padding: 2rem;
    text-align: center;
}

.error-content {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 2rem;
    color: #721c24;
}

.error-content h3 {
    margin-bottom: 1rem;
}

.error-content p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

footer a {
    color: rgba(255,255,255,0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .country-selection,
    .results {
        padding: 1.5rem;
    }

    .group-buttons {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .destinations-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .selection-mode-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .multiple-selection-controls {
        padding: 0.75rem;
    }

    .selected-group-tag {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }
}