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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Override user-select for input fields */
input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    height: 100vh; /* Fallback for older browsers */
    height: calc(var(--vh, 1vh) * 100); /* Custom viewport height for PWA fixes */
    height: 100dvh; /* Dynamic viewport height - adjusts for URL bar on mobile */
    /* PWA fixes */
    height: 100svh; /* Small viewport height - more reliable for PWAs */
    overflow: hidden; /* Prevent body from growing beyond viewport */
}

.app {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.header {
    padding: calc(16px + env(safe-area-inset-top)) 20px 16px 20px;
    background-color: #000000;
    position: sticky;
    top: 0;
    z-index: 10;
}

.day-progress-bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    position: sticky;
    top: calc(env(safe-area-inset-top) + 64px); /* Stick below header */
    z-index: 100; /* High enough for indicators to be visible above content */
    overflow: visible; /* Allow indicators to be visible */
}

.day-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #9d4edd 0%, #9d4edd 100%);
    width: 0%;
}

.day-progress-fill.no-location {
    background: #ffffff;
}

.day-progress-fill.with-location {
    background: linear-gradient(to right, #9d4edd 0%, #9d4edd 100%);
}

.sunrise-indicator,
.sunset-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #000000;
    padding: 4px;
    border-radius: 2px;
}

.sunrise-indicator {
    left: 25%; /* 6am = 6/24 = 25% of the day */
}

.sunset-indicator {
    left: 79.17%; /* 7pm = 19/24 = 79.17% of the day */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content.centered {
    justify-content: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
}

.day {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 42px;
    font-weight: 900; /* Black weight */
    color: #ffffff;
    line-height: 100%;
    letter-spacing: -0.03em; /* -3% */
}

.date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.date-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700; /* Bold weight */
    color: #ffffff;
    line-height: 100%;
    letter-spacing: -0.01em; /* -1% */
}

.date-year {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700; /* Bold weight */
    color: #ffffff;
    opacity: 0.8; /* 80% opacity */
    line-height: 100%;
    letter-spacing: -0.01em; /* -1% */
}

.remaining-time {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700; /* Bold weight */
    color: #ffffff;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: right;
    font-variant-numeric: lining-nums tabular-nums;
    padding: 10px 16px;
    background-color: rgba(255, 255, 255, 0.2); /* White with 20% opacity */
    border-radius: 18px; /* Pill shape - half of 36px height */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.remaining-time:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.remaining-time.zero {
    color: #666;
}

.header-settings {
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-settings:hover {
    background-color: #222;
    color: #fff;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent overflow */
}

.input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000000;
    padding: 20px;
    border-top: 1px solid #333;
    z-index: 10;
}

#taskInput {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    background-color: #111;
    border: 1px solid #333;
    border-radius: 12px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Prevent zoom on iOS */
    font-size: 16px;
}

#taskInput:focus {
    border-color: #666;
}

#taskInput::placeholder {
    color: #666;
}

.task-list {
    list-style: none;
    flex: 1;
    overflow-y: auto; /* Only scroll when content overflows */
    min-height: 0; /* Allow flex item to shrink */
    padding-bottom: calc(160px + env(safe-area-inset-bottom)); /* ensure last item clears bottom nav gradient */
    /* Prevent scrolling when content fits */
    overscroll-behavior: contain;
}

.task-item {
    position: relative;
    flex-shrink: 0; /* Prevent items from shrinking */
    overflow: hidden;
}

.task-item.swiping {
    transition: none; /* Disable transition during active swipe */
}

.delete-background {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #666;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    pointer-events: none;
}

.task-content {
    position: relative;
    display: flex;
    align-items: center;
    padding: 24px 20px 24px 24px;
    gap: 16px;
    flex-shrink: 0;
    /* Custom dashed border: 2px dash, 5px gap */
    background-image: 
        repeating-linear-gradient(
            to right,
            #4F4F4F 0px,
            #4F4F4F 2px,
            transparent 2px,
            transparent 7px
        );
    background-size: 7px 2px;
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-color: #000000;
    transition: transform 0.3s ease;
}

.task-item.delete-threshold .delete-background {
    background-color: #ff4444;
}



.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: transparent;
    flex-shrink: 0;
}

.task-checkbox.checked {
    background-color: #666;
    border-color: #666;
    position: relative;
}

.task-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-size: 14px;
    font-weight: bold;
}

