/* Daymaker Calendars - style.css - Compact Version */
:root {
    --brand-primary: #fbbf24;
    --brand-secondary: #fde68a;
    --brand-accent: #f59e0b;
    --brand-font: 'Bubblegum Sans', cursive;
    --brand-gradient: linear-gradient(to bottom, #581c87, #9a3412, #000000);
    --brand-text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    --brand-text-shadow-light: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    overscroll-behavior: none;
}
body {
    background: var(--brand-gradient);
    min-height: 100vh;
    font-family: 'Quicksand', sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}
.settings-cog {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: none;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: white;
}
.settings-cog:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.5);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}
.settings-cog:active {
    transform: rotate(90deg) scale(0.95);
}

/* ============================================
   ACCOUNT BUTTON + AUTH MODAL
   ============================================ */
.account-btn {
    position: fixed;
    top: 20px;
    right: 82px; /* sits to the left of the 50px settings cog (20 + 50 + 12) */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    border: none;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: white;
}
.account-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}
.account-btn:active {
    transform: scale(0.95);
}
.account-btn-initial {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}
.account-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.25);
}
.account-status-dot.status-hidden { display: none; }
.account-status-dot.status-synced { background: #22c55e; }
.account-status-dot.status-offline { background: #f59e0b; }
.account-status-dot.status-syncing {
    background: #38bdf8;
    animation: account-pulse 1s ease-in-out infinite;
}
@keyframes account-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.auth-modal {
    max-width: 420px;
    text-align: center;
}
.auth-subtitle {
    color: inherit;
    opacity: 0.75;
    font-size: 0.9rem;
    margin: 0.25rem 0 1.25rem;
    line-height: 1.4;
}
.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: #ffffff;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.google-signin-btn:hover { background: #f1f5f9; transform: translateY(-1px); }
.google-signin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 1.1rem 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}
.auth-divider span { padding: 0 0.75rem; }
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.auth-tab {
    flex: 1;
    padding: 0.55rem;
    background: rgba(148, 163, 184, 0.15);
    color: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.auth-tab.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
}
/* Not inside .modal-actions, so these need that rule's button styling themselves */
.auth-submit,
.auth-signout {
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-submit { width: 100%; margin-top: 0.5rem; }
.auth-message {
    font-size: 0.85rem;
    margin: 0.25rem 0 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    line-height: 1.35;
}
/* Account modal text works on the light default modal and the dark theme's */
.auth-message-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}
.auth-message-info {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}
/* The dark theme only recolors modal headings and labels; text in these that
   inherits its color would be black on the dark modal. (Not every modal: the
   settings section headers keep a light background in the dark theme.) */
body.dark-theme #authModal .modal,
body.dark-theme #importModal .modal,
body.dark-theme .member-chip:not(.active) { color: #e4e4e7; }
body.dark-theme .auth-message-error { color: #fecaca; }
body.dark-theme .auth-message-info { color: #bbf7d0; }
.auth-account-email { color: inherit; margin: 0.5rem 0; }
.auth-sync-status { color: inherit; opacity: 0.65; font-size: 0.85rem; margin: 0 0 1.25rem; }
.auth-signout { width: 100%; margin-top: 1rem; }

/* ===== Family (family.js) ===== */
.family-section { text-align: left; }
.family-section:empty { display: none; }
.family-title {
    font-size: 1.05rem;
    margin: 0.5rem 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.family-hint { font-size: 0.85rem; opacity: 0.7; margin: 0.25rem 0 0.75rem; line-height: 1.35; }
.family-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}
.family-card-title { font-weight: 700; margin: 0 0 0.5rem; }
.family-inline-form { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.family-inline-form input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: 'Quicksand', sans-serif;
}
.family-btn {
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    background: rgba(148, 163, 184, 0.2);
    color: inherit;
    white-space: nowrap;
}
.family-btn.primary { background: #7c3aed; color: #fff; }
.family-btn.primary:hover { background: #6d28d9; }
.family-btn.wide { width: 100%; margin-bottom: 0.75rem; }
.family-btn:disabled { opacity: 0.5; cursor: default; }
.family-row-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.family-row-buttons .family-btn { flex: 1; }
.family-link-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}
.family-members { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.family-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.family-member-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-member-actions { margin-left: auto; display: flex; gap: 0.15rem; flex-shrink: 0; }
.family-color {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}
.family-color::-webkit-color-swatch-wrapper { padding: 0; }
.family-color::-webkit-color-swatch { border: 2px solid rgba(255, 255, 255, 0.8); border-radius: 50%; }
.family-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin: 3px; }
.family-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    flex-shrink: 0;
}
.family-badge.muted { background: rgba(148, 163, 184, 0.25); color: inherit; }
.family-badge.you { background: #dcfce7; color: #15803d; }
.family-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
    color: inherit;
}
.family-icon-btn:hover { background: rgba(148, 163, 184, 0.25); }
.family-code {
    font-family: monospace;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-align: center;
    margin: 0.25rem 0;
}
.family-join-preview { margin: 0 0 0.5rem; }

/* Event modal: who it's for, "Only me" */
.member-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.member-chip {
    --chip-color: #64748b;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 2px solid var(--chip-color);
    background: transparent;
    color: inherit;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
}
.member-chip.active { background: var(--chip-color); color: #fff; }
.private-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0.25rem 0;
}
.private-toggle input { width: 18px; height: 18px; flex-shrink: 0; }
.private-toggle small { font-weight: 400; opacity: 0.7; }
.private-toggle:has(input:disabled) { opacity: 0.55; cursor: default; }

/* Event list + calendar cells */
.event-member-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.15rem;
}
.event-private-tag { margin-left: 0.35rem; font-size: 0.8em; }
.day-event-dot {
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    margin-right: 0.3em;
    vertical-align: middle;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
    padding: 1rem;
    gap: 1rem;
}
.app-container:has(.app-header[style*="display: none"]),
.app-container:has(.app-header[style*="display:none"]) {
    padding-top: 5rem;
}
.main-content-wrapper {
    display: flex;
    flex: 1;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
    margin-top: 1.5rem;
}
.app-header {
    background: transparent;
    flex-shrink: 0;
}
.app-title-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.calendar-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}
.app-title {
    font-family: var(--brand-font);
    font-size: 2rem;
    font-weight: bold;
    color: var(--brand-primary);
    margin: 0;
    letter-spacing: 1px;
    text-shadow: var(--brand-text-shadow);
}
.app-subtitle {
    font-family: var(--brand-font);
    font-size: 1.2rem;
    color: var(--brand-secondary);
    margin: 0;
    font-weight: 500;
    text-shadow: var(--brand-text-shadow-light);
}
.time-date-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    position: absolute;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}
.current-date-display {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: var(--brand-font);
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}
.current-date-display.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}
.current-date-display.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}
.current-date-display.clickable:active {
    transform: scale(0.98);
}
.current-time-display {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.29rem 1.1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: var(--brand-font);
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite;
    white-space: nowrap;
    flex-shrink: 0;
}
@keyframes glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(251, 191, 36, 0.6); }
}
.weather-display {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: glow-weather 2s ease-in-out infinite;
}
@keyframes glow-weather {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(16, 185, 129, 0.6); }
}
.weather-icon {
    font-size: 1.8rem;
    line-height: 1;
}
.weather-temp {
    font-size: 2rem;
    letter-spacing: 1px;
}
.weather-condition {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
    letter-spacing: 0.3px;
}
.weather-loading, .weather-error, .weather-setup {
    font-size: 1rem;
    opacity: 0.9;
}
.weather-setup {
    cursor: pointer;
    transition: opacity 0.2s;
}
.weather-setup:hover {
    opacity: 1;
}
.weather-error {
    color: #fef3c7;
}
.left-section {
    flex: 0 0 450px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.events-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}
