/* ==========================================================================
   Eagle Creek Theme - Wilderness Inspired Calendar
   Version: 1.0
   Updated: 2024-06-10
   Changes:
   - Earthy forest color palette with organic textures
   - Rustic, nature-inspired design with wilderness motifs
   - Flowing water accents and woodland details
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap');

:root {
    /* Nature Color Palette */
    --forest-bg: #0D1A0D;
    --forest-text: #E8F1E8;
    --forest-primary: #1E2E1E;
    --forest-secondary: #2C3E2C;
    --forest-date-number: #5D9E5D;

    /* Wilderness Layer Colors */
    --forest-layer1: #2C3E2C;
    --forest-layer2: #3D4E3D;
    --forest-layer3: #4E5F4E;
    --forest-layer4: #5F705F;
    --forest-layer5: #6F806F;

    /* Natural Accent Colors */
    --forest-accent1: #5D9E5D;
    /* Forest Green */
    --forest-accent2: #8BAA8B;
    /* Moss Green */
    --forest-accent3: #C8B273;
    /* Bark Gold */
    --forest-accent4: rgba(93, 158, 93, 0.5);
    --forest-accent5: rgba(139, 170, 139, 0.3);

    /* Theme Variables */
    --forest-shadow: rgba(93, 158, 93, 0.15);
    --forest-radius: 8px;
    --forest-transition: 0.3s ease-out;
    --forest-hover: #6FBF6F;
    --forest-glow: 0 0 12px rgba(93, 158, 93, 0.2);
    --forest-texture: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M10,10 Q50,5 90,10 T100,50 Q95,90 90,90 T50,100 Q5,95 10,60 Z" fill="none" stroke="%235D9E5D" stroke-width="0.5" opacity="0.1"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes forest-pulse {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 8px var(--forest-accent1);
    }
}

@keyframes forest-flow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100px 100px;
    }
}

@keyframes leaf-fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }

    100% {
        transform: translateY(0) rotate(10deg);
        opacity: 0.7;
    }
}

/* ==================== BASE STYLES ==================== */
.eagle-creek {
    font-family: 'Open Sans', sans-serif;
    color: var(--forest-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--forest-bg);
    min-height: 100vh;
    background-image:
        var(--forest-texture),
        linear-gradient(to bottom, var(--forest-bg), var(--forest-layer5));
    background-repeat: repeat;
    animation: forest-flow 60s linear infinite;
}

.eagle-creek .container {
    background-color: var(--forest-primary);
    padding: 2rem;
    border: 1px solid var(--forest-accent4);
    box-shadow: var(--forest-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--forest-radius);
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent);
}

.eagle-creek .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--forest-accent1),
            transparent);
}

.eagle-creek .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--forest-accent1),
            transparent);
}

/* ==================== HEADER & TITLE ==================== */
.eagle-creek #calendar-title {
    font-family: 'Libre Baskerville', serif;
    color: var(--forest-text);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    position: relative;
    font-weight: 400;
}

.eagle-creek #calendar-title::after {
    content: "🌲";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    animation: forest-pulse 3s infinite;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.eagle-creek #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--forest-primary);
    border: 1px solid var(--forest-accent4);
    border-radius: var(--forest-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.eagle-creek #date-weather-container::before {
    content: "WILDERNESS TRACKER";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--forest-primary);
    padding: 0 8px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--forest-accent1);
    font-weight: 600;
    font-family: 'Libre Baskerville', serif;
}

.eagle-creek #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--forest-accent1), transparent);
}

.eagle-creek #current-date {
    font-family: 'Libre Baskerville', serif;
    color: var(--forest-accent1);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.eagle-creek #today-weather {
    font-family: 'Open Sans', sans-serif;
    color: var(--forest-text);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.eagle-creek #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.eagle-creek .clock-face {
    width: 180px;
    height: 180px;
    border: 3px solid var(--forest-accent1);
    border-radius: 50%;
    position: relative;
    background-color: var(--forest-primary);
    box-shadow: 0 0 15px rgba(93, 158, 93, 0.3);
    background-image:
        radial-gradient(circle at center, transparent 65%, var(--forest-accent4) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="%235D9E5D" stroke-width="0.3" opacity="0.3"/></svg>');
}