.task-checkbox.checked.animate {
    animation: checkboxBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.task-checkbox.checked.animate::after {
    color: #000000;
}

.task-item.animate .task-text {
    animation: textColorFade 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes checkboxBounce {
    0% {
        transform: scale(1.5);
        background-color: #ffffff;
        border-color: #ffffff;
    }
    100% {
        transform: scale(1);
        background-color: #666;
        border-color: #666;
    }
}

@keyframes textColorFade {
    0% {
        color: #ffffff;
    }
    100% {
        color: #666;
    }
}

.task-text {
    flex: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.3rem;
    font-weight: 700; /* Bold weight */
    line-height: 135%;
    color: #ffffff;
    cursor: pointer;
    word-break: break-word;
}

.task-text.completed {
    color: #666;
}

.task-item.no-name {
    cursor: pointer;
}

.task-item.no-name .task-text {
    opacity: 0.5;
}

.task-duration {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 700; /* Bold weight */
    color: #ffffff;
    line-height: 100%;
    letter-spacing: 0%;
    font-variant-numeric: lining-nums tabular-nums;
    padding: 4px 8px;
    background-color: #333;
    border-radius: 10px;
    margin-left: 8px;
    display: inline-block;
}

.task-duration.completed {
    color: #666;
}

.task-delete {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.task-delete:hover {
    color: #ff4444;
}



.modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border: none;
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #000;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #000;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.modal-footer {
    padding: 0 24px 24px 24px;
}

.modal-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 20px 0;
}

.clear-button {
    width: 100%;
    padding: 16px;
    background-color: #ff4444;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 20px;
}

.clear-button:hover {
    background-color: #ff6666;
}

.close-button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: #333;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

.setting-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}

.setting-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.setting-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* font-size: 0.875rem; */
    font-weight: 400;
    color: #888;
}

.toggle-checkmark {
    margin-right: 6px;
    font-weight: bold;
}

.time-display {
    background-color: #333;
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 60px;
}

.time-display:hover {
    background-color: #444;
}

.toggle-btn {
    background-color: #333;
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 60px;
}

.toggle-btn:hover {
    background-color: #444;
}

.clear-all-btn {
    width: 100%;
    background-color: #8B0000;
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-all-btn:hover {
    background-color: #A00000;
}

.setting-item {
    position: relative;
}

.setting-item:not(:last-child) {
    border-bottom: 1px solid #333;
}

.setting-link {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.setting-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.setting-arrow {
    color: #666;
    font-weight: 300;
}

.version-item {
    justify-content: center;
    padding: 16px 24px;
}

.version-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: #666;
    text-align: center;
}

.setting-item input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* New Day Modal */
.new-day-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.new-day-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    line-height: 1.35;
}

.new-day-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.new-day-description {
    opacity: 0.9;
    flex-shrink: 0;
}

.unfinished-tasks-wrapper {
    flex: 1;
    position: relative;
    max-height: 380px;
    min-height: 0;
    overflow: hidden;
}

.unfinished-tasks {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
    max-height: 380px;
    padding-bottom: 40px;
}

.scroll-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent 0%, #1a1a1a 100%);
    pointer-events: none;
    z-index: 10;
}

.unfinished-task {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 2px dashed #4f4f4f;
}

.unfinished-task:first-child {
    border-top: 2px dashed #4f4f4f;
}

.unfinished-task-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
    line-height: 1.35;
}

.unfinished-task-duration {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    opacity: 0.8;
    text-align: right;
    white-space: nowrap;
}

.new-day-actions {
    width: 100%;
    flex-shrink: 0;
}

.clear-today-btn {
    width: 100%;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 1000px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 13px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    line-height: 1.35;
    text-align: center;
}

.clear-today-btn strong {
    font-weight: 700;
}

.clear-today-btn:hover {
    background-color: #f0f0f0;
}

.clear-today-btn:active {
    background-color: #e0e0e0;
}

/* Onboarding Modal */
.onboarding-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.5;
    margin: 16px 24px;
    opacity: 0.9;
}

.onboarding-btn {
    width: 100%;
    background-color: #222;
    color: #ffffff;
    border: none;
    border-radius: 1000px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 24px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.onboarding-btn:hover {
    background-color: #333;
}

.onboarding-btn:active {
    background-color: #444;
}

/* Video Modal */
.video-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
}

.video-container {
    flex: 1;
    max-height: calc(90vh - 80px); /* Account for modal header */
    overflow: hidden;
}

.video-container iframe {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    max-height: calc(90vh - 80px); /* Account for modal header */
}

