:root {
    --bg-color: #ffffff;
    --text-primary: #000000;
    --text-secondary: #888888;
    --icon-color: #bbbbbb;
    --item-hover: #f9f9f9;
    --accent: #007aff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', ui-sans, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.app-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#current-date-title {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    min-width: 250px;
    cursor: pointer;
    user-select: none;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

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

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    opacity: 1;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f5f5f5;
}

.icon-btn img {
    width: 20px;
    height: 20px;
    opacity: 1;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
}

/* Task List */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.task-item {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    padding: 6px 0;
    border-radius: 6px;
}

.task-checkbox-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 24px;
    height: 24px;
}

.task-checkbox-btn img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.task-item .todo-img {
    opacity: 1;
    transform: scale(1);
}

.task-item .todo-complete-img {
    opacity: 0;
    transform: scale(0.5);
}

.task-item.completed .todo-img {
    opacity: 0;
    transform: scale(1.5);
}

.task-item.completed .todo-complete-img {
    opacity: 1;
    transform: scale(1);
}

.task-text {
    margin-left: 0.75rem;
    flex: 1;
    transition: color 0.2s;
    user-select: none;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.tasks-container {
    padding-bottom: 0;
}

.task-actions {
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
    visibility: visible;
}

.gcal-btn, .trash-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.gcal-btn img, .trash-btn img {
    width: 20px;
    height: 20px;
    opacity: 1;
    transition: transform 0.2s;
}

.gcal-btn:hover img, .trash-btn:hover img {
    transform: scale(1.1);
}

/* Edit Input */
.edit-task-input {
    flex: 1;
    margin-left: 0.75rem;
    font-size: 1.25rem;
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* Input Row */
.task-input-row {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    padding: 6px 0;
    gap: 0.75rem;
}

.placeholder-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

#task-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.25rem;
    font-family: inherit;
    background: transparent;
    padding: 0;
}

#task-input::placeholder {
    color: #cccccc;
}

.minimal-select {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    padding-right: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-input-row:focus-within .minimal-select {
    opacity: 1;
}

.minimal-select:hover {
    color: var(--text-primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    max-width: 440px;
    width: 90%;
    border: 1px solid #f0f0f0;
}

.modal-content h2 {
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.modal-content ul {
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-content li {
    margin-bottom: 0.75rem;
}

.modal-content strong {
    color: var(--text-primary);
}

.help-section {
    margin-bottom: 1.25rem;
}

.help-section strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 16px;
}

.help-section p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.close-btn {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    width: 100%;
}

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

/* Focus Mode */
body.focus-mode .icon-btn,
body.focus-mode .task-actions {
    opacity: 0 !important;
    visibility: hidden;
    transition: all 0.3s ease;
}

body.focus-mode .nav-controls:hover .icon-btn,
body.focus-mode .top-right-stack:hover .icon-btn,
body.focus-mode .icon-btn:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

body.focus-mode .task-item:hover .task-actions {
    opacity: 1 !important;
    visibility: visible !important;
}


body.focus-mode .task-input-row:focus-within .placeholder-icon,
body.focus-mode .task-input-row:hover .placeholder-icon {
    opacity: 0.15 !important;
}

.top-right-stack {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 100;
}

@media (max-width: 600px) {
    body {
        padding-top: 5rem;
    }

    .top-right-stack {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        flex-direction: row;
        gap: 0.2rem;
    }

    .app-wrapper {
        padding: 0 1.5rem;
    }

    .header {
        flex-direction: row;
        align-items: center;
    }

    #current-date-title {
        font-size: 2.25rem;
        min-width: auto;
    }

    .nav-controls {
        gap: 0.2rem;
    }

    .task-actions {
        opacity: 0.8 !important; /* Always visible on mobile */
        visibility: visible !important;
    }

    .icon-btn {
        opacity: 0.8 !important;
        visibility: visible !important;
    }
}