/* Custom styles for the Trivia Generator App */

/* Overall body styling */
body {
    background: linear-gradient(135deg, #5ea5a3 0%, #4a8a87 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Make the main content container stand out */
.container {
    position: relative;
    z-index: 1;
}

/* Custom card styling with better shadows and transitions */
.card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Country Selection Styles */
.country-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.country-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.country-card:active {
    transform: translateY(-5px) scale(0.98);
}

.country-flag {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.country-card:hover .country-flag {
    transform: scale(1.1);
}

.country-card .card-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.country-card .card-text {
    font-size: 0.9rem;
}

/* Selected country indicator */
.country-selected {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87) !important;
    color: white !important;
    transform: scale(1.05);
}

.country-selected .card-title,
.country-selected .card-text {
    color: white !important;
}

/* Category Selection Styles - Beautiful & Compact */
.category-sliders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Responsive grid layout */
@media (max-width: 768px) {
    .category-sliders-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .category-sliders-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.category-slider-container {
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    margin-bottom: 1px !important;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-slider-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-slider-container:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    /* Removed transform to prevent shifting */
}

.category-icon {
    color: #5ea5a3;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.category-slider-container:hover .category-icon {
    color: #4a8a87;
}

.slider-value {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87);
    color: white;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-weight: bold;
    font-size: 0.75rem !important;
    min-width: 24px !important;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Custom Range Slider Styling */
.category-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 5px !important;
    background: linear-gradient(to right, 
        rgba(231, 76, 60, 0.7) 0%, 
        rgba(243, 156, 18, 0.7) 30%, 
        rgba(46, 204, 113, 0.7) 70%, 
        rgba(46, 204, 113, 0.9) 100%) !important;
    border-radius: 8px !important;
    outline: none;
    margin: 6px 0 3px 0 !important;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.category-slider:hover {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2) !important;
    transform: scaleY(1.2);
}

/* Webkit browsers (Chrome, Safari, Edge) */
.category-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px !important;
    height: 18px !important;
    background: linear-gradient(45deg, #5ea5a3, #4a8a87) !important;
    border-radius: 50% !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(94, 165, 163, 0.4) !important;
    transition: all 0.2s ease;
    border: 2px solid white !important;
}

.category-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 3px 10px rgba(94, 165, 163, 0.6) !important;
}

.category-slider::-webkit-slider-thumb:active {
    transform: scale(0.9) !important;
}

/* Firefox */
.category-slider::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    background: linear-gradient(45deg, #5ea5a3, #4a8a87) !important;
    border-radius: 50% !important;
    cursor: pointer;
    border: 2px solid white !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.2s ease;
}

.category-slider::-moz-range-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.6) !important;
}

.category-slider::-moz-range-track {
    height: 5px !important;
    background: linear-gradient(to right, 
        rgba(231, 76, 60, 0.7) 0%, 
        rgba(243, 156, 18, 0.7) 30%, 
        rgba(46, 204, 113, 0.7) 70%, 
        rgba(46, 204, 113, 0.9) 100%) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Slider Labels */
.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1px !important;
    font-size: 0.6rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
}

/* Slider value color coding */
.slider-value.value-low {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.slider-value.value-medium {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.slider-value.value-high {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

/* Badge styling */
.badge {
    font-size: 1rem !important;
    padding: 8px 16px;
    border-radius: 20px;
}

/* Animation for category sliders - simplified */
.category-slider-container {
    animation: slideInUp 0.4s ease-out;
}

.category-slider-container:nth-child(1) { animation-delay: 0.05s; }
.category-slider-container:nth-child(2) { animation-delay: 0.1s; }
.category-slider-container:nth-child(3) { animation-delay: 0.15s; }
.category-slider-container:nth-child(4) { animation-delay: 0.2s; }
.category-slider-container:nth-child(5) { animation-delay: 0.25s; }
.category-slider-container:nth-child(6) { animation-delay: 0.3s; }
.category-slider-container:nth-child(7) { animation-delay: 0.35s; }
.category-slider-container:nth-child(8) { animation-delay: 0.4s; }
.category-slider-container:nth-child(9) { animation-delay: 0.45s; }
.category-slider-container:nth-child(10) { animation-delay: 0.5s; }
.category-slider-container:nth-child(11) { animation-delay: 0.55s; }
.category-slider-container:nth-child(12) { animation-delay: 0.6s; }

/* Enhanced form controls */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #5ea5a3;
    box-shadow: 0 0 0 0.2rem rgba(94, 165, 163, 0.25);
}

/* Button enhancements */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87);
    border: none;
    box-shadow: 0 4px 15px rgba(94, 165, 163, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 165, 163, 0.4);
    background: linear-gradient(45deg, #4a8a87, #3e7572);
}

.btn-outline-primary {
    border-color: #5ea5a3;
    color: #5ea5a3;
}

.btn-outline-primary:hover {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87);
    border-color: #5ea5a3;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    transform: translateY(-2px);
}

