/* ==================== CUSTOM FONTS ==================== */

/* Themysion Font - For Headers/Titles */
@font-face {
    font-family: 'Themysion';
    src: url('../fonts/themysion.regular-webfont.woff2') format('woff2'),
        url('../fonts/themysion.regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Core Bandi Face Font - For Body Text */
@font-face {
    font-family: 'Core Bandi Face';
    src: url('../fonts/CoreBandiFaceW01-Regular.woff2') format('woff2'),
        url('../fonts/CoreBandiFaceW01-Regular.woff') format('woff'),
        url('../fonts/CoreBandiFaceW01-Regular') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Core Bandi Face', Arial, sans-serif;
    background-color: #fffadd;
    color: #333;
    line-height: 1.6;
}

/* ==================== HEADER ==================== */
.main-header {
    text-align: center;
    padding: 30px 20px 10px;
    background-color: #fffadd;
    border-bottom: none;
}

.main-header h1 {
    font-family: 'Themysion', cursive;
    font-size: 9rem;
    color: #850d31;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: -40px;
}

.main-header h2 {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 1.5rem;
    font-weight: normal;
    color: #850d31;
    text-transform: uppercase;

    margin-top: 0;
}

/* ==================== MAIN CONTAINER ==================== */
.main-container {
    display: flex;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    position: relative;
}

/* ==================== SIDEBAR NAVIGATION ==================== */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 40px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    max-height: 100vh;
    z-index: 100;
    margin-left: -20px;
}

.sidebar-btn {
    font-family: 'Core Bandi Face', sans-serif;
    background-color: #850d31;
    color: white;
    border: none;
    padding: 5px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    border-bottom: 1px solid rgba(107, 10, 38, 0.3);

}

.sidebar-btn:last-child {
    border-bottom: none;
}

.sidebar-btn:hover {
    background-color: #9d1139;
    transform: translateX(8px);
    z-index: 10;
}

.sidebar-btn.active {
    background-color: #b52d56;
    transform: translateX(35px);
    font-weight: bold;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
    border-radius: 0 8px 8px 0;
    padding-left: 70px;
    /* makes tab longer */
    margin-left: -35px;
    /* hides the extra length */
}

.vertical-text {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    font-size: 1.2rem;
    /* from ~1.5rem */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transform: rotate(180deg);
}

/* ==================== CONTENT AREA ==================== */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-box {
    background-color: #fffadd;
    border: 2px solid #850d31;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(133, 13, 49, 0.15);
}

.content-box h3 {
    font-family: 'Themysion', cursive;
    font-size: 6rem;
    text-align: center;

    color: #850d31;
    font-weight: normal;
    line-height: 1.2;

}

/* ==================== MOOD TRACKER SECTION ==================== */
.mood-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.mood-subheading,
.legend-label {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mood-subheading {
    margin-bottom: 15px;
    text-align: center;
}

.mood-legend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.mood-colors,
.mood-item {
    display: flex;
    gap: 8px;
}

.mood-colors {
    gap: 20px;
    flex-wrap: wrap;
}

.mood-item {
    flex-direction: column;
    align-items: center;
}

.mood-color {
    width: 80px;
    height: 40px;
    border: 2px solid #850d31;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-color.happy,
.mood-color.sad,
.mood-color.angry,
.mood-color.productive,
.mood-item span {
    text-align: center;
}

.mood-color.happy {
    background-color: #FFF9A6;
}

.mood-color.sad {
    background-color: #A8D8EA;
}

.mood-color.angry {
    background-color: #FFB6C1;
}

.mood-color.productive {
    background-color: #B4E7CE;
}

.mood-item span {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 1.1rem;
    color: #333;
}

.year-calendar {
    margin-top: 30px;
}

/* ==================== NOTEPAD STYLE SECTIONS ==================== */
.notepad-area {
    padding: 20px 0;
}

.notepad-line {
    margin-bottom: 25px;
}

.notepad-line label {
    font-family: 'Core Bandi Face', sans-serif;
    display: block;
    font-weight: bold;
    font-size: 0.95rem;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.notepad-input,
.date-input {
    font-family: 'Core Bandi Face', sans-serif;
    padding: 8px 0;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    color: #850d31;
    outline: none;
    width: 100%;
}

.notepad-input {
    min-height: 30px;
    border-bottom: 1px solid #850d31;
}

.notepad-input.large {
    min-height: 200px;
    border-bottom: none;
    padding: 10px 0;
    line-height: 1.8;
}

.notepad-input:focus {
    border-bottom: 2px solid #850d31;
}

.notepad-input.large:focus {
    border-bottom: none;
}

.date-input {
    border-bottom: 1px solid #850d31;
}

.date-input:focus {
    border-bottom: 2px solid #850d31;
}

/* ==================== IMAGE UPLOAD ==================== */
.image-upload-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-input {
    font-family: 'Core Bandi Face', sans-serif;
    padding: 8px;
    border: 2px solid #850d31;
    border-radius: 6px;
    background-color: #fff;
    color: #850d31;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-input:hover {
    background-color: #fffadd;
}

.image-preview {
    width: 100%;
    max-height: 300px;
    border: 2px solid #850d31;
    border-radius: 6px;
    overflow: hidden;
    display: none;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== SAVE BUTTON ==================== */
.save-btn {
    font-family: 'Core Bandi Face', sans-serif;
    background-color: #850d31;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.save-btn:hover {
    background-color: #b52d56;
    transform: scale(1.05);
}

/* ==================== PLANNER SECTION ==================== */
.planner-subtitle {
    font-family: 'Core Bandi Face', sans-serif;
    text-align: center;
    font-style: normal;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #850d31;
}

.planner-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planner-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.planner-header label {
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.planner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.planner-box {
    min-height: 120px;
    border: 2px solid #850d31;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 1rem;
    color: #850d31;
    outline: none;
    cursor: text;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.planner-box:hover {
    box-shadow: 0 2px 8px rgba(133, 13, 49, 0.15);
    transform: translateY(-2px);
}

.planner-box:focus {
    box-shadow: 0 0 0 2px #850d31;
    border-radius: 8px;
    cursor: pointer;
}

/* ==================== PLANNER PAGINATION ==================== */
.planner-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planner-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.pagination-btn {
    font-family: 'Core Bandi Face', sans-serif;
    background-color: #850d31;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #b52d56;
    transform: scale(1.05);
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}

.page-info {
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 80px;
    text-align: center;
}

/* ==================== PLANNER NOTE FORM ==================== */
.planner-note-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fffadd;
    border: 3px solid #850d31;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.planner-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #850d31;
    padding-bottom: 10px;
}

.planner-form-header h3 {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 1.5rem;
    color: #850d31;
    text-transform: uppercase;
    margin: 0;
}

.form-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #850d31;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
}

.form-close-btn:hover {
    transform: rotate(90deg);
}

.planner-form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.planner-form-group label {
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.planner-form-group input[type="date"],
.planner-form-group textarea,
.planner-form-group input[type="file"] {
    font-family: 'Core Bandi Face', sans-serif;
    border: 2px solid #850d31;
    border-radius: 6px;
    padding: 10px;
    font-size: 1rem;
    color: #850d31;
    background-color: #fff;
}

.planner-form-group textarea {
    resize: vertical;
    min-height: 120px;
    outline: none;
}

.planner-form-group textarea:focus {
    box-shadow: 0 0 0 2px #850d31;
}

.planner-form-image-preview {
    margin-top: 10px;
    max-height: 200px;
    border-radius: 6px;
    overflow: hidden;
}

.planner-form-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.planner-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.planner-form-save,
.planner-form-delete {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.planner-form-save {
    background-color: #850d31;
    color: white;
}

.planner-form-save:hover {
    background-color: #b52d56;
    transform: scale(1.05);
}

.planner-form-delete {
    background-color: #fff;
    color: #850d31;
    border: 2px solid #850d31;
}

.planner-form-delete:hover {
    background-color: #ffe6f0;
}

/* ==================== FOOTER ==================== */
.main-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    background-color: #fffadd;
    border-top: none;
}

.signature {
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: normal;
    font-size: 0.85rem;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .main-header {
        padding: 20px 20px 5px;
    }

    .main-header h1 {
        font-size: 3.5rem;
        margin-bottom: -20px;
    }

    .main-header h2 {
        font-size: 1.2rem;
        margin-top: 10px;
    }

    .content-box h3 {
        font-size: 2.5rem;
    }

    .main-container {
        flex-direction: row;
    }

    .sidebar-nav {
        flex-direction: column;
        width: auto;
        min-width: 35px;
        height: auto;
        max-height: none;
        margin-left: 0;
        position: sticky;
        top: 0;
        align-self: flex-start;
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 100;
        max-height: 100vh;
    }

    .sidebar-btn {
        border-right: none;
        border-bottom: 1px solid rgba(107, 10, 38, 0.3);
        padding: 5px 10px;
        flex: 1;
        white-space: nowrap;
        min-width: fit-content;
    }

    .sidebar-btn.active {
        transform: translateX(20px);
        margin-left: -20px;
        padding-left: 50px;
        border-radius: 0 8px 8px 0;
    }

    .vertical-text {
        writing-mode: vertical-lr;
        text-orientation: mixed;
        font-size: 1.2rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        transform: rotate(180deg);
    }

    .content-area {
        padding: 20px;
    }

    .mood-legend-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== YEAR CALENDAR STYLES ==================== */
/* ADD THIS SECTION TO THE END OF YOUR EXISTING styles.css FILE */

.year-calendar {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.month-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.month-label {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    margin-bottom: 5px;
}

.days-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #850d31;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: #fff;
}

.day-box:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(133, 13, 49, 0.3);
    z-index: 10;
}

.day-box.selected {
    border: 3px solid #850d31;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #850d31;
}

/* Mood colors - matches your legend */
.day-box.happy,
.mood-option.happy {
    background-color: #FFF9A6;
}

.day-box.sad,
.mood-option.sad {
    background-color: #A8D8EA;
}

.day-box.angry,
.mood-option.angry {
    background-color: #FFB6C1;
}

.day-box.productive,
.mood-option.productive {
    background-color: #B4E7CE;
}

/* Indicators for journal/planner entries */
.day-box.has-journal::before,
.day-box.has-planner::after {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.day-box.has-journal::before {
    top: 2px;
    right: 2px;
    content: '';
    background-color: #850d31;
}

.day-box.has-planner::after {
    bottom: 2px;
    right: 2px;
    content: '';
    background-color: #d4af37;
    border: 1px solid #850d31;
}

/* ==================== MOOD SELECTOR POPUP ==================== */

.mood-selector-popup {
    position: fixed;
    background: #fffadd;
    border: 3px solid #850d31;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 280px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.mood-popup-title {
    font-family: 'Themysion', serif;
    font-size: 1.5rem;
    color: #850d31;
    text-align: center;
    margin-bottom: 15px;
}

.popup-date-header {
    font-family: 'Core Bandi Face', serif;
    font-size: 1.2rem;
    color: #850d31;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #850d31;
}

.popup-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #850d31;
}

.popup-section-title,
.popup-entry-title {
    font-family: 'Core Bandi Face', sans-serif;
    font-weight: bold;
    color: #850d31;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-section-title {
    font-size: 1rem;
    margin-bottom: 10px;
}

.popup-entry {
    margin-bottom: 15px;
    padding: 10px;
    background: #fffadd;
    border-radius: 6px;
    border-left: 4px solid #850d31;
}

.popup-entry:last-child {
    margin-bottom: 0;
}

.popup-entry-title {
    font-size: 1rem;
    margin-bottom: 5px;
}

.popup-entry-content {
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.mood-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.mood-option {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #850d31;
    border-radius: 8px;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Core Bandi Face', sans-serif;
}

.mood-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(133, 13, 49, 0.3);
}

.mood-clear-btn,
.mood-close-btn {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 2px solid #850d31;
    border-radius: 8px;
    background-color: #fff;
    color: #850d31;
    font-family: 'Core Bandi Face', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mood-clear-btn:hover,
.mood-close-btn:hover {
    background-color: #850d31;
    color: #fff;
}

/* ==================== RESPONSIVE CALENDAR ==================== */

@media (max-width: 1200px) {
    .calendar-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .calendar-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-row {
        grid-template-columns: 1fr;
    }

    .days-container {
        gap: 3px;
    }

    .mood-selector-popup {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
}