.events-header h2 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-family: var(--brand-font);
    font-size: 2rem;
}
.events-header p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.holidays-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}
.holidays-title {
    color: #7c3aed;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-family: var(--brand-font);
}
.holidays-list {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.holiday-item {
    color: #92400e;
    font-size: 1rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.25rem;
    font-weight: 600;
}
.holiday-item:last-child {
    margin-bottom: 0;
}
.events-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}
.no-events {
    color: #9ca3af;
    text-align: center;
    padding: 2rem 0;
    font-style: italic;
    font-size: 1rem;
}
.event-item {
    background: #f3f4f6;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: all 0.2s ease-out;
    position: relative;
    border: 2px solid transparent;
    touch-action: pan-y;
}
/* ✏️ on each event: a visible way to edit/delete */
.event-edit-btn {
    margin-left: auto;
    align-self: center;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.45rem;
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s, background 0.2s;
}
.event-edit-btn:hover,
.event-edit-btn:focus-visible { opacity: 1; background: rgba(148, 163, 184, 0.25); }
.event-item:hover {
    background: #e5e7eb;
    transform: scale(1.01);
}
.event-item:active {
    transform: scale(0.99);
}
.event-item.dragging {
    opacity: 0.85;
    background: #e5e7eb;
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    position: relative;
    touch-action: none;
}
.event-item.completed {
    opacity: 0.6;
    background: #e5e7eb;
}
.event-item.completed .event-text {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    color: #6b7280;
}
.event-item.completed .event-time {
    text-decoration: line-through;
    color: #9ca3af;
}
.event-item.completing {
    animation: strikeThrough 0.6s ease-out forwards;
}
@keyframes strikeThrough {
    0% { background: #f3f4f6; }
    50% { background: #dbeafe; transform: scale(1.02); }
    100% { background: #e5e7eb; opacity: 0.6; transform: scale(1); }
}
.event-checkmark {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 1.5rem;
    color: #10b981;
    font-weight: bold;
    animation: checkmarkAppear 0.3s ease-out;
}
@keyframes checkmarkAppear {
    0% { opacity: 0; transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.event-number {
    background: #3b82f6;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    pointer-events: none;
}
.event-text {
    font-weight: 600;
}
.event-time {
    font-size: 0.85rem;
    color: #6b7280;
}
.add-event-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    flex-shrink: 0;
}
.add-event-section button {
    width: 100%;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.2s;
}
.add-event-section button:hover {
    background: #2563eb;
    transform: scale(1.02);
}
.calendar-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}
.calendar-section {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.calendar-container {
    background: #fff7ed;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 4px solid #ea580c;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    position: relative;
    z-index: 1;
    isolation: isolate;
}
.calendar-container.hide-icons .day-icon,
.calendar-container.hide-icons .special-event-marker,
.calendar-container.hide-icons .day-cell.has-events::after {
    display: none;
}
.calendar-header {
    background: linear-gradient(to right, #ea580c, #7e22ce);
    padding: 0.75rem 1rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 0;
    margin: 0;
}
.calendar-header.no-gradient {
    background: #ffffff !important;
    border-bottom: 3px solid #e5e7eb;
}
.calendar-header.no-gradient .month-year-selector select {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}
.calendar-header.no-gradient .nav-arrow {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}
.calendar-header.no-gradient .nav-arrow:hover {
    background: #e5e7eb;
}
.calendar-header.no-gradient .header-decorations {
    opacity: 0.3;
    filter: grayscale(1);
}
.header-decorations {
    position: absolute;
    font-size: 2rem;
    opacity: 0.2;
    z-index: 1;
}
.header-decorations.top-left {
    top: 0.25rem;
    left: 0.25rem;
}
.header-decorations.top-right {
    top: 0.25rem;
    right: 0.25rem;
}
.header-content {
    position: relative;
    z-index: 10;
}
.month-year-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0;
}
.month-year-selector select {
    padding: 0.35rem 0.75rem;
    font-size: 1.5rem;
    font-family: var(--brand-font);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
}
.month-year-selector select option {
    background: #1f2937;
    color: white;
}
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}
.left-arrow {
    left: 0.75rem;
}
.right-arrow {
    right: 0.75rem;
}
.calendar-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}
.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.day-header {
    text-align: center;
    font-weight: bold;
    color: #581c87;
    font-size: 1.1rem;
    background: #fed7aa;
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 2px solid #fb923c;
}
.days-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 0.5rem;
    min-height: 0;
    overflow: visible;
}
.day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 0.75rem;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0.25rem;
    min-height: 80px;
    height: 100%;
    overflow: hidden;
}
.day-cell.filled {
    background: linear-gradient(to bottom right, #ffedd5, #fef9c3);
    border: 2px solid #fdba74;
    cursor: pointer;
}
.day-cell.filled:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}
.day-cell.selected {
    box-shadow: 0 0 0 3px #3b82f6;
    border-color: #3b82f6;
}
.day-cell.today {
    background: linear-gradient(to bottom right, #dbeafe, #bfdbfe);
    border: 3px solid #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.day-cell.today .day-number {
    color: #1e40af;
    font-weight: 900;
}
.day-cell.has-events {
    background: linear-gradient(to bottom right, #d1fae5, #a7f3d0);
    border: 3px solid #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.day-cell.today.has-events {
    background: linear-gradient(135deg, #dbeafe 0%, #d1fae5 100%);
    border: 3px solid #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.day-cell.has-events::after {
    content: '•';
    position: absolute;
    bottom: 5px;
    color: #10b981;
    font-size: 1.5rem;
}
.day-cell.today.has-events::after {
    color: #10b981;
}
.day-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1f2937;
    position: relative;
    z-index: 10;
    margin-top: 0.25rem;
}
.day-cell.has-events .day-number,
.day-cell.has-events.holiday-day .day-number,
.day-cell.has-events.special-event-day .day-number {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    margin-top: 0;
}
.today-label {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: bold;
    color: #1e40af;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}
.day-events-list {
    position: absolute;
    top: 18px;
    left: 3px;
    right: 3px;
    font-size: 0.55rem;
    line-height: 1.4;
    color: #047857;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    max-height: 40px;
    overflow: hidden;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
    z-index: 3;
}
.day-event-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
    max-width: 100%;
}
.day-event-item:nth-child(n+4) {
    display: none;
}
.day-events-list[data-has-more="true"]::after {
    content: '...';
    display: block;
    color: #047857;
    font-weight: bold;
    font-size: 0.6rem;
    text-align: left;
    margin-top: 1px;
}
.day-cell.special-event-day .day-events-list,
.day-cell.holiday-day .day-events-list {
    top: 14px;
    max-height: 36px;
}
.day-icon {
    font-size: 1.3rem;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}
.holiday-label, .special-event-label {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: #1e40af;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
    z-index: 5;
}
.day-cell.special-event-day {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}
.day-cell.special-event-day[data-special-type="birthday"] {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border: 3px solid #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3);
}
.day-cell.special-event-day[data-special-type="birthday"] .special-event-label {
    color: #9f1239;
}
.day-cell.special-event-day[data-special-type="anniversary"] {
    background: linear-gradient(135deg, #fce7f3 0%, #fecdd3 100%);
    border: 3px solid #f43f5e;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.3);
}
.day-cell.special-event-day[data-special-type="anniversary"] .special-event-label {
    color: #9f1239;
}
.day-cell.special-event-day[data-special-type="memorial"] {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 3px solid #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}
.day-cell.special-event-day[data-special-type="memorial"] .special-event-label {
    color: #3730a3;
}
.day-cell.special-event-day[data-special-type="custom"] .special-event-label {
    color: #92400e;
}
.special-event-marker {
    position: absolute;
    bottom: 3px;
    right: 50%;
    transform: translateX(50%);
    font-size: 1.2rem;
}
.day-cell.halloween, .day-cell.special-day {
    background: linear-gradient(to bottom right, #9333ea, #ea580c);
    border: 4px solid black;
    overflow: hidden;
}
.day-cell.thanksgiving {
    background: linear-gradient(to bottom right, #92400e, #f59e0b);
    border: 4px solid #78350f;
}
.day-cell.halloween .day-number,
.day-cell.thanksgiving .day-number,
.day-cell.special-day .day-number {
    color: white;
    z-index: 10;
    position: relative;
}
.special-day-icon {
    font-size: 1.8rem;
    animation: pulse 2s infinite;
    z-index: 10;
    position: relative;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.special-day-bg {
    position: absolute;
    font-size: 4rem;
    opacity: 0.2;
}
.calendar-footer {
    background: linear-gradient(to right, #7e22ce, #ea580c);
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
}
.calendar-footer.no-gradient {
    background: #ffffff !important;
    border-top: 3px solid #e5e7eb;
}
.calendar-footer.no-gradient p {
    color: #1f2937 !important;
    text-shadow: none !important;
}
.calendar-footer p {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--brand-font);
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal {
    position: relative;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}
.settings-modal {
    max-width: 600px;
}
.modal h3 {
    margin: 0 2.5rem 1.5rem 0;
    font-family: var(--brand-font);
    font-size: 1.5rem;
    color: #1f2937;
}
.modal-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    line-height: 1;
    padding: 0;
}
.modal-close-x:hover {
    background: #dc2626;
    transform: scale(1.1) rotate(90deg);
}
.modal-close-x:active {
    transform: scale(0.95) rotate(90deg);
}
.modal-date-display {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
    margin: -0.5rem 0 1rem 0;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    text-align: center;
}
.modal-date-selector {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 2px solid #d1d5db;
}
.modal-date-selector label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.date-selector-row {
    display: flex;
    gap: 0.5rem;
}
.date-selector-row select {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Quicksand', sans-serif;
    background: white;
    cursor: pointer;
}
.date-selector-row select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.date-selector-row select:hover {
    border-color: #9ca3af;
}
.date-selector-row select option {
    background: #1f2937;
    color: white;
}
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-weight: 600;
    color: #374151;
}
.form-group input, .form-group select {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-group input:hover, .form-group select:hover {
    border-color: #9ca3af;
}
/* Transfer-code box in the import modal */
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-family: monospace;
    resize: vertical;
    word-break: break-all;
}
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}
.form-group select {
    background: white;
    cursor: pointer;
}
.form-group select option {
    background: #1f2937;
    color: white;
}
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.form-group input[type="number"] {
    -moz-appearance: textfield;
}
.time-error {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
    margin: -0.5rem 0 0.5rem 0;
    padding: 0.5rem;
    background: #fee2e2;
    border-radius: 0.5rem;
    text-align: center;
    border-left: 4px solid #dc2626;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}
.modal-actions button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-save {
    background: #3b82f6;
    color: white;
}
.modal-save:hover {
    background: #2563eb;
    transform: scale(1.02);
}
.modal-cancel {
    background: #e5e7eb;
    color: #374151;
}
.modal-cancel:hover {
    background: #d1d5db;
}
.modal-delete {
    background: #ef4444;
    color: white;
}
.modal-delete:hover {
    background: #dc2626;
    transform: scale(1.02);
}
.modal-reset {
    background: #f59e0b;
    color: white;
}
.modal-reset:hover {
    background: #d97706;
    transform: scale(1.02);
}
.event-list-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.event-list-modal-overlay.show {
    opacity: 1;
}
.event-list-modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    overscroll-behavior: contain;
}
.event-list-modal-overlay.show .event-list-modal-content {
    transform: scale(1) translateY(0);
}
.event-list-modal-content .events-panel {
    border-radius: 1rem;
    box-shadow: none;
    max-height: 85vh;
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.modal-close-btn:hover {
    background: #dc2626;
    transform: scale(1.1) rotate(90deg);
}
.modal-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}
.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}
.settings-section:last-of-type {
    border-bottom: none;
}
.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin-bottom: 0;
}
.settings-section-header:hover {
    background: #f3f4f6;
}
.settings-section-header h4 {
    margin: 0;
    color: #1f2937;
    font-family: var(--brand-font);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.settings-section-icon {
    font-size: 1.2rem;
}
.settings-collapse-arrow {
    font-size: 1.5rem;
    color: #6b7280;
    transition: transform 0.3s ease;
}
.settings-section.collapsed .settings-collapse-arrow {
    transform: rotate(-90deg);
}
.settings-section-content {
    padding: 1rem 1.25rem;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.settings-section.collapsed .settings-section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.setting-item {
    margin-bottom: 1rem;
}
.setting-item label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}
.setting-item select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    background: white;
    cursor: pointer;
}
.setting-item select:focus {
    outline: none;
    border-color: #3b82f6;
}
.setting-description {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 3px solid #3b82f6;
    line-height: 1.5;
}
.setting-description a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}
.setting-description a:hover {
    text-decoration: underline;
}
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}
.toggle-label:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.toggle-label span:first-child {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.05rem;
}
.toggle-label input[type="checkbox"] {
    display: none;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    background: #cbd5e1;
    border-radius: 34px;
    transition: background 0.3s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}
.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: #22c55e;
}
.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(26px);
}
.special-events-list {
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}
.no-special-events {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}
.special-event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
.special-event-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.special-event-details {
    flex: 1;
}
.special-event-details strong {
    color: #1f2937;
    font-size: 1rem;
}
.edit-special-event, .delete-special-event {
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    color: white;
}
.edit-special-event {
    background: #3b82f6;
    margin-right: 0.25rem;
}
.edit-special-event:hover {
    background: #2563eb;
    transform: scale(1.1);
}
.delete-special-event {
    background: #ef4444;
    font-size: 1.5rem;
}
.delete-special-event:hover {
    background: #dc2626;
    transform: scale(1.1);
}
.add-special-event-btn, .create-theme-btn {
    width: 100%;
    padding: 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.2s;
}
.add-special-event-btn:hover {
    background: #2563eb;
    transform: scale(1.02);
}
.create-theme-btn {
    background: #a855f7;
}
.create-theme-btn:hover:not(:disabled) {
    background: #9333ea;
    transform: scale(1.02);
}
.create-theme-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}
.emoji-picker-container {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}
.emoji-picker-button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.2s;
    white-space: normal;
    text-align: center;
}
.emoji-picker-button:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    transform: scale(1.02);
}
.selected-emoji-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 120px;
    transition: all 0.2s;
}
.selected-emoji-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.selected-emoji-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.emoji-picker-modal {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.emoji-picker-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}
.emoji-picker-header h3 {
    margin: 0;
}
.emoji-picker-header .modal-close-btn {
    position: static;
    margin: 0;
}
.emoji-categories {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}
.emoji-category-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.emoji-category-btn:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}
.emoji-category-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    flex: 1;
    min-height: 0;
}
.emoji-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}
.emoji-item:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    transform: scale(1.15);
}
.emoji-item:active {
    transform: scale(0.95);
}
.screensaver-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #000000 !important;
    z-index: 99999;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
    overflow: hidden;
}
.screensaver-overlay.active {
    opacity: 1;
}
.screensaver-content {
    text-align: center;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 8s ease-in-out;
    will-change: transform;
    pointer-events: none;
}
.screensaver-calendar-icon {
    width: 160px;
    height: 160px;
    background: linear-gradient(to bottom, #ef4444 0%, #dc2626 35%, #ffffff 35%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    overflow: hidden;
    position: relative;
}
.calendar-top {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 900;
    font-family: 'Quicksand', sans-serif;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.calendar-date {
    margin-top: 30px;
    font-size: 4.5rem;
    font-weight: 900;
    color: #1f2937;
    font-family: 'Quicksand', sans-serif;
    line-height: 1;
}
.screensaver-time {
    font-family: 'Quicksand', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    color: #ffffff;
}
.screensaver-date {
    font-family: 'Quicksand', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.screensaver-weather {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.screensaver-hint {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    animation: screensaverHintPulse 2s ease-in-out infinite;
}
@keyframes screensaverHintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}
/* Events listed on the big holiday cells (Halloween, Thanksgiving...) sit on
   a dark gradient in the default and dark themes (light and pastel use pale
   ones): light text with a shadow so they stay readable */
body:not(.light-theme):not(.pastel-theme) .day-cell.special-day .day-event-item {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
