/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, #8f1414 0%, #b91c1c 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(143, 20, 20, 0.2);
}

#welcome-message {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 6px;
    width: var(--progress, 0%);
    transition: width 0.5s ease;
}

#progress-text {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Seção de entrada do nome */
#name-input-section {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#name-input-section h2 {
    color: #8f1414;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

#name-input-section p {
    margin-bottom: 25px;
    color: #666;
}

#user-name-input {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

#user-name-input:focus {
    outline: none;
    border-color: #8f1414;
}

#start-button {
    background: linear-gradient(135deg, #8f1414 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(143, 20, 20, 0.3);
}

/* Seção do calendário */
#calendar-section {
    margin-top: 30px;
}

.week-container {
    margin-bottom: 40px;
    background: #f9f9f9;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.week-header {
    text-align: center;
    margin-bottom: 25px;
}

.week-title {
    color: #8f1414;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.week-objective {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.day-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.day-card.completed {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.day-card.overdue {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.day-card.current {
    border-color: #8f1414;
    background: linear-gradient(135deg, #fef7f7 0%, #fecaca 100%);
}

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

.day-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #8f1414;
}

.day-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.status-completed {
    background: #22c55e;
    color: white;
}

.status-overdue {
    background: #ef4444;
    color: white;
}

.status-current {
    background: #8f1414;
    color: white;
}

.day-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.day-preview {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Modal para detalhes do dia */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #8f1414;
}

.modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.modal-day-number {
    color: #8f1414;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-day-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.modal-content-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 25px;
    white-space: pre-line;
    font-size: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8f1414;
}

.complete-button {
    width: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.complete-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.complete-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    header {
        padding: 15px;
    }
    
    #welcome-message {
        font-size: 1.5rem;
    }
    
    main {
        padding: 15px;
    }
    
    .week-container {
        padding: 20px 15px;
    }
    
    .days-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .day-card {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    #name-input-section {
        margin: 10px;
        padding: 30px 15px;
    }
    
    .week-container {
        margin: 10px;
        padding: 15px 10px;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 15px;
        width: 98%;
    }
}



/* Mensagens de parabéns */
.congratulations-message {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.congratulations-message h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.congratulations-message p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
}

.final-congratulations {
    background: linear-gradient(135deg, #8f1414 0%, #b91c1c 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin: 30px auto;
    max-width: 600px;
    box-shadow: 0 6px 20px rgba(143, 20, 20, 0.4);
    animation: celebrationPulse 2s ease-in-out infinite alternate;
}

.final-congratulations h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.final-congratulations p {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* Botão de desmarcar */
.unmark-button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.unmark-button:hover {
    background: #dc2626;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes celebrationPulse {
    from {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(143, 20, 20, 0.4);
    }
    to {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(143, 20, 20, 0.6);
    }
}


.unmark-button {
    width: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.unmark-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