.eagle-creek .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);
}

.eagle-creek .hour-hand {
    width: 40%;
    left: 10%;
    height: 4px;
    background: var(--forest-accent1);
    margin-top: -2px;
    border-radius: 2px;
}

.eagle-creek .minute-hand {
    width: 48%;
    left: 2%;
    height: 3px;
    background: var(--forest-accent2);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.eagle-creek .second-hand {
    width: 48%;
    left: 2%;
    height: 2px;
    background: var(--forest-accent3);
    margin-top: -1px;
}

/* Clock center ornament */
.eagle-creek .clock-face::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--forest-accent1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 2px var(--forest-primary);
}

/* Digital display in clock */
.eagle-creek .clock-face::before {
    content: "🦅";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.1;
    z-index: 1;
}

/* ==================== CALENDAR TABLE ==================== */
.eagle-creek table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.eagle-creek th {
    background-color: var(--forest-accent1);
    color: var(--forest-primary) !important;
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    padding: 0.8rem 0.4rem;
    border-radius: var(--forest-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.eagle-creek th span.full-day-name {
    display: inline;
}

.eagle-creek th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.eagle-creek td {
    background-color: var(--forest-primary);
    color: var(--forest-text);
    padding: 1rem;
    border: 1px solid var(--forest-accent4);
    height: 90px;
    vertical-align: top;
    transition: all var(--forest-transition);
    position: relative;
    border-radius: var(--forest-radius);
    box-shadow: inset 0 0 0 1px rgba(93, 158, 93, 0.1);
}

.eagle-creek td .date-number {
    color: var(--forest-date-number) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Libre Baskerville', serif;
}

.eagle-creek td:hover {
    background-color: var(--forest-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Current date highlight */
.eagle-creek td.current-day {
    background-color: rgba(93, 158, 93, 0.1);
    border: 2px solid var(--forest-accent1);
    animation: leaf-fall 0.5s ease-out;
}

.eagle-creek td.current-day .date-number {
    color: var(--forest-text) !important;
    font-weight: 600;
}

.eagle-creek td.current-day::before {
    content: "🦅";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--forest-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.eagle-creek .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--forest-accent2);
    margin: 0 1px;
    transition: all var(--forest-transition);
}

.eagle-creek .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--forest-accent2);
    box-shadow: 0 0 6px rgba(139, 170, 139, 0.4);
}

/* ==================== MODAL STYLES ==================== */
.eagle-creek .modal-content {
    position: relative;
    background-color: var(--forest-primary);
    border: 1px solid var(--forest-accent4);
    padding: 25px;
    color: var(--forest-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-radius: var(--forest-radius);
    animation: leaf-fall 0.3s ease-out;
}

.eagle-creek .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--forest-accent1) 0%,
            var(--forest-accent2) 50%,
            var(--forest-accent1) 100%);
}

.eagle-creek .modal-content h2 {
    color: var(--forest-accent1);
    font-family: 'Libre Baskerville', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Modal date display */
.eagle-creek .modal-date {
    font-family: 'Libre Baskerville', serif;
    color: var(--forest-accent1);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--forest-accent4);
    letter-spacing: 0.05em;
}

/* Event list */
.eagle-creek .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.eagle-creek .event-item {
    background-color: var(--forest-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--forest-accent1);
    border-radius: var(--forest-radius);
    transition: all var(--forest-transition);
}

.eagle-creek .event-item:hover {
    background-color: var(--forest-layer3);
    transform: translateX(3px);
}

.eagle-creek .event-time {
    font-family: 'Libre Baskerville', serif;
    color: var(--forest-accent1);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
    letter-spacing: 0.03em;
}

.eagle-creek .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--forest-text);
    font-family: 'Open Sans', sans-serif;
}

