:root {
    --accent-color: #81e6d9;
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 10px;
    background: linear-gradient(135deg, #1a202c, #2d3748, #1a365d, #234e52);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    height: 100vh; width: 100vw;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden; position: fixed;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.dashboard { display: flex; flex-direction: row; gap: 15px; width: 100%; height: 100%; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(120%);
    border: 1px solid var(--glass-border);
    border-radius: 25px; padding: 15px;
}

.header { flex: 0 0 20%; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.calendar-container { flex: 1; padding: 5px; background: #000; overflow: hidden; height: 100%; }
.sidebar-right { flex: 0 0 35%; display: flex; flex-direction: column; gap: 15px; height: 100%; overflow-y: auto; }

#clock { font-size: 2.8rem; font-weight: 200; margin: 0; }
.family-photo-container {
    width: 100%; height: 180px; border-radius: 20px; overflow: hidden;
    border: 2px dashed rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.2); cursor: pointer; flex-shrink: 0;
}
#family-photo { width: 100%; height: 100%; object-fit: cover; }

.history-section { margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--glass-border); flex-grow: 1; overflow-y: auto; }
.history-item { font-size: 0.6rem; padding: 4px 8px; border-radius: 6px; margin-bottom: 4px; border-left: 3px solid var(--accent-color); background: rgba(0,0,0,0.2); }
.history-item.earn { border-left-color: #48bb78; }
.history-item.remove { border-left-color: #f56565; }
.history-item.redeem { border-left-color: #ed64a6; }

.calendar-wrapper { height: 100%; width: 100%; filter: invert(90%) hue-rotate(180deg) brightness(1.1); mix-blend-mode: screen; }
iframe { width: 100%; height: 100%; border: none; }

/* TASK BOARD */
.notes-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }

.sticky-note {
    border-radius: 15px; padding: 12px; margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-direction: column; gap: 8px; cursor: pointer;
    position: relative; transition: all 0.3s ease;
}

.assignee-Nick { background: linear-gradient(135deg, #2b6cb0, #3182ce); }
.assignee-Sarah { background: linear-gradient(135deg, #b83280, #d53f8c); }
.assignee-Charlotte { background: linear-gradient(135deg, #6b46c1, #805ad5); }
.assignee-Collin { background: linear-gradient(135deg, #2f855a, #38a169); }
.assignee-Select { background: rgba(255,255,255,0.1); border-style: dashed; }

.assignee-picker, .due-date-input { display: none; }
.sticky-note.editing .assignee-picker, 
.sticky-note.editing .due-date-input { display: block; }

.task-top-row { display: flex; justify-content: space-between; align-items: center; min-height: 24px; pointer-events: none; }
.task-top-row * { pointer-events: auto; }

.assignee-label { font-size: 0.7rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.assignee-picker { background: rgba(0,0,0,0.3); border: none; color: white; font-size: 0.75rem; border-radius: 5px; }
.task-textarea { background: transparent; border: none; color: white; width: 100%; outline: none; resize: none; font-size: 1rem; font-weight: 500; }

.task-footer { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 8px; min-height: 35px; pointer-events: none; }
.task-footer * { pointer-events: auto; }

.due-badge {
    background: rgba(0, 0, 0, 0.4); padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center;
    gap: 6px; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff;
}
.is-overdue .due-badge {
    background: linear-gradient(135deg, #e53e3e, #c53030); border-color: #fff;
    animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(229, 62, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
}

.due-date-input { background: rgba(0,0,0,0.5); border: 1px solid var(--accent-color); color: white; font-size: 0.7rem; border-radius: 6px; padding: 4px; }
.complete-circle { width: 26px; height: 26px; border: 2px solid white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

.chore-item { background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 6px 10px; margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; }
.btn-group-row { display: flex; gap: 8px; }
.point-btn-sm { padding: 6px 8px; font-size: 0.65rem; min-width: 65px; border: none; border-radius: 6px; font-weight: 800; background: linear-gradient(to bottom, var(--accent-color), #4fd1c5); box-shadow: 0 3px 0 #285e61; touch-action: manipulation; }
.minus-btn-sm { padding: 6px 8px; font-size: 0.8rem; border: none; border-radius: 6px; background: linear-gradient(to bottom, #ff5555, #c53030); box-shadow: 0 3px 0 #742a2a; color: white; touch-action: manipulation; }

#rewards-bank { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 5px; }
.kid-stat { text-align: center; border: 2px solid rgba(255, 215, 0, 0.3); border-radius: 15px; padding: 8px; background: rgba(0,0,0,0.3); }
.kid-points { font-size: 1.4rem; font-weight: 900; color: #FFD700; }

#prize-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.prize-item { background: linear-gradient(135deg, rgba(191, 90, 242, 0.2), rgba(128, 90, 213, 0.2)); border: 1px solid rgba(191, 90, 242, 0.4); padding: 5px 2px; border-radius: 10px; text-align: center; font-size: 0.6rem; cursor: pointer; box-shadow: 0 2px 0 rgba(107, 70, 193, 0.6); touch-action: manipulation; }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-content { text-align: center; width: 340px; padding: 30px; border-radius: 25px; border: 2px solid var(--accent-color); background: #1a202c; position: relative; transition: all 0.3s ease; }
.modal-content.success { border-color: #48bb78; box-shadow: 0 0 30px rgba(72, 187, 120, 0.5); }
.modal-content.error { border-color: #f56565; animation: shake 0.4s ease; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.icon-btn { background: var(--accent-color); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-weight: bold; box-shadow: 0 3px 0 #285e61; touch-action: manipulation; }
.cancel-btn { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.1); color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; touch-action: manipulation; }
