@import url('https://cdn-uicons.flaticon.com/3.0.0/uicons-regular-rounded/css/uicons-regular-rounded.css');
@import url('https://cdn-uicons.flaticon.com/3.0.0/uicons-solid-rounded/css/uicons-solid-rounded.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #700F3A;
    --primary-dark: #4a0a27;
    --primary-light: #8f1348;
    --accent-color: #f39c12;
    --bg-light: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --success: #27ae60;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Search Section */
.search-section {
    background: white;
    padding: 2rem;
    max-width: 1200px;
    margin: -3rem auto 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Matérias Grid */
.materias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.materia-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.materia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(112, 15, 58, 0.15);
    border-color: var(--primary-color);
}

.materia-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.materia-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.materia-card i {
    color: var(--white);
}

.materia-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.exercicios-count {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Exercícios List */
.exercicios-list {
    display: none;
    margin-top: 2rem;
}

.exercicios-list.active {
    display: block;
}

.exercicio-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.exercicio-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.exercicio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.exercicio-titulo {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.dificuldade {
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.facil { background: #d4edda; color: #155724; }
.medio { background: #fff3cd; color: #856404; }
.dificil { background: #f8d7da; color: #721c24; }

.exercicio-preview {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Question Detail Page */
.question-detail {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.question-detail.active {
    display: block;
}

.back-button {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    margin-bottom: 2rem;
    font-weight: bold;
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
}

.question-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.question-content {
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.solution-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--success);
}

.solution-title {
    color: var(--success);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solution-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.solution-step {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.solution-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Stats Section */
.stats-section {
    /*background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);*/
    color: var(--text-dark);
    padding: 3rem 2rem;
    border-radius: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: transparent;
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .search-box {
        flex-direction: column;
    }

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

    .question-detail {
        padding: 1.5rem;
    }
}