/* ==========================================================================
   Pristine Lake Theme - Calm Water-Inspired Calendar
   Version: 1.2
   Updated: 2024-06-08
   Changes:
   - Serene blue color palette inspired by crystal-clear lakes
   - Smooth, flowing design elements
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    /* Lake Color Palette */
    --lake-bg: #E6F0F5;
    --lake-text: #2A3A4A;
    --lake-primary: #FFFFFF;
    --lake-secondary: #E0EBF2;
    --lake-date-number: #2A3A4A;

    /* Water Texture Colors */
    --lake-texture1: #DAE6ED;
    --lake-texture2: #D0E1EA;
    --lake-texture3: #C6DCE7;
    --lake-texture4: #BCD7E4;
    --lake-texture5: #B2D2E1;

    /* Water Accent Colors */
    --lake-accent1: #5D9EC7;
    --lake-accent2: #4A8FBD;
    --lake-accent3: #3780B3;
    --lake-accent4: rgba(55, 128, 179, 0.7);
    --lake-accent5: rgba(55, 128, 179, 0.5);

    /* Theme Variables */
    --lake-shadow: rgba(93, 158, 199, 0.15);
    --lake-radius: 6px;
    --lake-transition: 0.25s ease;
    --lake-hover: #2D6B99;
    --lake-glow: 0 0 12px rgba(93, 158, 199, 0.2);
    --lake-pattern: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".15" fill="%235D9EC7"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".3" fill="%235D9EC7"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" opacity=".4" fill="%235D9EC7"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes lake-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes lake-slide {
    from {
        transform: translateY(5px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes lake-pulse {

    0%,
    100% {
        box-shadow: 0 0 3px var(--lake-shadow);
    }

    50% {
        box-shadow: var(--lake-glow);
    }
}

@keyframes progress-bar {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* ==================== BASE STYLES ==================== */
.pristine-lake {
    font-family: 'Noto Sans', sans-serif;
    color: var(--lake-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--lake-bg);
    min-height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%235D9EC7" opacity="0.1"/><circle cx="70" cy="30" r="1" fill="%235D9EC7" opacity="0.1"/><circle cx="30" cy="70" r="1" fill="%235D9EC7" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="%235D9EC7" opacity="0.1"/></svg>');
}

.pristine-lake .container {
    background-color: var(--lake-primary);
    padding: 2rem;
    border: 1px solid var(--lake-accent4);
    box-shadow: var(--lake-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--lake-radius);
}

.pristine-lake .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--lake-accent1) 0%,
            var(--lake-accent2) 50%,
            var(--lake-accent1) 100%);
}

.pristine-lake .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-image: var(--lake-pattern);
    background-size: 1200px 100%;
    opacity: 0.1;
}

/* ==================== HEADER & TITLE ==================== */
.pristine-lake #calendar-title {
    font-family: 'Playfair Display', serif;
    color: var(--lake-text);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
    position: relative;
    font-weight: 600;
}

.pristine-lake #calendar-title::after {
    content: "〰";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    opacity: 0.8;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.pristine-lake #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--lake-primary);
    border: 1px solid var(--lake-accent4);
    border-radius: var(--lake-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.pristine-lake #date-weather-container::before {
    content: "LAKE VIEW";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--lake-primary);
    padding: 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--lake-text);
    font-weight: 600;
    font-family: 'Noto Sans', sans-serif;
}

.pristine-lake #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lake-accent2), transparent);
}

.pristine-lake #current-date {
    font-family: 'Playfair Display', serif;
    color: var(--lake-text);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.pristine-lake #today-weather {
    font-family: 'Noto Sans', sans-serif;
    color: var(--lake-text);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.pristine-lake #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.pristine-lake .clock-face {
    width: 180px;
    height: 180px;
    border: 6px solid var(--lake-accent2);
    border-radius: 50%;
    position: relative;
    background-color: var(--lake-primary);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.pristine-lake .hand {
    position: absolute;
    top: 50%;
    transform-origin: 100%;
    transform: rotate(90deg);
    transition: all 0.05s;
    transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
}

.pristine-lake .hour-hand {
    width: 40%;
    left: 10%;
    height: 5px;
    background: var(--lake-accent1);
    margin-top: -2.5px;
    border-radius: 2px;
}

.pristine-lake .minute-hand {
    width: 48%;
    left: 2%;
    height: 3px;
    background: var(--lake-accent2);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.pristine-lake .second-hand {
    width: 48%;
    left: 2%;
    height: 1px;
    background: var(--lake-accent3);
    margin-top: -0.5px;
}

/* ==================== CALENDAR TABLE ==================== */
.pristine-lake table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.pristine-lake th {
    background-color: var(--lake-accent1);
    color: var(--lake-primary) !important;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    padding: 0.8rem 0.4rem;
    border-radius: var(--lake-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.pristine-lake th span.full-day-name {
    display: inline;
}

.pristine-lake th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.pristine-lake td {
    background-color: var(--lake-primary);
    color: var(--lake-text);
    padding: 1rem;
    border: 1px solid var(--lake-accent4);
    height: 90px;
    vertical-align: top;
    transition: all var(--lake-transition);
    position: relative;
    border-radius: var(--lake-radius);
    box-shadow: inset 0 0 0 1px rgba(93, 158, 199, 0.1);
}

.pristine-lake td .date-number {
    color: var(--lake-text) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Playfair Display', serif;
}

.pristine-lake td:hover {
    background-color: var(--lake-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Current date highlight */
.pristine-lake td.current-day {
    background-color: rgba(93, 158, 199, 0.1);
    border: 2px solid var(--lake-accent2);
    animation: lake-pulse 3s infinite;
}

.pristine-lake td.current-day .date-number {
    color: var(--lake-text) !important;
    font-weight: 700;
}

.pristine-lake td.current-day::before {
    content: "❉";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--lake-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.pristine-lake .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--lake-accent2);
    margin: 0 1px;
    transition: all var(--lake-transition);
}

.pristine-lake .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--lake-accent2);
    box-shadow: 0 0 6px rgba(93, 158, 199, 0.2);
}

/* ==================== MODAL STYLES ==================== */
.pristine-lake .modal-content {
    position: relative;
    background-color: var(--lake-primary);
    border: 1px solid var(--lake-accent4);
    padding: 25px;
    color: var(--lake-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--lake-radius);
    animation: lake-slide 0.2s ease-out;
}

.pristine-lake .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--lake-accent1) 0%,
            var(--lake-accent2) 50%,
            var(--lake-accent1) 100%);
}

