:root {
    --bg-color-start: #f5f1e9;
    --bg-color-end: #e9e2d6;
    --gold-color: #d4af37;
    --dark-text-color: #333;
    --card-bg-color: #fdfaf3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --locked-overlay-color: rgba(212, 175, 55, 0.7);
    --danger-color: #c0392b;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--bg-color-start), var(--bg-color-end));
    color: var(--dark-text-color);
    line-height: 1.6;
    min-height: 100vh;
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Utilities --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.button, .course-card, .lesson-item, .icon-button {
    /* Impede que o texto dentro dos botões seja selecionado */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Remove o destaque de toque em dispositivos móveis */
    -webkit-tap-highlight-color: transparent;
}


.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: var(--gold-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.button.secondary {
    background-color: #555;
}
.button.secondary:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.button.danger {
    background-color: var(--danger-color);
}
.button.danger:hover {
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-text-color);
    padding: 0.3rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.icon-button:hover {
    background-color: rgba(0,0,0,0.1);
}

.icon-button .material-icons {
    font-size: 20px;
}

.icon-button.danger-icon:hover {
    background-color: var(--danger-color);
    color: white;
}

/* --- Header --- */
.app-header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    animation: fadeInDown 0.5s ease;
}

.logo {
    line-height: 1.1;
}

.logo-main {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--gold-color);
    font-weight: 700;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--gold-color);
    letter-spacing: 1px;
}

/* --- Login Page --- */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 1rem;
    animation: fadeIn 0.5s ease;
}

.login-box {
    background: var(--card-bg-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
    color: var(--dark-text-color);
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.error-message {
    color: red;
    margin-top: 1rem;
    min-height: 1.2em;
}

/* --- Dashboard --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    white-space: nowrap;
    margin-right: 1rem;
}

.dashboard-header .icon-button {
    background-color: var(--gold-color);
    color: white;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-header .icon-button:hover {
    transform: scale(1.1);
    background-color: var(--gold-color);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.dashboard-header .icon-button .material-icons {
    font-size: 28px;
}

.dashboard-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    animation: fadeInUp 0.7s ease;
}

.course-card {
    background: var(--card-bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: popIn 0.5s ease-out forwards;
    opacity: 0;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.2s; }
.course-card:nth-child(3) { animation-delay: 0.3s; }
.course-card:nth-child(4) { animation-delay: 0.4s; }
.course-card:nth-child(5) { animation-delay: 0.5s; }
.course-card:nth-child(6) { animation-delay: 0.6s; }

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.card-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

.card-content p {
    font-size: 0.9rem;
    flex-grow: 1;
}

/* --- Course Page --- */
.course-page {
    animation: fadeIn 0.5s ease;
}
.course-banner {
    width: 100%;
    height: 30vh;
    min-height: 250px;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
}

.course-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 3rem;
}

.course-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.course-info .bio {
    font-size: 1.1rem;
    max-width: 800px;
    line-height: 1.7;
}

.course-header-admin-controls {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.course-admin-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    backdrop-filter: blur(5px);
}
.course-admin-controls .button {
    width: 100%;
}

.module h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lessons-list {
    list-style: none;
    padding: 0 0 0 1rem; /* Indent lessons slightly */
}

.lesson-item {
    background: var(--card-bg-color);
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-item:hover {
    transform: translateX(10px);
}

.lesson-item.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--locked-overlay-color);
    pointer-events: none;
}
.lesson-item.locked .lesson-lock-icon {
    display: block;
}

.lesson-content {
    flex-grow: 1;
}

.lesson-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.lesson-description {
    font-size: 0.9rem;
    color: #666;
}

/* --- Video Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #333;
    z-index: 10;
}

.video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player iframe,
.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-details {
    padding-top: 1rem;
}

.video-details h2 {
    font-family: 'Playfair Display', serif;
}

/* --- Admin Dashboard --- */
.admin-dashboard {
    padding: 2rem 0;
}
.admin-section {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
}
.admin-section h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
}
.admin-course-list {
    list-style: none;
}
.admin-course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}
.admin-course-item:last-child {
    border-bottom: none;
}
.admin-controls {
    display: flex;
    gap: 0.5rem;
    padding-left: 1rem;
    flex-shrink: 0;
}

.add-lesson-container {
    padding: 1rem 0;
}

/* --- Admin Modal Form --- */
.admin-modal-form {
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
}

.admin-modal-form h2 {
    margin-bottom: 1.5rem;
}

.admin-modal-form .input-group {
    margin-bottom: 1rem;
}

.admin-modal-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
}

.admin-modal-form .form-actions {
    margin-top: 1.5rem;
    text-align: right;
}
.admin-modal-form .form-actions button {
    margin-left: 0.5rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInDown {
    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 popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    80% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .logo-main { font-size: 1.5rem; }
    .logo-sub { font-size: 0.7rem; }
    .dashboard-title { font-size: 2rem; }
    .course-info h1 { font-size: 2.2rem; }
    .admin-course-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-controls {
        margin-top: 1rem;
    }
}

/* Adicione estas classes ao FINAL do seu arquivo style.css */

/* Classe para travar a rolagem do body quando um modal estiver aberto */
body.modal-open {
    overflow: hidden;
}

/* Classe para impedir a interação com imagens */
.non-selectable-img {
    pointer-events: none; /* Desativa eventos de clique/toque */
    user-select: none;   /* Impede a seleção da imagem */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}