/* Base Styles & Variables */
:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #7209b7;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #ffba08;
    --danger: #f94144;
    --gray: #6c757d;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
}

.logo i {
    margin-right: 10px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(rgba(67, 97, 238, 0.9), rgba(58, 12, 163, 0.9));
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: var(--secondary);
    font-family: 'Montserrat', sans-serif;
}

section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Responsive Design Section */
.responsive-demo {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.device-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.device {
    text-align: center;
    margin: 1rem;
    flex: 1;
    min-width: 250px;
}

.device-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Quiz Section */
.quiz-container {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--success);
    width: 0%;
    transition: width 0.3s ease;
}

.question {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.options {
    list-style: none;
    margin-bottom: 2rem;
}

.option {
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.option:hover {
    background-color: #e9ecef;
}

.option.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.option.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.option.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
}

.feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.feedback.correct {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: 155724;
}

.feedback.incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* API Demo Section */
.api-demo {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.api-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.weather-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 1rem;
}

.api-result {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    min-height: 200px;
}

.weather-container {
    text-align: center;
}

.weather-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 300px;
    margin: 0 auto;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .device {
        min-width: 100%;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .api-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .weather-input {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-controls .btn {
        width: 100%;
    }
}