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

/* Force light mode - override system dark mode */
:root {
    color-scheme: light;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow: hidden;
    height: 100vh;
    color-scheme: light;
}

#app {
    height: 100vh;
    position: relative;
}

/* Screensaver/Idle State */
#screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    z-index: 1000;
}

#screensaver.active {
    display: flex;
}

.clock {
    text-align: center;
}

#time {
    font-size: 8rem;
    font-weight: 300;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

#date {
    font-size: 2rem;
    font-weight: 300;
    opacity: 0.8;
}

.hint {
    position: absolute;
    bottom: 3rem;
    font-size: 1.2rem;
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.screensaver-event {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.screensaver-event.important {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #f59e0b;
}

.screensaver-event.google-event {
    border-left: 4px solid #4285f4;
}

.screensaver-event.recurring-event {
    border-left: 4px solid #10b981;
}


/* Planner View */
#planner {
    display: block;
    height: 100vh;
    background: #f5f5f5;
    color: #333;
    overflow-y: auto;
}

#planner.active {
    display: block;
}

/* Today's Schedule Banner */
.today-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.8rem 1.5rem;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0;
}

.today-banner h2 {
    margin: 0 0 0.6rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

#todayBanner {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.banner-event {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.banner-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-event.important {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 2px solid #f59e0b;
}

.banner-event.google-event {
    border-left: 4px solid #4285f4;
}

.banner-event.recurring-event {
    border-left: 4px solid #10b981;
}

.banner-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.4rem;
}

.banner-event.important .banner-time {
    color: #d97706;
}