/* Add Task Overlay */
.add-task-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
    /* Prevent viewport changes when keyboard appears */
    height: 100%;
    overflow: hidden;
    /* Prevent any scrolling within the overlay */
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    /* Chrome-specific fixes */
    overscroll-behavior: none;
    -webkit-overscroll-behavior: none;
    overscroll-behavior-y: none;
    -webkit-overscroll-behavior-y: none;
}

.add-task-overlay.show {
    display: flex;
}

.add-task-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.add-task-row {
    width: 100%;
    height: 64px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.add-task-input-area {
    flex: 1;
    background-color: #1f1f1f;
    padding: 20px 20px 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.add-task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #8c8c8c;
    border-radius: 8px;
    flex-shrink: 0;
    position: relative;
}

.add-task-checkbox.checked {
    background-color: #666;
    border-color: #666;
}

.add-task-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-size: 14px;
    font-weight: bold;
}

.add-task-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    opacity: 1;
    /* Ensure proper text selection and cursor movement on Android */
    user-select: text;
    -webkit-user-select: text;
    touch-action: manipulation;
    -webkit-touch-callout: default;
}

.add-task-input::placeholder {
    color: #ffffff;
    opacity: 0.4;
}

.add-task-button-area {
    width: 64px;
    background-color: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.add-task-submit {
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-task-submit:hover {
    background-color: #f0f0f0;
}

.add-task-submit:active {
    background-color: #e0e0e0;
}

.add-task-submit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-task-submit-icon svg {
    color: #000000;
    width: 16px;
    height: 16px;
}

/* Duration Pills */
.duration-pills-container {
    width: 100%;
    background-color: #0f0f0f;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.duration-pills-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.duration-pill {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 100%;
    letter-spacing: 0%;
    font-variant-numeric: lining-nums tabular-nums;
    padding: 10px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.duration-pill:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.duration-pill.selected {
    background-color: #ffffff;
    color: #000000;
}

/* Toast Notification */
.toast {
    position: absolute;
    bottom: calc(var(--bottom-nav-height, 100px) + 16px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.20);
    color: #ffffff;
    padding: 4px 12px 4px 8px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.undo-link {
    color: #ffffff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
}

.undo-link:hover {
    opacity: 0.8;
}

.toast svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Time Picker Grid */
.time-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.time-option {
    background-color: #333;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.time-option:hover {
    background-color: #444;
}

.time-option.selected {
    background-color: #ffffff;
    color: #000000;
}

#yesterdayTasks {
    list-style: none;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

#yesterdayTasks li {
    padding: 12px 0;
    border-bottom: 1px solid #333;
    color: #ccc;
}

#yesterdayTasks li:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    display: none;
    text-align: center;
    padding: 0 20px 150px;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-state.show {
    display: flex;
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.dotted-line {
    width: 120px;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #666 0px,
        #666 4px,
        transparent 4px,
        transparent 8px
    );
    margin: 0 auto 20px auto;
}

.empty-state-text {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 8px;
    text-align: center;
}

/* Add Task Prompt */
.add-task-prompt {
    position: absolute;
    bottom: calc(100px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 200;
    display: none;
}

.add-task-prompt.show {
    display: block;
}

.add-task-text {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.add-task-arrow {
    font-size: 1.2rem;
    color: #888;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.44) 18.27%, rgba(0, 0, 0, 0.71) 45.67%, #000 70.19%);
    padding: 100px 20px calc(20px + env(safe-area-inset-bottom)) 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.nav-btn svg {
    fill: currentColor;
}

.sort-btn, .settings-btn {
    width: 80px;
    height: 48px;
    background-color: #222;
    border-radius: 1000px;
}

.add-btn {
    width: 120px;
    height: 56px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 28px;
}

.sort-btn:hover, .settings-btn:hover {
    background-color: #333;
    color: #ffffff;
}

.add-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Legacy input container (hidden by default) */
.input-container.legacy {
    display: none;
}

/* Responsive design */
@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .input-container {
        padding: 15px;
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    .app {
        padding-top: env(safe-area-inset-top);
    }
    
    .input-container {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Update Notification */
.update-notification {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #ccc;
    color: #000000;
    z-index: 1000;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

.update-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-content span {
    font-weight: 600;
    color: #000000;
}

.update-btn {
    background: #000000;
    border: none;
    color: white;
    padding: 8px 20px 8px 16px;
    border-radius: 1000px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.update-btn:hover {
    background: #333333;
}

.update-btn:active {
    transform: translateY(0);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Adjust app padding when update notification is shown */
.update-notification + .app {
    padding-top: 60px;
}

@media (display-mode: standalone) {
    .update-notification + .app {
        padding-top: calc(60px + env(safe-area-inset-top));
    }
}