/* ==========================================================================
   Out of the Blue - Sky Surprise Theme
   Version: 1.4
   Updated: 2024-06-10
   Changes:
   - Sky-inspired color palette
   - Cloud-like elements
   - Unexpected weather motifs
   - Maintained all structure and functionality
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Sky Color Palette */
    --sky-bg: #E6F7FF;
    --sky-text: #003366;
    /* Deep blue text */
    --sky-primary: #F0FAFF;
    /* Light sky container */
    --sky-secondary: #D8F0FF;
    /* Slightly darker hover */
    --sky-date-number: #0066CC;
    /* Bright blue for dates/numbers */

    /* Cloud Texture Colors */
    --sky-texture1: #ECF9FF;
    --sky-texture2: #E2F5FF;
    --sky-texture3: #D8F0FF;
    --sky-texture4: #CCEBFF;
    --sky-texture5: #BFE5FF;

    /* Weather Accent Colors */
    --sky-accent1: #00B4FF;
    /* Sky blue */
    --sky-accent2: #0088CC;
    /* Ocean blue */
    --sky-accent3: #66D1FF;
    /* Light blue */
    --sky-accent4: rgba(0, 180, 255, 0.6);
    /* Sky blue with transparency */
    --sky-accent5: rgba(0, 136, 204, 0.4);
    /* Ocean blue with transparency */

    /* Theme Variables */
    --sky-shadow: rgba(0, 180, 255, 0.2);
    --sky-radius: 12px;
    --sky-transition: 0.3s ease-out;
    --sky-hover: #0099E6;
    /* Darker sky blue */
    --sky-glow: 0 0 15px rgba(0, 180, 255, 0.3);
    --sky-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="%2300B4FF"/><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="%2300B4FF"/><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="%2300B4FF"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes sky-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes cloud-move {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100% 0;
    }
}

@keyframes sky-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px var(--sky-shadow);
    }

    50% {
        box-shadow: var(--sky-glow);
    }
}

@keyframes rain-fall {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: -100% 100%;
    }
}

/* ==================== BASE STYLES ==================== */
.out-of-the-blue {
    font-family: 'Inter', sans-serif;
    color: var(--sky-text) !important;
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--sky-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="30" r="3" fill="%2300B4FF" opacity="0.1"/><circle cx="50" cy="20" r="4" fill="%2300B4FF" opacity="0.1"/><circle cx="80" cy="30" r="3" fill="%2300B4FF" opacity="0.1"/><circle cx="30" cy="70" r="3" fill="%2300B4FF" opacity="0.1"/><circle cx="70" cy="80" r="4" fill="%2300B4FF" opacity="0.1"/></svg>');
    animation: cloud-move 60s linear infinite;
}

.out-of-the-blue .container {
    background-color: var(--sky-primary);
    padding: 2rem;
    border: 1px solid var(--sky-accent4);
    box-shadow: var(--sky-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 2rem auto;
    border-radius: var(--sky-radius);
    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="10" cy="10" r="3" fill="%2300B4FF" opacity="0.05"/><circle cx="30" cy="15" r="2" fill="%2300B4FF" opacity="0.05"/><circle cx="90" cy="10" r="3" fill="%2300B4FF" opacity="0.05"/></svg>');
}

.out-of-the-blue .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--sky-accent1) 0%,
            var(--sky-accent2) 50%,
            var(--sky-accent1) 100%);
}

.out-of-the-blue .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-image: var(--sky-pattern);
    background-size: 1200px 100%;
    opacity: 0.1;
}

/* ==================== HEADER & TITLE ==================== */
.out-of-the-blue #calendar-title {
    font-family: 'Roboto Mono', monospace;
    color: var(--sky-text) !important;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
    position: relative;
    font-weight: 700;
    text-shadow: none;
    animation: sky-float 4s ease-in-out infinite;
}

.out-of-the-blue #calendar-title::after {
    content: "☁️";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    opacity: 0.8;
    color: var(--sky-text);
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.out-of-the-blue #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--sky-primary);
    border: 1px solid var(--sky-accent4);
    border-radius: var(--sky-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    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="30" r="1" fill="%2300B4FF" opacity="0.1"/><circle cx="50" cy="20" r="1" fill="%2300B4FF" opacity="0.1"/></svg>');
}

.out-of-the-blue #date-weather-container::before {
    content: "WEATHER TRACKER";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--sky-primary);
    padding: 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--sky-text) !important;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    border: 1px solid var(--sky-accent4);
    border-radius: 12px;
}