.pristine-lake .modal-content h2 {
    color: var(--lake-text);
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Modal date display */
.pristine-lake .modal-date {
    font-family: 'Playfair Display', serif;
    color: var(--lake-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lake-accent4);
}

/* Event list */
.pristine-lake .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.pristine-lake .event-item {
    background-color: var(--lake-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--lake-accent1);
    border-radius: var(--lake-radius);
    transition: all var(--lake-transition);
}

.pristine-lake .event-item:hover {
    background-color: var(--lake-texture3);
    transform: translateX(3px);
}

.pristine-lake .event-time {
    font-family: 'Noto Sans', sans-serif;
    color: var(--lake-text);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.pristine-lake .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--lake-text);
}

.pristine-lake .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--lake-text);
    opacity: 0.9;
}

.pristine-lake .modal-content button {
    background-color: var(--lake-accent1);
    color: var(--lake-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lake-transition);
    letter-spacing: 0.5px;
    font-family: 'Noto Sans', sans-serif;
    border-radius: var(--lake-radius);
}

.pristine-lake .modal-content button:hover {
    background-color: var(--lake-hover);
    box-shadow: 0 3px 10px rgba(93, 158, 199, 0.1);
}

/* Close Button */
.pristine-lake .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--lake-primary);
    color: var(--lake-text);
    border: 1px solid var(--lake-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--lake-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.pristine-lake .modal .close-button:hover {
    background-color: var(--lake-text);
    color: var(--lake-accent1);
    border-color: var(--lake-text);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.pristine-lake .button,
.pristine-lake .transparent-button {
    border: 1px solid var(--lake-accent1);
    color: var(--lake-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lake-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--lake-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.pristine-lake .button:hover,
.pristine-lake .transparent-button:hover {
    background-color: var(--lake-accent1);
    color: var(--lake-primary);
    box-shadow: 0 3px 10px rgba(93, 158, 199, 0.1);
}

.pristine-lake .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.pristine-lake #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.pristine-lake #theme-switcher {
    background-color: var(--lake-primary);
    color: var(--lake-text) !important;
    border: 1px solid var(--lake-accent1);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232A3A4A'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    cursor: pointer;
    transition: all var(--lake-transition);
    border-radius: var(--lake-radius);
}

.pristine-lake #theme-switcher option {
    background-color: var(--lake-primary) !important;
    color: var(--lake-text) !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px !important;
}

.pristine-lake #theme-switcher:focus {
    outline: none;
    border-color: var(--lake-accent1);
    box-shadow: 0 0 0 2px rgba(93, 158, 199, 0.1);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.pristine-lake #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    color: var(--lake-primary);
    background-color: var(--lake-accent1);
    cursor: pointer;
    transition: all var(--lake-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--lake-radius);
    box-shadow: 0 2px 8px rgba(93, 158, 199, 0.2);
}

.pristine-lake #backToTopBtn:hover {
    background-color: var(--lake-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.pristine-lake footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--lake-accent4);
    color: var(--lake-text);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .pristine-lake .container {
        padding: 1.5rem;
    }

    .pristine-lake #calendar-title {
        font-size: 2rem;
    }

    .pristine-lake #current-date {
        font-size: 1.5rem;
    }

    .pristine-lake #today-weather {
        font-size: 1.1rem;
    }

    .pristine-lake .modal-date {
        font-size: 1.3rem;
    }

    .pristine-lake .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .pristine-lake {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .pristine-lake .clock-face {
        width: 150px;
        height: 150px;
        border-width: 5px;
    }

    .pristine-lake th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .pristine-lake th span.full-day-name {
        display: none;
    }

    .pristine-lake th abbr {
        display: inline;
    }

    .pristine-lake td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .pristine-lake td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .pristine-lake td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .pristine-lake #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .pristine-lake #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .pristine-lake .modal-content {
        padding: 20px;
    }

    .pristine-lake .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .pristine-lake .container {
        padding: 1rem;
    }

    .pristine-lake #calendar-title {
        font-size: 1.7rem;
    }

    .pristine-lake #current-date {
        font-size: 1.3rem;
    }

    .pristine-lake #today-weather {
        font-size: 1rem;
    }

    .pristine-lake .clock-face {
        width: 130px;
        height: 130px;
        border-width: 4px;
    }

    .pristine-lake th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .pristine-lake td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .pristine-lake td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .pristine-lake #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .pristine-lake .modal-content {
        padding: 15px;
    }

    .pristine-lake .modal-date {
        font-size: 1.2rem;
    }

    .pristine-lake .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .pristine-lake th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .pristine-lake td {
        height: 60px;
    }

    .pristine-lake td .date-number {
        font-size: 0.9rem;
    }

    .pristine-lake #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}