* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
}

.logo span {
    color: #ffcc00;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    padding: 30px;
}

.page-title {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 2px solid #6a11cb;
    padding-bottom: 10px;
}

.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    color: #6a11cb;
    margin-bottom: 20px;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #6a11cb;
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.image-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview-placeholder {
    color: #888;
    text-align: center;
    padding: 20px;
}

.premio-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.remove-premio {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-premio {
    background: #6a11cb;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.add-premio:hover {
    background: #5a0cb0;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-left: 10px;
}

.status-aberto {
    background: #d4edda;
    color: #155724;
}

.status-pausado {
    background: #e2e3e5;
    color: #383d41;
}

.status-programado {
    background: #cce5ff;
    color: #004085;
}

.submit-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 30px auto 0;
    min-width: 200px;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.info-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* Estilo para datas não disponíveis no calendário */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

input[type="date"]:invalid::-webkit-datetime-edit {
    color: #999;
}

input[type="date"]:valid::-webkit-datetime-edit {
    color: #333;
}

/* Estilo para o input de data personalizado */
.date-input-container {
    position: relative;
}

.date-input-container input {
    padding-right: 40px;
}

.date-input-container::after {
    content: "\f073";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6a11cb;
    pointer-events: none;
}

/* Adicionar ao criar-sorteio.css */
.date-picker-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.date-picker-calendar {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    width: 300px;
}

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

.calendar-nav {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.calendar-nav:hover {
    background: #f0f0f0;
}

.calendar-title {
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 5px;
    color: #666;
}

.calendar-day {
    text-align: center;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.valid {
    color: #333;
}

.calendar-day.invalid {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #007bff;
    color: white;
}

.calendar-day.quarta {
    border-left: 2px solid #28a745;
}

.calendar-day.sabado {
    border-right: 2px solid #dc3545;
}

.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-container input {
    padding-right: 40px;
    width: 100%;
}

.calendar-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.calendar-toggle:hover {
    background: #f0f0f0;
    color: #333;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }

    .premio-item {
        padding: 15px;
    }
}

.current-image {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    border: 1px dashed #ddd;
}

.current-image small {
    color: #666;
    font-size: 12px;
}

.edit-mode-notice {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1565c0;
}

.edit-mode-notice i {
    margin-right: 10px;
}

.edit-mode-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #ffd700;
}

.edit-mode-notice i {
    font-size: 20px;
}

/* Estilos específicos para a página de edição */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.form-actions .submit-btn {
    margin: 0;
    min-width: 180px;
}

.premio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.premio-header h3 {
    color: #6a11cb;
    margin: 0;
}

#loading-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #6a11cb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #5a0cb0;
}

/* Estilos para campos bloqueados */
.form-group[style*="opacity: 0.7"] {
    position: relative;
}

.form-group[style*="opacity: 0.7"]::after {
    content: "Não editável";
    position: absolute;
    top: 0;
    right: 0;
    background: #ffcc00;
    color: #333;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Estilos para o campo de vídeo */
.video-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.video-thumbnail {
    position: relative;
    max-width: 300px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 10px;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.video-overlay i {
    font-size: 48px;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-thumbnail:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-thumbnail:hover .video-overlay i {
    opacity: 1;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#video-title {
    font-weight: 500;
    color: #333;
}

.video-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.video-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
}

/* Estilos para os diferentes tipos de dias no calendário */
.calendar-day.loteria-federal {
    background-color: #e8f5e8;
    border-left: 3px solid #27ae60;
}

.calendar-day.jogo-bicho {
    background-color: #fde8e8;
    border-left: 3px solid #e74c3c;
}

.calendar-day.loteria-federal.valid:hover {
    background-color: #d4edda;
}

.calendar-day.jogo-bicho.valid:hover {
    background-color: #f8d7da;
}

/* Estilo para informação da fonte */
#fonte-selecionada-info {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}