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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    padding: 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.app-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.app-title i {
    color: #ffd700;
    animation: sparkle 2s infinite alternate;
}

@keyframes sparkle {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

.app-subtitle {
    font-size: 1.2em;
    color: #fff;
    font-weight: 300;
}

/* Navigation Styles */
.main-nav {
    display: flex;
    justify-content: center;
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 3px solid #e9ecef;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.nav-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.nav-btn i {
    font-size: 1.3em;
}

/* Main Content */
.main-content {
    padding: 30px;
    min-height: 600px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.tab-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: #667eea;
}

.date-display {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1em;
}

/* Chore List Styles */
.chore-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.chore-item {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chore-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.chore-item.completed {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-color: #10ac84;
}

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

.chore-info h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.chore-info p {
    color: #7f8c8d;
    font-size: 0.9em;
}

.chore-difficulty {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.chore-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chore-btn {
    background: linear-gradient(135deg, #10ac84 0%, #00d2d3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chore-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 172, 132, 0.3);
}

.chore-btn.completed {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
}

.chore-btn.completed:hover {
    transform: none;
    box-shadow: none;
}

/* Progress Bar */
.daily-progress {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.daily-progress h3 {
    font-family: 'Fredoka One', cursive;
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.progress-bar {
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.progress-fill {
    background: linear-gradient(135deg, #10ac84 0%, #00d2d3 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

/* Calendar Styles */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.calendar-nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.calendar-nav-btn:hover {
    transform: scale(1.1);
}

.calendar-month {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3em;
    color: #667eea;
    min-width: 200px;
    text-align: center;
}

.calendar-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.calendar-day {
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    min-height: 60px;
}

.calendar-day:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.calendar-day.today {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.calendar-day.has-chores {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 1.1em;
}

.calendar-day-stars {
    font-size: 0.8em;
    margin-top: 2px;
}

/* Rewards/Stars Section */
.star-counter {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.star-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.star-icon {
    font-size: 3em;
    color: #ffd700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.star-count {
    font-family: 'Fredoka One', cursive;
    font-size: 3em;
    color: #667eea;
}

.star-counter p {
    font-size: 1.2em;
    color: #7f8c8d;
    font-weight: 600;
}

.achievements {
    margin-bottom: 30px;
}

.achievements h3 {
    font-family: 'Fredoka One', cursive;
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

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

.achievement-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.achievement-item.earned {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
}

.achievement-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.achievement-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Family Section */
.family-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.family-member {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.family-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.member-avatar {
    font-size: 4em;
    margin-bottom: 15px;
}

.member-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5em;
    color: #667eea;
}

.stat-label {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Buttons */
.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-primary {
    background: linear-gradient(135deg, #10ac84 0%, #00d2d3 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(16, 172, 132, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: scale(1.05);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    font-family: 'Fredoka One', cursive;
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #667eea;
}

.avatar-selection {
    margin-bottom: 20px;
}

.avatar-selection p {
    margin-bottom: 10px;
    font-weight: 600;
}

.avatar-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.avatar-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-btn:hover,
.avatar-btn.selected {
    border-color: #667eea;
    background: #e8f0fe;
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Celebration Overlay */
.celebration-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.celebration-overlay.active {
    display: flex;
}

.celebration-content {
    background: white;
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    animation: celebrationBounce 0.6s ease;
    max-width: 400px;
    width: 90%;
}

@keyframes celebrationBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.stars-animation {
    margin-bottom: 20px;
}

.stars-animation i {
    font-size: 3em;
    color: #ffd700;
    margin: 0 10px;
    animation: starBounce 1s infinite alternate;
}

.stars-animation i:nth-child(2) {
    animation-delay: 0.2s;
}

.stars-animation i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes starBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

.celebration-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 15px;
}

.celebration-content p {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 25px;
}

.celebration-close {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-close:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        padding: 10px;
    }
    
    .nav-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .app-title {
        font-size: 2em;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .family-list {
        grid-template-columns: 1fr;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-day {
        min-height: 50px;
        font-size: 0.9em;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1em;
}