/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0B0F19;
    --bg-card: rgba(20, 27, 45, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.3);
    
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --secondary: #06B6D4;
    --secondary-hover: #0891B2;
    
    --accent: #A855F7;
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --text-dark: #1F2937;
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
}
body::before {
    top: 5%;
    left: 10%;
    background-color: var(--primary);
}
body::after {
    bottom: 10%;
    right: 10%;
    background-color: var(--secondary);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFF 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #FFF;
    box-shadow: var(--glow-shadow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--accent) 100%);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}
.btn-danger:hover {
    background-color: var(--danger);
    color: #FFF;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--border-radius-sm);
}

/* Glass Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: border-color 0.3s, transform 0.3s;
}
.card:hover {
    border-color: var(--border-hover);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #FFF 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #A7F3D0;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 70px);
}

.sidebar {
    background-color: rgba(15, 23, 42, 0.4);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}
.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--text-main);
}

.main-content {
    padding: 40px;
    overflow-y: auto;
}

/* UI Elements */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    text-align: center;
}
.stat-val {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0;
    color: var(--secondary);
}
.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Progress bar */
.progress-container {
    margin: 15px 0;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.progress-bar-bg {
    background-color: rgba(255, 255, 255, 0.08);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
    transition: width 0.4s ease-out;
}

/* Table Style */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badge tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #A7F3D0;
}
.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #FDE68A;
}
.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

/* Classroom / Lesson View */
.classroom-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    height: calc(100vh - 120px);
}

.lesson-player-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.text-content-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.syllabus-container {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.syllabus-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(15, 23, 42, 0.8);
    font-weight: 600;
}

.syllabus-module {
    border-bottom: 1px solid var(--border-color);
}
.module-title {
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.02);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}
.syllabus-lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px 30px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
}
.syllabus-lesson:last-child {
    border-bottom: none;
}
.syllabus-lesson.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--text-main);
    border-left: 3px solid var(--primary);
}
.syllabus-lesson:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

/* Quiz Style */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #FDE68A;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 24px;
    font-weight: 600;
}

.question-card {
    margin-bottom: 30px;
}
.question-enunciado {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
.alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.alternative-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}
.alternative-option:hover {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.04);
}
.alternative-option input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}
.alternative-option.selected {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

/* Quiz Result Key */
.correct-choice {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #A7F3D0;
}
.incorrect-choice {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #FCA5A5;
}

/* Landing Page Hero */
.hero {
    padding: 100px 0;
    text-align: center;
}
.hero h1 {
    font-size: 54px;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFF 20%, var(--primary) 60%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: #111827;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
}
.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Responsive Rules */
@media(max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        overflow-x: auto;
        padding: 15px;
    }
    .sidebar-link {
        white-space: nowrap;
    }
    .classroom-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    .main-content {
        padding: 20px;
    }
    .hero h1 {
        font-size: 36px;
    }
}