.out-of-the-blue #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sky-accent1), transparent);
}

.out-of-the-blue #current-date {
    font-family: 'Roboto Mono', monospace;
    color: var(--sky-text) !important;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-shadow: none;
}

.out-of-the-blue #today-weather {
    font-family: 'Inter', sans-serif;
    color: var(--sky-text) !important;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.out-of-the-blue #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.out-of-the-blue .clock-face {
    width: 180px;
    height: 180px;
    border: 6px solid var(--sky-accent1);
    border-radius: 50%;
    position: relative;
    background-color: var(--sky-primary);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    background-image: radial-gradient(circle at center, transparent 65%, var(--sky-accent4) 100%);
}

.out-of-the-blue .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);
}

.out-of-the-blue .hour-hand {
    width: 40%;
    left: 10%;
    height: 5px;
    background: var(--sky-accent1);
    margin-top: -2.5px;
    border-radius: 2px;
}

.out-of-the-blue .minute-hand {
    width: 48%;
    left: 2%;
    height: 3px;
    background: var(--sky-accent3);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.out-of-the-blue .second-hand {
    width: 48%;
    left: 2%;
    height: 1px;
    background: var(--sky-accent2);
    margin-top: -0.5px;
}

/* Clock center dot */
.out-of-the-blue .clock-face::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--sky-accent1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* ==================== CALENDAR TABLE ==================== */
.out-of-the-blue table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.out-of-the-blue th {
    background-color: var(--sky-accent1);
    color: white !important;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    padding: 0.8rem 0.4rem;
    border-radius: var(--sky-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.out-of-the-blue th span.full-day-name {
    display: inline;
}

.out-of-the-blue th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.out-of-the-blue td {
    background-color: var(--sky-primary);
    color: var(--sky-text) !important;
    padding: 1rem;
    border: 1px solid var(--sky-accent4);
    height: 90px;
    vertical-align: top;
    transition: all var(--sky-transition);
    position: relative;
    border-radius: var(--sky-radius);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.out-of-the-blue td .date-number {
    color: var(--sky-accent1) !important;
    font-weight: 700;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    text-shadow: none;
    font-family: 'Roboto Mono', monospace;
}

.out-of-the-blue td:hover {
    background-color: var(--sky-secondary);
    box-shadow: 0 5px 15px rgba(0, 180, 255, 0.1);
}

/* Current date highlight */
.out-of-the-blue td.current-day {
    background-color: rgba(0, 180, 255, 0.1);
    border: 2px solid var(--sky-accent1);
    animation: sky-pulse 3s infinite;
}

.out-of-the-blue td.current-day .date-number {
    color: var(--sky-accent1) !important;
    font-weight: 700;
}

.out-of-the-blue td.current-day::before {
    content: "🌤️";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--sky-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.out-of-the-blue .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sky-accent2);
    margin: 0 1px;
    transition: all var(--sky-transition);
}

.out-of-the-blue .event-marker:hover {
    transform: scale(1.6);
    background-color: var(--sky-accent1);
    box-shadow: 0 0 8px rgba(0, 136, 204, 0.6);
}

/* ==================== MODAL STYLES ==================== */
.out-of-the-blue .modal-content {
    position: relative;
    background-color: var(--sky-primary);
    border: 1px solid var(--sky-accent4);
    padding: 25px;
    color: var(--sky-text) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--sky-radius);
    animation: sky-float 0.5s ease-out;
    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="10" cy="10" r="1" fill="%2300B4FF" opacity="0.1"/><circle cx="30" cy="15" r="1" fill="%2300B4FF" opacity="0.1"/></svg>');
}

.out-of-the-blue .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--sky-accent1) 0%,
            var(--sky-accent2) 50%,
            var(--sky-accent1) 100%);
}

.out-of-the-blue .modal-content h2 {
    color: var(--sky-text) !important;
    font-family: 'Roboto Mono', monospace;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: none;
}

/* Modal date display */
.out-of-the-blue .modal-date {
    font-family: 'Roboto Mono', monospace;
    color: var(--sky-text) !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--sky-accent4);
}

/* Event list */
.out-of-the-blue .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.out-of-the-blue .event-item {
    background-color: var(--sky-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--sky-accent1);
    border-radius: var(--sky-radius);
    transition: all var(--sky-transition);
}

