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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: slideIn 0.5s ease-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

/* Start Screen */
#startScreen {
    text-align: center;
    padding: 40px 20px;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.language-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #667eea;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    min-width: 85px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-dropdown:hover, .language-dropdown:focus {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.header-section {
    margin-top: 50px;
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

.intro-content {
    margin-bottom: 40px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 15px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    border-color: #ff6b6b;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
}

.cities-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.city-tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: float 3s ease-in-out infinite;
}

.city-tag:nth-child(2n) {
    animation-delay: -1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Buttons */
.main-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
    font-family: 'Poppins', sans-serif;
}

.main-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    border: 2px solid #667eea;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6); }
    100% { box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3); }
}

/* Quiz Screen */
#quizScreen {
    padding: 20px;
}

.quiz-header {
    margin-bottom: 30px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(-2px);
}

.progress-container {
    margin-bottom: 0;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

.question-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 30px;
}

.question-title {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.4;
}

.answers-grid {
    display: grid;
    gap: 15px;
}

.answer-option {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid transparent;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.answer-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.answer-option.selected {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.idol-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.idol-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.answer-option.selected .idol-image {
    border-color: white;
}

/* Result Screen */
#resultScreen {
    padding: 30px 20px;
}

.result-container {
    text-align: center;
    max-width: 100%;
}

.result-header {
    margin-bottom: 30px;
}

.result-title {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 15px;
}

.result-city {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out;
}

.result-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.result-idol-section {
    margin-bottom: 25px;
}

.result-idol-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.result-idols {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.result-idol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.result-idol-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid;
    border-image: linear-gradient(45deg, #ff6b6b, #4ecdc4) 1;
}

.result-idol-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.result-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.result-features {
    display: grid;
    gap: 10px;
    text-align: left;
}

.result-feature {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 500;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

/* Loading Screen */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }
    
    .language-dropdown {
        font-size: 0.7rem;
        padding: 5px 8px;
        min-width: 75px;
        border-radius: 12px;
    }
    
    .header-section {
        margin-top: 45px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .result-city {
        font-size: 2rem;
    }
    
    .result-idols {
        gap: 10px;
    }
    
    .result-idol-image {
        width: 70px;
        height: 70px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 500px;
    }
    
    .answers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Download Button Styles */
.download-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.download-btn:hover:not(:disabled) {
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
}
