/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
    gap: 10px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    font-weight: bold;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #4a5568;
    text-align: center;
}

/* Weather Card Styles */
.weather-card {
    text-align: center;
}

.weather-info {
    display: none;
}

.weather-info.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.temperature {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.weather-detail {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.city-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Button Styles */
.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Quiz Styles */
.quiz-container {
    text-align: center;
}

.question {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #2d3748;
}

.answers {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.answer {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer:hover {
    background: #edf2f7;
    border-color: #667eea;
}

.answer.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.answer.correct {
    background: #48bb78;
    border-color: #48bb78;
    color: white;
}

.answer.incorrect {
    background: #f56565;
    border-color: #f56565;
    color: white;
}

.quiz-result {
    display: none;
    text-align: center;
    padding: 20px;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 400px;
    background: rgba(255, 255, 255, 0.95);
}

.carousel {
    position: relative;
    height: 100%;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    padding: 40px;
}

.carousel-slide:nth-child(2) {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
}

.carousel-slide:nth-child(3) {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.carousel-slide:nth-child(4) {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.carousel-slide:nth-child(5) {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }

    .tab-btn {
        max-width: none;
        padding: 12px 20px;
    }

    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .temperature {
        font-size: 2.5rem;
    }

    .weather-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .carousel-container {
        height: 300px;
    }

    .carousel-slide {
        font-size: 1.2rem;
        padding: 20px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-arrow.prev {
        left: 10px;
    }

    .carousel-arrow.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 15px;
    }

    .card h2 {
        font-size: 1.3rem;
    }

    .temperature {
        font-size: 2rem;
    }

    .question {
        font-size: 1.1rem;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-slide {
        font-size: 1rem;
        padding: 15px;
    }
}