.banner-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-relative {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.banner-empty {
    color: white;
    font-size: 1rem;
    padding: 0.8rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.event-badge {
    font-size: 0.9rem;
}

.recurring-event {
    border-left-color: #10b981;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.version-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.save-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.save-status.saving {
    background: rgba(59, 130, 246, 0.3);
    color: white;
    animation: pulse-save 1.5s ease-in-out infinite;
}

.save-status.cloud {
    background: rgba(16, 185, 129, 0.3);
    color: white;
}

.save-status.error {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

@keyframes pulse-save {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.screensaver-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.screensaver-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.motion-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toggle-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4ade80;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

#currentDateTime {
    font-size: 1.2rem;
    opacity: 0.9;
}

.google-status {
    font-size: 0.9rem;
    opacity: 0.8;
}

.google-status.connected {
    color: #4ade80;
    font-weight: 500;
}

.content {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.tasks-section {
    grid-column: 1 / -1;
}

.rewards-section {
    grid-column: 1 / -1;
}

section {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.pin-status {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

.pin-status.not-set {
    background: #fee2e2;
    color: #dc2626;
}

.pin-status.set {
    background: #dcfce7;
    color: #16a34a;
}

.parent-lock-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #dc2626;
    background: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.parent-lock-btn:hover {
    transform: scale(1.1);
}

.parent-lock-btn.unlocked {
    border-color: #16a34a;
    background: #dcfce7;
    animation: pulse-unlock 2s ease-in-out infinite;
}

@keyframes pulse-unlock {
    0%, 100% { box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(22, 163, 74, 0.6); }
}

.up-next {
    grid-column: 1 / -1;
}

.event-item {
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.event-item:hover {
    transform: translateX(5px);
}

.event-item.important {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.event-item.google-event {
    border-left-color: #4285f4;
}

.google-badge {
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.event-location {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

.event-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.event-relative {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.no-events {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

/* Task System */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.today-points {
    font-size: 1rem;
}

.points-earned {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.points-max {
    color: #999;
}

.task-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #ddd;
    transition: all 0.3s;
    cursor: pointer;
}

.task-item:hover {
    background: #f0f0f0;
}

.task-item.completed {
    border-left-color: #fbbf24;
    background: #fffbeb;
}

.task-item.verified {
    border-left-color: #4ade80;
    background: #f0fdf4;
}

.task-item.bonus {
    border-left-color: #f59e0b;
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.task-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.task-info {
    flex: 1;
    min-width: 0;
}

/* Show details by default on desktop */
.task-details {
    max-height: 500px;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Show actions by default on desktop */
.task-actions {
    max-height: 100px;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Hide on mobile - show when expanded */
@media (max-width: 768px) {
    .task-details {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    
    .task-actions {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    
    .task-item.expanded .task-details {
        max-height: 500px;
        opacity: 1;
        margin-top: 0.5rem;
    }
    
    .task-item.expanded .task-actions {
        max-height: 100px;
        opacity: 1;
    }
}

.task-name {
    font-size: 1rem;
    font-weight: 500;
}

.mandatory-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: #f59e0b;
    background: #fef3c7;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 600;
    border: 1px solid #fbbf24;
}

.task-item.mandatory {
    border-left-width: 4px;
}

.task-points-display {
    margin-top: 0.3rem;
}

.points-normal {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
}

.points-earned {
    font-size: 1rem;
    color: #f59e0b;
    font-weight: 700;
}

.points-breakdown {
    font-size: 0.8rem;
    color: #999;
    margin-left: 0.3rem;
}

.bonus-available {
    font-size: 0.9rem;
    color: #f59e0b;
    font-weight: 600;
}

.task-points {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

.bonus-badge {
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.85rem;
}

.base-points {
    font-size: 0.75rem;
    color: #999;
}

.task-timer-info {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.3rem;
    padding: 0.2rem 0.4rem;
    background: #f0f9ff;
    border-radius: 4px;
    display: inline-block;
}

.countdown-display {
    margin-top: 0.4rem;
    padding: 0.4rem;
    background: #fef3c7;
    border-radius: 4px;
    border: 2px solid #f59e0b;
}

.countdown-label {
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 600;
    margin-right: 0.3rem;
}

.countdown-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f59e0b;
    font-family: 'Courier New', monospace;
}

.countdown-timer.urgent {
    color: #dc2626;
    animation: pulse-urgent 0.5s ease-in-out infinite;
}

.countdown-timer.expired {
    color: #dc2626;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 2.6rem; /* Align with task info (icon width + gap) */
    align-items: center;
}

.task-timer-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.task-timer-btn:hover {
    transform: scale(1.1);
    background: #f0f9ff;
}

.task-timer-btn.running {
    background: #fbbf24;
    border-color: #fbbf24;
    animation: pulse-timer 1s ease-in-out infinite;
}

@keyframes pulse-timer {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
}

.task-check,
.task-verify {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.task-check:hover,
.task-verify:hover {
    transform: scale(1.1);
}

.task-check.checked {
    background: #fbbf24;
    border-color: #fbbf24;
    color: white;
}

.task-verify.verified {
    background: #4ade80;
    border-color: #4ade80;
    color: white;
}

/* Points Summary */
.points-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    margin-top: 1rem;
}

.points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.points-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.4rem;
}

.points-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Week Progress */
.week-progress {
    margin-top: 1rem;
}

.progress-bar {
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.8rem;
}

.progress-text {
    text-align: center;
    margin-top: 0.4rem;
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

/* Rewards Shop */
.rewards-section-header h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.reward-item.monthly {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.reward-item.locked {
    opacity: 0.5;
    border-left-color: #ddd;
}

.reward-item.affordable {
    border-left-color: #4ade80;
    background: #f0fdf4;
}

.reward-item.monthly.affordable {
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.reward-item.big-reward {
    border-left-color: #f59e0b;
}

.reward-item.big-reward.affordable {
    border-left-color: #f59e0b;
    background: #fef3c7;
}

.reward-icon {
    font-size: 2.5rem;
}

.reward-info {
    flex: 1;
}

.reward-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.reward-cost {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

.reward-tier {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.reward-status {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.3rem;
}

.reward-unlocked {
    font-size: 0.8rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 0.3rem;
}

.reward-buy {
    padding: 0.6rem 1.5rem;
    background: #4ade80;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reward-buy:hover:not(:disabled) {
    background: #22c55e;
    transform: scale(1.05);
}

.reward-buy:disabled {
    background: #ddd;
    cursor: not-allowed;
}

/* Parent Settings */
.manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    color: #333333;
}

.manage-item span {
    color: #333333;
}

.manage-item button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
}

.manage-item button:hover {
    background: #b91c1c;
}

/* Force light mode for all inputs and text in modals */
.modal-content input,
.modal-content textarea,
.modal-content select {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #ddd !important;
}

.modal-content input::placeholder {
    color: #999999 !important;
}

/* Ensure table text is visible */
.modal-content table {
    color: #333333;
}

.modal-content table th,
.modal-content table td {
    color: #333333;
}

/* Dynamically created modals - force light mode */
#pinSetupModal .modal-content,
#pinEntryModal .modal-content,
#settingsPinModal .modal-content,
#changePinModal .modal-content,
#historyModal .modal-content {
    background-color: #ffffff !important;
    color: #333333 !important;
}

#pinSetupModal .modal-content *,
#pinEntryModal .modal-content *,
#settingsPinModal .modal-content *,
#changePinModal .modal-content *,
#historyModal .modal-content * {
    color: #333333 !important;
}

#pinSetupModal h2,
#pinEntryModal h2,
#settingsPinModal h2,
#changePinModal h2,
#historyModal h2 {
    color: #667eea !important;
}

#pinSetupModal input,
#pinEntryModal input,
#settingsPinModal input,
#changePinModal input {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 2px solid #667eea !important;
}

#pinSetupModal button,
#pinEntryModal button,
#settingsPinModal button,
#changePinModal button {
    color: #ffffff !important;
}

/* Settings Button */
.settings-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333333;
    margin: 0;
    padding: 1.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-content h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-content h3 {
    color: #333333;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.modal-content h4 {
    color: #555555;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.modal-content p {
    color: #666666;
    line-height: 1.6;
}

.modal-content label {
    color: #333333;
    font-weight: 500;
}

.close {
    color: #999;
    position: sticky;
    top: 10px;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    margin-left: auto;
    margin-bottom: -20px;
}

.close:hover {
    color: #333;
    background: #f3f4f6;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.setting-group {
    margin-bottom: 1.25rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.setting-group input[type="range"],
.setting-group input[type="number"],
.setting-group input[type="text"],
.setting-group input[type="password"],
.setting-group input[type="time"],
.setting-group input[type="datetime-local"],
.setting-group select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
    color: #333333;
    transition: all 0.2s ease;
}

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

.setting-group button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.setting-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.setting-group button:active {
    transform: translateY(0);
}
}

.setting-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.setting-group button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.setting-group button:hover {
    background: #5568d3;
}

.calendar-checkbox {
    display: block;
    padding: 0.5rem;
    cursor: pointer;
    color: #333333;
}

.calendar-checkbox:hover {
    background: #f5f5f5;
}

.calendar-checkbox input {
    margin-right: 0.5rem;
}

.calendar-checkbox span {
    color: #333333;
}

#googleSignInBtn,
#googleSignOutBtn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#googleSignInBtn:hover,
#googleSignOutBtn:hover {
    background: #357ae8;
}

#googleSignOutBtn {
    background: #dc2626;
}

#googleSignOutBtn:hover {
    background: #b91c1c;
}

/* History Tabs */
.history-tab-btn {
    padding: 0.6rem 1.2rem;
    background: #f8f9fa;
    color: #333333;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.history-tab-btn:hover {
    background: #e5e7eb;
}

.history-tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* History table inputs */
#detailedHistoryContent input[type="number"],
#detailedHistoryContent input[type="date"] {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #ddd !important;
}

/* Responsive */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .points-summary {
        grid-template-columns: 1fr;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    #time {
        font-size: 4rem;
    }
    
    header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .save-status {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .header-right {
        align-items: center;
    }
    
    /* Task items - more spacing on mobile */
    .task-item {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    /* Larger task icons */
    .task-icon {
        font-size: 2.2rem;
    }
    
    /* Task actions alignment */
    .task-actions {
        margin-left: 3rem; /* Adjust for larger icon */
    }
    
    /* Task name and points more readable */
    .task-name {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    /* Points display larger */
    .task-points-display {
        font-size: 1rem;
    }
    
    /* Timer info more compact */
    .task-timer-info {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        margin-top: 0.4rem;
    }
    
    /* Larger, easier to tap buttons */
    .task-actions button {
        min-height: 44px;
        min-width: 44px;
        font-size: 1.2rem;
        padding: 0.6rem;
    }
    
    /* Checkboxes larger */
    .task-checkbox {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    
    /* Countdown display more prominent */
    .countdown-timer {
        font-size: 1.3rem;
    }
    
    /* Section headers */
    .task-section h2 {
        font-size: 1.3rem;
        padding: 0.8rem 1rem;
    }
    
    /* Bonus status more compact */
    .bonus-status {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }
    
    /* Modal improvements */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* Settings inputs */
    .setting-group input,
    .setting-group select {
        font-size: 1rem;
        padding: 0.7rem;
    }
    
    /* Buttons in modals */
    .modal-actions button,
    .setting-group button {
        min-height: 44px;
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
    }
    
    /* Header adjustments */
    header {
        padding: 1rem;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .header-controls button {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Points display in header */
    .points-display {
        font-size: 1.1rem;
    }
    
    /* Mark all done button */
    .mark-all-done {
        min-height: 44px;
        font-size: 1rem;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }
    
    .task-item {
        padding: 0.9rem;
    }
    
    .task-icon {
        font-size: 2rem;
    }
    
    .task-actions {
        margin-left: 2.8rem;
    }
    
    .task-name {
        font-size: 1rem;
    }
    
    /* Hide less critical info on very small screens */
    .task-timer-info {
        font-size: 0.8rem;
    }
}


/* Auth Status */
.auth-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-status:hover {
    background: rgba(255, 255, 255, 0.2);
}

.auth-status.signed-in {
    background: rgba(5, 150, 105, 0.2);
    border: 1px solid rgba(5, 150, 105, 0.4);
}

.auth-status.signed-out {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.4);
}

.auth-status.syncing {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}


/* Child Selector */
.child-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.child-card:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.child-card.active {
    background: #e0f2fe;
    border-color: #0ea5e9;
}

.child-avatar {
    font-size: 2.5rem;
}

.child-info {
    flex: 1;
}

.child-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.avatar-btn {
    font-size: 2rem;
    padding: 0.5rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-btn:hover {
    transform: scale(1.1);
    border-color: #059669;
}

.avatar-btn.selected {
    border-color: #059669;
    background: #f0fdf4;
}


/* Child Tabs */
.child-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.child-tab:hover {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
}

.child-tab.active {
    background: rgba(255,255,255,0.25);
    color: white;
    font-weight: 600;
    border-bottom: 3px solid white;
}

.child-tab-avatar {
    font-size: 1.2rem;
}

.child-tab-close {
    margin-left: 0.3rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.child-tab:hover .child-tab-close {
    opacity: 0.7;
}

.child-tab-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.add-child-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    transition: all 0.2s;
}

.add-child-tab:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    border-color: rgba(255,255,255,0.5);
}
