:root {
    --primary: #5624d0;
    --secondary: #a435f0;
    --dark: #1c1d1f;
    --light: #f7f9fa;
    --gray: #6a6f73;
    --border: #d1d7dc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f7f9fa;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container h2 {
    margin-top: 15px;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--secondary);
}

/* Dashboard */
.dashboard-header {
    padding: 30px 0;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px 0;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    height: 160px;
    background-color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.course-info {
    padding: 15px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.course-instructor {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Course Page */
.course-layout {
    display: flex;
    gap: 20px;
    padding: 30px 0;
}

.video-container {
    flex: 7;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 400px;
    background: #333;
}

.video-info {
    padding: 20px;
    background: white;
}

.video-sidebar {
    flex: 3;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

.video-list {
    margin-bottom: 30px;
}

.video-item {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-item.active {
    background-color: #f1f1f1;
    font-weight: 600;
}

.video-item:hover {
    background-color: #f9f9f9;
}

.video-item i {
    color: var(--gray);
}

.comments-section {
    margin-top: 30px;
}

.icon-container {
    position: relative;
    display: inline-block;
}

.pending-count {
    position: absolute;
    top: -5px;
    right: -20px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.comment {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    color: var(--gray);
    font-size: 12px;
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
}

.comment-form button {
    margin-top: 10px;
    width: auto;
    padding: 8px 15px;
}

.comment-reply {
    padding: 15px 30px;
    border-bottom: 1px solid var(--border);
}

.comment-reply .comment-date {
    padding-right: 0;
}

.comments-list {
    max-height: 70vh;
    overflow-y: auto;
}

.comment-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-meta strong {
    color: #5624d0;
    font-size: 16px;
}

.comment-meta span {
    color: #6a6f73;
    font-size: 14px;
}

.course-name {
    color: #a435f0 !important;
    font-style: italic;
}

.comment-date {
    color: #6a6f73;
    font-size: 12px;
}

.comment-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #5624d0;
    margin-bottom: 15px;
}

/* Histórico de comentários */
.comment-history {
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.comment-history h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6a6f73;
}

.history-comment {
    background: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    border-left: 3px solid #ddd;
}

.history-comment.teacher-comment {
    border-left-color: #28a745;
    background: #f8fff9;
}

.history-comment.student-comment {
    border-left-color: #5624d0;
    background: #f8f9ff;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.history-header strong {
    font-size: 14px;
}

.history-date {
    font-size: 12px;
    color: #6a6f73;
}

.history-content {
    font-size: 14px;
    color: #333;
}

/* Formulário de resposta */
.reply-form {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-primary {
    background: #5624d0;
    color: white;
}

.btn-secondary {
    background: #6a6f73;
    color: white;
}

.btn-primary:hover {
    background: #a435f0;
}

.btn-secondary:hover {
    background: #565e64;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #6a6f73;
}

/* Mensagens de sucesso/erro */
.message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Panel */
.admin-panel {
    padding: 30px 0;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.admin-tab.active {
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
}

.admin-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-tab-content h2 {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Estilos para inputs de arquivo */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-style {
    display: block;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: 4px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s;
}

.file-input-style:hover {
    border-color: var(--primary);
    background: #f0f0f0;
}

.file-input-style i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
    color: var(--gray);
}

.file-name {
    margin-top: 10px;
    font-size: 14px;
    color: var(--gray);
    word-break: break-all;
}

small {
    color: var(--gray);
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Utility Classes */
.hidden {
    display: none;
}

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

.mt-20 {
    margin-top: 20px;
}

.error {
    color: red;
    margin-bottom: 15px;
}

.success {
    color: green;
    margin-bottom: 15px;
}