/* Reset Básico e Estilos Globais */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --danger-color: #dc3545;
    --danger-hover-color: #c82333;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-gray);
    color: #212529;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout Base */
.header {
    background-color: var(--dark-gray);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.public-header {
    background-color: var(--dark-gray);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.public-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

main {
    flex-grow: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Formulários */
form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control-file {
    padding: 0.375rem 0.75rem;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover-color);
}

.btn-logout {
    background-color: #6c757d;
    color: white;
}
.btn-logout:hover {
    background-color: #5a6268;
}

/* Página de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

.login-form {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 1.5rem;
}

/* Alertas e Mensagens Flash */
.flash-messages {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.flash-messages li {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.flash-messages .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-messages .success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.flash-messages .info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Tabela de Vídeos */
.video-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.video-table th, .video-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

.video-table th {
    background-color: #e9ecef;
    font-weight: 600;
}

.video-table td a {
    color: var(--primary-color);
    text-decoration: none;
}
.video-table td a:hover {
    text-decoration: underline;
}

/* Player de Vídeo */
#ad-container {
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
    background-color: #000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#my-video-player {
    width: 100%;
    height: auto;
}

/* --- ESTILOS PARA ABAS --- */
.tabs {
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: -1px; /* Alinha com a borda do form */
}

.tab-link {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    background-color: #e9ecef;
}

.tab-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.tab-content {
    animation: fadeEffect 0.5s;
    /* Adiciona uma borda que se alinha com as abas */
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Remove a margem do form quando ele está dentro de uma aba */
.tab-content form {
    margin-bottom: 0;
    box-shadow: none;
    border-radius: 0;
}

@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* --- ESTILOS PARA O VISUALIZADOR DE TAGS EM CONTEXTO (WIREFRAME) --- */
.mock-site-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 8px;
}

.mock-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.mock-header-title-placeholder {
    height: 38px;
    width: 60%;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.mock-header-subtitle-placeholder {
    height: 20px;
    width: 80%;
    background-color: #f1f3f5;
    border-radius: 4px;
}

.mock-title-placeholder {
    height: 32px;
    width: 70%;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.mock-paragraph-placeholder {
    height: 80px;
    width: 100%;
    background-color: #f1f3f5;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.mock-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.ad-slot-container {
    margin: 2rem auto; /* Centraliza o slot no layout */
    border: 2px dashed #ced4da;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-color: #f8f9fa;
    /* As dimensões (width/height) serão aplicadas via style inline */
    /* Garante que o conteúdo interno não ultrapasse o contêiner */
    overflow: hidden; 
}

.ad-slot-container::before {
    content: 'Espaço Publicitário';
    position: absolute;
    top: -11px;
    left: 10px;
    background-color: #fff;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
}

/* Responsividade */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    .header {
        flex-direction: column;
        text-align: center;
    }
    .header h1 {
        margin-bottom: 0.5rem;
    }
    .video-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}