/* Main Container */
.mht-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.mht-container h1, .mht-container h2, .mht-container h3 {
    color: #333;
}
.mht-info {
    background-color: #eaf2fa;
    border-left: 4px solid #3498db;
    padding: 10px 15px;
    margin: 20px 0;
}

/* Add Habit Form */
.mht-add-habit-form {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
    margin-bottom: 30px;
}
.mht-add-habit-form form {
    display: flex;
    gap: 10px;
}
.mht-add-habit-form input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.mht-add-habit-form button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.mht-add-habit-form button:hover {
    background-color: #229954;
}

/* Habit Card */
.mht-habit-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}
.mht-habit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.mht-habit-header h2 {
    margin: 0;
    font-size: 1.5em;
}
.mht-delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
}
.mht-delete-btn:hover {
    background-color: #c0392b;
}
.mht-start-date {
    font-style: italic;
    color: #777;
    margin-bottom: 20px;
}

/* Habit Grid */
.mht-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.mht-day-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1; /* Makes the box a square */
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease-in-out;
}
.mht-day-box:not(.future):hover {
    background-color: #e8f4fd;
    border-color: #3498db;
}
.mht-day-box.checked {
    background-color: #2ecc71;
    border-color: #27ae60;
    color: white;
}
.mht-day-box.future {
    background-color: #f2f2f2;
    color: #aaa;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

/* Reports */
.mht-reports {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.mht-reports h3, .mht-reports h4 {
    margin-bottom: 10px;
}
.mht-reports p {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 600px) {
    .mht-grid {
        gap: 5px;
    }
    .mht-day-box {
        font-size: 0.8em;
    }
    .mht-habit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .mht-add-habit-form form {
        flex-direction: column;
    }
}