/* Navbar customization */
.navbar {
    background: linear-gradient(90deg, #5ea5a3 0%, #4a8a87 100%) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar-text {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Header styling */
.display-4 {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

/* Icon enhancements */
.fas, .far {
    margin-right: 8px;
}

/* Form labels */
.form-label {
    color: #495057;
    margin-bottom: 8px;
}

/* Card headers */
.card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(90deg, #5ea5a3 0%, #4a8a87 100%) !important;
}

/* Footer styling */
footer {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading animation for future use */
.loading {
    display: inline-block;
    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); }
}

/* Results section styling */
#results-section .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Question cards (for future use) */
.question-card {
    margin-bottom: 20px;
    border-left: 4px solid #5ea5a3;
}

.question-number {
    background: linear-gradient(45deg, #5ea5a3, #4a8a87);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

/* Country selection grid improvements */
.row.g-4 {
    row-gap: 1.5rem !important;
}

/* Animation for country cards */
.country-card {
    animation: slideInUp 0.6s ease-out;
}

.country-card:nth-child(1) { animation-delay: 0.1s; }
.country-card:nth-child(2) { animation-delay: 0.2s; }
.country-card:nth-child(3) { animation-delay: 0.3s; }
.country-card:nth-child(4) { animation-delay: 0.4s; }
.country-card:nth-child(5) { animation-delay: 0.5s; }
.country-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Responsive improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .card {
        margin: 10px;
    }
    
    body {
        background: linear-gradient(180deg, #5ea5a3 0%, #4a8a87 100%);
    }
    
    .country-flag {
        font-size: 3rem;
    }
    
    .country-card {
        margin-bottom: 1rem;
    }
    
    .category-slider-container {
        padding: 10px 15px;
        margin-bottom: 4px;
    }
    
    .slider-value {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    .category-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .category-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
}

/* Smooth page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Slide transitions for sections */
.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Category list styling for summary page */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 8px;
    padding: 1rem;
}

.category-list li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    color: #495057;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li::before {
    content: "•";
    color: #5ea5a3;
    font-weight: bold;
    position: absolute;
    left: 0.5rem;
    font-size: 1.2em;
}

/* Rounds list specific styling - left justified and cleaner */
.rounds-list {
    text-align: left;
    max-width: none;
}

.rounds-list li {
    padding: 0.5rem 0 0.5rem 1.8rem;
    font-weight: 600;
    color: #2d3748;
}

.rounds-list li::before {
    content: "📋";
    left: 0.3rem;
    font-size: 1em;
}

/* =================================
   CLEAN MINIMAL TYPEFORM DESIGN
   ================================= */

.typeform-question {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #ffffff;
    color: #2d3748;
    padding: 1rem 2rem 2rem 2rem;
}

.question-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.question-title {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #2d3748;
    text-align: center;
}

.question-subtitle {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: center;
}

.typeform-options {
    margin: 1.5rem 0;
    text-align: left;
}

.typeform-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.typeform-option:hover,
.typeform-option:focus {
    border-color: #cbd5e0;
    box-shadow: 0 0 0 3px rgba(94, 165, 163, 0.1);
}

.typeform-option.selected {
    border-color: #5ea5a3;
    background: #f0fdfc;
}

.option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
    margin-right: 1rem;
    flex-shrink: 0;
    color: #718096;
}

.typeform-option.selected .option-key {
    background: #5ea5a3;
    border-color: #5ea5a3;
    color: white;
}

.option-flag {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.option-text {
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
    color: #2d3748;
}

.option-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    width: 180px;
    flex-shrink: 0;
}

.option-description {
    color: #718096;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    flex: 1;
}

.option-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.option-text small {
    color: #718096;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
}

.typeform-hint {
    text-align: center;
    color: #a0aec0;
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.typeform-hint kbd {
    background: #f7fafc;
    color: #4a5568;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .question-title {
        font-size: 1.5rem;
    }
    
    .typeform-question {
        padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    }
    
    .typeform-option {
        padding: 0.875rem 1rem;
    }
    
    .option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .option-title {
        white-space: normal;
    }
}

/* Remove flashy animations */
.typeform-option.selecting {
    transform: none;
    animation: none;
}

/* Hide the original region option styles when using Typeform style */
.typeform-question .region-option,
.typeform-question .region-selection-container {
    display: none;
}

/* Fix the header - make it much smaller and ocean blue */
.wizard-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 25%, #0e7490 50%, #155e75 75%, #164e63 100%) !important;
    background-image: linear-gradient(135deg, #0ea5e9 0%, #0891b2 25%, #0e7490 50%, #155e75 75%, #164e63 100%) !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 0 !important;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3) !important;
}

.progress-bar .progress {
    background: #ffffff !important;
}

.wizard-header h1 {
    color: white !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
}

/* Remove any background from the main container */
.wizard-container {
    background: #ffffff !important;
}

.container-fluid {
    background: #ffffff !important;
}

/* Override any Bootstrap background */
body {
    background: #ffffff !important;
}

/* Fix navigation buttons - move much closer and make teal */
.typeform-question ~ .wizard-navigation {
    opacity: 1;
    pointer-events: auto;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.typeform-question ~ .wizard-navigation .btn:not(.btn-secondary) {
    display: inline-block;
}

/* Minimal button styling - teal with subtle rounded corners */
.wizard-navigation .btn {
    border-radius: 4px !important;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.wizard-navigation .btn-primary {
    background: #5ea5a3 !important;
    border-color: #5ea5a3 !important;
    color: white !important;
}

.wizard-navigation .btn-primary:hover {
    background: #4a8a87 !important;
    border-color: #4a8a87 !important;
}

.wizard-navigation .btn-secondary {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #4a5568 !important;
}

.wizard-navigation .btn-secondary:hover {
    background: #f7fafc !important;
    border-color: #cbd5e0 !important;
}

/* Disabled format cards for bulk generation */
.format-card.disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(50%);
}

.format-card.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.format-card.disabled .format-card-check {
    opacity: 0.3;
}

.format-card.disabled .format-pricing {
    opacity: 0.5;
}