.eagle-creek .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--forest-text);
    opacity: 0.9;
    font-family: 'Open Sans', sans-serif;
}

.eagle-creek .modal-content button {
    background-color: var(--forest-accent1);
    color: var(--forest-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--forest-transition);
    letter-spacing: 0.5px;
    font-family: 'Open Sans', sans-serif;
    border-radius: var(--forest-radius);
}

.eagle-creek .modal-content button:hover {
    background-color: var(--forest-hover);
    box-shadow: 0 3px 10px rgba(93, 158, 93, 0.2);
}

/* Close Button */
.eagle-creek .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--forest-primary);
    color: var(--forest-text);
    border: 1px solid var(--forest-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--forest-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.eagle-creek .modal .close-button:hover {
    background-color: var(--forest-text);
    color: var(--forest-accent1);
    border-color: var(--forest-text);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.eagle-creek .button,
.eagle-creek .transparent-button {
    border: 1px solid var(--forest-accent1);
    color: var(--forest-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--forest-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--forest-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.eagle-creek .button:hover,
.eagle-creek .transparent-button:hover {
    background-color: var(--forest-accent1);
    color: var(--forest-primary);
    box-shadow: 0 3px 10px rgba(93, 158, 93, 0.15);
}

.eagle-creek .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.eagle-creek #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.eagle-creek #theme-switcher {
    background-color: var(--forest-primary);
    color: var(--forest-text) !important;
    border: 1px solid var(--forest-accent1);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    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='%23E8F1E8'%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(--forest-transition);
    border-radius: var(--forest-radius);
}

.eagle-creek #theme-switcher option {
    background-color: var(--forest-primary) !important;
    color: var(--forest-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 12px !important;
}

.eagle-creek #theme-switcher:focus {
    outline: none;
    border-color: var(--forest-accent1);
    box-shadow: 0 0 0 2px rgba(93, 158, 93, 0.2);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.eagle-creek #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--forest-primary);
    background-color: var(--forest-accent1);
    cursor: pointer;
    transition: all var(--forest-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--forest-radius);
    box-shadow: 0 2px 8px rgba(93, 158, 93, 0.3);
}

.eagle-creek #backToTopBtn:hover {
    background-color: var(--forest-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.eagle-creek footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--forest-accent4);
    color: var(--forest-text);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Libre Baskerville', serif;
    letter-spacing: 0.05em;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .eagle-creek .container {
        padding: 1.5rem;
    }

    .eagle-creek #calendar-title {
        font-size: 2rem;
    }

    .eagle-creek #current-date {
        font-size: 1.5rem;
    }

    .eagle-creek #today-weather {
        font-size: 1.1rem;
    }

    .eagle-creek .modal-date {
        font-size: 1.3rem;
    }

    .eagle-creek .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .eagle-creek {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .eagle-creek .clock-face {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }

    .eagle-creek th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .eagle-creek th span.full-day-name {
        display: none;
    }

    .eagle-creek th abbr {
        display: inline;
    }

    .eagle-creek td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .eagle-creek td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .eagle-creek td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .eagle-creek #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .eagle-creek #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .eagle-creek .modal-content {
        padding: 20px;
    }

    .eagle-creek .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .eagle-creek .container {
        padding: 1rem;
    }

    .eagle-creek #calendar-title {
        font-size: 1.7rem;
    }

    .eagle-creek #current-date {
        font-size: 1.3rem;
    }

    .eagle-creek #today-weather {
        font-size: 1rem;
    }

    .eagle-creek .clock-face {
        width: 130px;
        height: 130px;
        border-width: 2px;
    }

    .eagle-creek th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .eagle-creek td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .eagle-creek td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .eagle-creek #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .eagle-creek .modal-content {
        padding: 15px;
    }

    .eagle-creek .modal-date {
        font-size: 1.2rem;
    }

    .eagle-creek .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .eagle-creek th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .eagle-creek td {
        height: 60px;
    }

    .eagle-creek td .date-number {
        font-size: 0.9rem;
    }

    .eagle-creek #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}