:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --modal-bg: rgba(15, 23, 42, 0.95);
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    overflow-x: hidden;
}

/* Header */
.main-header {
    margin-bottom: 3rem;
    text-align: center;
}

#year-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

/* Background Year Watermark */
#background-year {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40vw;
    /* Massive font size fitted to screen width approximately */
    font-weight: 900;
    line-height: 1;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    /* Very subtle */
    background: linear-gradient(135deg, var(--accent) 0%, #fff 100%);
    /* Gradient fill */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    user-select: none;
}

/* Carousel Container */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* gap: 2rem; -- No longer needed for absolute positioning of arrows */
    padding: 0 2rem;
    position: relative;
    /* Anchor for absolute arrows */
    min-height: 100vh;
    /* Ensure full height to center things */
}

/* Navigation Buttons */
.nav-btn {
    background: none;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Absolute positioning to keep them fixed regardless of card height */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

#prev-btn {
    left: 2rem;
}

#next-btn {
    right: 2rem;
}

.nav-btn:hover {
    background: var(--accent);
    color: #fff;
    /* Update transform to include the scale AND the centering translateY */
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--accent);
}

/* Calendar View Container (was grid) */
.calendar-view {
    width: 50vw;
    /* User requested half screen width */
    max-width: 800px;
    min-width: 350px;
    perspective: 1000px;
    /* Prepare for 3D transitons if we want them later */
}

/* Month Card Updates for Single View */
/* Month Card Updates for Single View */
.month-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 800px;
    /* Made significantly taller per request */
    width: 100%;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.month-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.3);
    border-color: var(--accent);
}

/* Month Card duplicate style block removed here if it existed, cleaning up */

.card-image {
    width: 100%;
    height: 500px;
    /* Taller image for the single view */
    object-fit: contain;
    background-color: #020617;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
    text-align: center;
    /* Centered header */
}

/* Mini Calendar inside Card */
.mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 2.1rem;
    /* 3x larger than 0.7rem */
    gap: 2px;
    text-align: center;
    color: var(--text-secondary);
}

.mini-day-header {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mini-day {
    padding: 2px 0;
}

.mini-day.current-day {
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent);
}

.modal-body {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow: hidden;
}

.modal-image-container {
    flex: 1.5;
    background: #000;
    position: relative;
    overflow: hidden;
}

#modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-calendar-container {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#modal-month-name {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.days-grid div {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    transition: background 0.2s;
}

.days-grid .day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.days-grid .today {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        overflow-y: auto;
    }

    .modal-image-container {
        height: 250px;
        flex: none;
    }

    .modal-calendar-container {
        flex: none;
        padding: 1.5rem;
    }

    #year-title {
        font-size: 3rem;
    }
}


/* Note Modal Specifics */
.note-modal-content {
    max-width: 500px;
    height: auto;
    min-height: 300px;
}

.note-modal-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1.5rem;
}

#note-date-title {
    font-size: 2rem;
    color: var(--accent);
    margin: 0;
}

#note-text {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: none;
    outline: none;
}

#note-text:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.save-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    align-self: flex-end;
    transition: transform 0.2s, box-shadow 0.2s;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

.save-btn:active {
    transform: translateY(0);
}

/* Day with Note Indicator */
.days-grid .day {
    position: relative;
    cursor: pointer;
}

.days-grid .day.has-note::after {
    content: '';
    position: absolute;
    bottom: 6px;
    /* Adjust if needed to move it "next to" */
    right: 6px;
    /* Putting it in bottom right to be "next to" text sometimes */
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent);
}