body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.calendar-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    width: 1000px;
    padding: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.calendar-header button {
    padding: 10px 20px;
    border: none;
    background-color: #4a90e2;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.calendar-header button:hover {
    background-color: #357abd;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e1e4e8;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
}

.day-name {
    background-color: #f8f9fa;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.days-grid {
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.days-grid .day-cell {
    background-color: #fff;
    min-height: 120px;
    padding: 12px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: background-color 0.15s;
}

.days-grid .day-cell:hover {
    background-color: #f4f8fc;
}

.day-cell.empty {
    background-color: #f8f9fa;
    cursor: default;
}

.day-number {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
}

.today .day-number {
    background-color: #4a90e2;
    color: white;
}

.day-note-preview {
    font-size: 0.85rem;
    color: #666;
    background-color: #eef2f5;
    padding: 6px;
    border-radius: 4px;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.has-note {
    border-left: 4px solid #4a90e2;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background-color: #fff;
    border: 1px solid #e1e4e8;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    z-index: 1000;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 1;
    transform: translateY(0);
}

.tooltip.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.note-display {
    white-space: pre-wrap;
    font-size: 0.95rem;
    color: #333;
}

.note-display.empty {
    color: #888;
    font-style: italic;
}

.note-display.hidden {
    display: none;
}

.note-editor.hidden {
    display: none;
}

.tooltip textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #d1d5da;
    padding: 12px;
    box-sizing: border-box;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.tooltip textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.tooltip-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tooltip button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

#saveNote {
    background-color: #28a745;
    color: white;
}

#saveNote:hover {
    background-color: #218838;
}

#closeNote {
    background-color: #f1f3f5;
    color: #495057;
}

#closeNote:hover {
    background-color: #e2e6ea;
}
