body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #37352f;
    background-color: #ffffff;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 20px 20px; /* Updated padding to account for fixed nav */
}

.date-header {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e6e6e6;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.date-tooltip {
    visibility: hidden;
    background-color: #37352f;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 16px;
}

.date-header:hover .date-tooltip {
    visibility: visible;
    opacity: 1;
}

.habit-list {
    list-style-type: none;
    padding: 0;
}

.habit-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
    transition: all 0.3s ease;
}

/* Animation classes for habit reordering */
.habit-moving-down {
    background-color: #f0f9ff;
    transform: translateX(10px);
    box-shadow: 0 2px 8px rgba(46, 170, 220, 0.2);
}

.habit-moving-up {
    background-color: #fff7ed;
    transform: translateX(-10px);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.2);
}

/* Shame removal animation for negative habits */
.habit-shame-removal {
    background-color: #fee2e2 !important;
    border-left: 4px solid #dc2626;
    animation: shameShake 0.4s ease-in-out;
}

.habit-shame-removal .habit-checkbox {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    animation: pulseRed 0.3s ease-in-out;
}

.habit-slide-out {
    animation: shameSlideOut 1.2s ease-in-out forwards;
}

@keyframes shameShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes pulseRed {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #b91c1c; }
    100% { transform: scale(1); }
}

@keyframes shameSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
        max-height: 60px;
        padding: 12px 0;
        margin: 0;
    }
    30% {
        transform: translateX(20px);
        opacity: 0.7;
    }
    100% {
        transform: translateX(150px);
        opacity: 0;
        max-height: 0;
        padding: 0;
        margin: 0;
        border-bottom-width: 0;
    }
}

.habit-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.habit-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.habit-right {
    min-width: 90px;
    text-align: right;
}

.habit-streak {
    font-size: 15px;
    font-weight: 500;
    color: #2eaadc;
    letter-spacing: 0.5px;
}

.habit-checkbox {
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border: 2px solid #e6e6e6;
    border-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.habit-checkbox:checked {
    background-color: #2eaadc;
    border-color: #2eaadc;
}

.habit-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.habit-name {
    font-size: 16px;
    margin-left: 5px;
    flex-grow: 1;
}

.habit-checkbox:checked + .habit-name {
    text-decoration: line-through;
    color: #b1b1b1;
}

.habit-add-button {
    display: inline-block;
    background-color: #2eaadc;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.habit-add-button:hover {
    background-color: #1d8bb8;
    transform: scale(1.05);
}

.habit-add-button a {
    color: white;
    text-decoration: none;
}

.habit-add-button a:hover {
    text-decoration: underline;
}