.out-of-the-blue .event-item:hover {
    background-color: var(--sky-texture3);
    transform: translateX(5px);
}

.out-of-the-blue .event-time {
    font-family: 'Roboto Mono', monospace;
    color: var(--sky-accent1) !important;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.out-of-the-blue .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--sky-text) !important;
}

.out-of-the-blue .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--sky-text) !important;
    opacity: 0.9;
}

.out-of-the-blue .modal-content button {
    background-color: var(--sky-accent1);
    color: white !important;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sky-transition);
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    border-radius: var(--sky-radius);
}

.out-of-the-blue .modal-content button:hover {
    background-color: var(--sky-hover);
    color: white !important;
    box-shadow: 0 3px 10px rgba(0, 180, 255, 0.3);
}

/* Close Button */
.out-of-the-blue .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--sky-primary);
    color: var(--sky-text) !important;
    border: 1px solid var(--sky-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--sky-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.out-of-the-blue .modal .close-button:hover {
    background-color: var(--sky-accent1);
    color: white !important;
    border-color: var(--sky-accent1);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.out-of-the-blue .button,
.out-of-the-blue .transparent-button {
    border: 1px solid var(--sky-accent1);
    color: var(--sky-text) !important;
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sky-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--sky-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.out-of-the-blue .button:hover,
.out-of-the-blue .transparent-button:hover {
    background-color: var(--sky-accent1);
    color: white !important;
    box-shadow: 0 3px 10px rgba(0, 180, 255, 0.2);
}

.out-of-the-blue .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.out-of-the-blue #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.out-of-the-blue #theme-switcher {
    background-color: var(--sky-primary);
    color: var(--sky-text) !important;
    border: 1px solid var(--sky-accent1);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Inter', 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='%23003366'%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(--sky-transition);
    border-radius: var(--sky-radius);
}

.out-of-the-blue #theme-switcher option {
    background-color: var(--sky-primary) !important;
    color: var(--sky-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 12px !important;
}

.out-of-the-blue #theme-switcher:focus {
    outline: none;
    border-color: var(--sky-accent1);
    box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.2);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.out-of-the-blue #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: white !important;
    background-color: var(--sky-accent1);
    cursor: pointer;
    transition: all var(--sky-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--sky-radius);
    box-shadow: 0 2px 8px rgba(0, 180, 255, 0.4);
}

.out-of-the-blue #backToTopBtn:hover {
    background-color: var(--sky-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.out-of-the-blue footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--sky-accent4);
    color: var(--sky-text) !important;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .out-of-the-blue .container {
        padding: 1.5rem;
    }

    .out-of-the-blue #calendar-title {
        font-size: 2rem;
    }

    .out-of-the-blue #current-date {
        font-size: 1.5rem;
    }

    .out-of-the-blue #today-weather {
        font-size: 1.1rem;
    }

    .out-of-the-blue .modal-date {
        font-size: 1.3rem;
    }

    .out-of-the-blue .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .out-of-the-blue {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .out-of-the-blue .clock-face {
        width: 150px;
        height: 150px;
        border-width: 5px;
    }

    .out-of-the-blue th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .out-of-the-blue th span.full-day-name {
        display: none;
    }

    .out-of-the-blue th abbr {
        display: inline;
    }

    .out-of-the-blue td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .out-of-the-blue td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .out-of-the-blue td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .out-of-the-blue #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .out-of-the-blue #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .out-of-the-blue .modal-content {
        padding: 20px;
    }

    .out-of-the-blue .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .out-of-the-blue .container {
        padding: 1rem;
    }

    .out-of-the-blue #calendar-title {
        font-size: 1.7rem;
    }

    .out-of-the-blue #current-date {
        font-size: 1.3rem;
    }

    .out-of-the-blue #today-weather {
        font-size: 1rem;
    }

    .out-of-the-blue .clock-face {
        width: 130px;
        height: 130px;
        border-width: 4px;
    }

    .out-of-the-blue th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .out-of-the-blue td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .out-of-the-blue td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .out-of-the-blue #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .out-of-the-blue .modal-content {
        padding: 15px;
    }

    .out-of-the-blue .modal-date {
        font-size: 1.2rem;
    }

    .out-of-the-blue .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .out-of-the-blue th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .out-of-the-blue td {
        height: 60px;
    }

    .out-of-the-blue td .date-number {
        font-size: 0.9rem;
    }

    .out-of-the-blue #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}