/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #eaf4ff;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #2d3748, #4a5568);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Controls section */
.controls {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.dropdown-container {
    margin-bottom: 1.5rem;
}

.dropdown-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 1.1rem;
}

.dropdown {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

.dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown:hover {
    border-color: #cbd5e0;
}

/* Progress section */
.progress-container {
    display: none;
    align-items: center;
    gap: 1rem;
}

.progress-container.visible {
    display: flex;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669, #047857);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
    min-width: 120px;
}

/* Checklist container */
.checklist-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.welcome-message i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.welcome-message p {
    font-size: 1.1rem;
}

/* Checklist items */
.checklist-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 80px;
    cursor: pointer;
}

.checklist-item:hover {
    background: #edf2f7;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.checklist-item.completed {
    background: #f0fff4;
    border-color: #9ae6b4;
    box-shadow: 0 4px 15px rgba(154, 230, 180, 0.3);
}

.checklist-item.completed .item-text {
    text-decoration: line-through;
    color: #68d391;
}

.checklist-item.completed:hover {
    box-shadow: 0 8px 25px rgba(154, 230, 180, 0.4);
}

.checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    margin-right: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.checkbox.checked {
    background: linear-gradient(135deg, #10b981, #059669, #047857);
    border-color: #047857;
    color: white;
}

.checkbox.checked::after {
    content: '✓';
    font-size: 16px;
    font-weight: bold;
}

.item-text {
    flex: 1;
    font-size: 1rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

/* Actions */
.actions {
    display: none;
    gap: 1rem;
    justify-content: center;
}

.actions.visible {
    display: flex;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .controls {
        padding: 1.5rem;
    }
    
    .checklist-container {
        padding: 1.5rem;
    }
    
    .checklist-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .progress-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .progress-text {
        text-align: center;
        min-width: auto;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .checklist-item {
        padding: 1rem;
        min-height: 70px;
    }
    
    .item-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .checklist-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .checklist-item {
        padding: 0.75rem;
        min-height: 60px;
    }
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checklist-item {
    animation: fadeInUp 0.3s ease forwards;
}

.checklist-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.checklist-item:nth-child(even) {
    animation-delay: 0.2s;
}

/* Confetti animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 15px;
    height: 15px;
    background: #667eea;
    animation: confetti-fall 3s linear forwards;
    z-index: 9999;
    pointer-events: none;
    border-radius: 2px;
    top: -20px;
}

.confetti:nth-child(odd) {
    background: #764ba2;
}

.confetti:nth-child(3n) {
    background: #f093fb;
}

.confetti:nth-child(4n) {
    background: #f5576c;
}

.confetti:nth-child(5n) {
    background: #4facfe;
}

.confetti:nth-child(6n) {
    background: #43e97b;
}

/* Celebration popup */
.celebration-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: #064e3b;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    text-align: center;
    animation: popupAppear 0.5s ease-out;
    max-width: 400px;
    width: 90%;
}

.celebration-popup h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.celebration-popup p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.celebration-popup .close-btn {
    background: white;
    border: 2px solid #cbd5e0;
    color: #065f46;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-popup .close-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

@keyframes popupAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.celebration-popup.fade-out {
    animation: popupFadeOut 0.3s ease-in forwards;
}

@keyframes popupFadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}
