/* ==========================================================================
   Your Wildest Guess Theme - Mystical Timekeeping Interface
   Version: 1.0
   Updated: 2024-05-31
   Changes:
   - Cosmic purple-pink color palette
   - Celestial decorative elements
   - Enchanted, otherworldly aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;800&display=swap');

:root {
    /* Cosmic Color Palette */
    --cosmic-bg: #0F0A1E;
    --cosmic-text: #E8E6F3;
    --cosmic-primary: #1A1436;
    --cosmic-secondary: #251D4D;

    /* Nebula Texture Colors */
    --cosmic-texture1: #1E1842;
    --cosmic-texture2: #2A225A;
    --cosmic-texture3: #362C72;
    --cosmic-texture4: #42368A;
    --cosmic-texture5: #4E40A2;

    /* Celestial Accent Colors */
    --cosmic-accent1: #C147E9;
    /* Cosmic Purple - 5.8:1 contrast on dark */
    --cosmic-accent2: #E056FA;
    /* Magical Pink - 4.5:1 */
    --cosmic-accent3: #FF6BFF;
    /* Bright Cosmic - 3.2:1 */
    --cosmic-accent4: rgba(193, 71, 233, 0.7);
    /* Semi-transparent Purple */
    --cosmic-accent5: rgba(224, 86, 250, 0.5);
    /* Light Magical Pink */

    /* Theme Variables */
    --cosmic-shadow: rgba(193, 71, 233, 0.15);
    --cosmic-radius: 8px;
    --cosmic-transition: 0.3s ease;
    --cosmic-hover: #B036D9;
    --cosmic-glow: 0 0 15px rgba(224, 86, 250, 0.2);
    --cosmic-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="%23E056FA"/><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="%23E056FA"/><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="%23E056FA"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes cosmic-fade {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

@keyframes cosmic-drift {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cosmic-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px var(--cosmic-shadow);
    }

    50% {
        box-shadow: var(--cosmic-glow);
    }
}

@keyframes star-twinkle {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

/* ==================== BASE STYLES ==================== */
.your-wildest-guess {
    font-family: 'Space Mono', monospace;
    color: var(--cosmic-text);
    line-height: 1.7;
    font-size: 1.1rem;
    background-color: var(--cosmic-bg);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(224, 86, 250, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(193, 71, 233, 0.1) 0%, transparent 20%),
        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="0.5" fill="%23E8E6F3" opacity="0.7"/><circle cx="50" cy="80" r="0.7" fill="%23E8E6F3" opacity="0.7"/><circle cx="80" cy="30" r="0.3" fill="%23E8E6F3" opacity="0.7"/><circle cx="30" cy="60" r="0.4" fill="%23E8E6F3" opacity="0.7"/><circle cx="70" cy="50" r="0.6" fill="%23E8E6F3" opacity="0.7"/></svg>');
}

.your-wildest-guess .container {
    background-color: var(--cosmic-primary);
    padding: 2rem;
    border: 1px solid var(--cosmic-accent4);
    box-shadow: var(--cosmic-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--cosmic-radius);
}

.your-wildest-guess .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--cosmic-accent1) 0%,
            var(--cosmic-accent2) 50%,
            var(--cosmic-accent1) 100%);
}

.your-wildest-guess .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background-image: var(--cosmic-pattern);
    background-size: 1200px 100%;
    opacity: 0.2;
}

/* ==================== HEADER & TITLE ==================== */
.your-wildest-guess #calendar-title {
    font-family: 'Syne', sans-serif;
    color: var(--cosmic-accent2);
    text-align: center;
    font-size: 2.7rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
    position: relative;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(224, 86, 250, 0.5);
}

.your-wildest-guess #calendar-title::after {
    content: "🔮";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(224, 86, 250, 0.5));
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.your-wildest-guess #date-weather-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--cosmic-primary);
    border: 1px solid var(--cosmic-accent4);
    border-radius: var(--cosmic-radius);
    position: relative;
    box-shadow: 0 0 15px rgba(193, 71, 233, 0.2);
}

.your-wildest-guess #date-weather-container::before {
    content: "MYSTIC CHRONICLE";
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--cosmic-primary);
    padding: 0 10px;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--cosmic-accent2);
    font-weight: 700;
    font-family: 'Syne', sans-serif;
}

.your-wildest-guess #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cosmic-accent2), transparent);
}

.your-wildest-guess #current-date {
    font-family: 'Syne', sans-serif;
    color: var(--cosmic-accent2);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(224, 86, 250, 0.4);
}

.your-wildest-guess #today-weather {
    font-family: 'Space Mono', monospace;
    color: var(--cosmic-accent1);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px rgba(193, 71, 233, 0.4);
}

/* ==================== ANALOG CLOCK ==================== */
.your-wildest-guess #analog-watch {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.your-wildest-guess .clock-face {
    width: 200px;
    height: 200px;
    border: 8px solid var(--cosmic-accent2);
    border-radius: 50%;
    position: relative;
    background-color: var(--cosmic-primary);
    box-shadow: 0 0 20px rgba(224, 86, 250, 0.3);
    background-image: 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="%23E056FA" stroke-width="0.8" opacity="0.4"/></svg>');
}

.your-wildest-guess .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);
}

.your-wildest-guess .hour-hand {
    width: 40%;
    left: 10%;
    height: 6px;
    background: var(--cosmic-accent1);
    margin-top: -3px;
    border-radius: 3px;
}

.your-wildest-guess .minute-hand {
    width: 48%;
    left: 2%;
    height: 4px;
    background: var(--cosmic-accent2);
    margin-top: -2px;
    border-radius: 2px;
}

.your-wildest-guess .second-hand {
    width: 48%;
    left: 2%;
    height: 2px;
    background: var(--cosmic-accent3);
    margin-top: -1px;
}

/* ==================== CALENDAR TABLE ==================== */
.your-wildest-guess table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 2rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.your-wildest-guess th {
    background-color: var(--cosmic-accent1);
    color: var(--cosmic-text) !important;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    padding: 1rem 0.5rem;
    border-radius: var(--cosmic-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(193, 71, 233, 0.3);
}

.your-wildest-guess th span.full-day-name {
    display: inline;
}

.your-wildest-guess th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

.your-wildest-guess td {
    background-color: var(--cosmic-primary);
    color: var(--cosmic-text);
    padding: 1.2rem;
    border: 1px solid var(--cosmic-accent4);
    height: 100px;
    vertical-align: top;
    transition: all var(--cosmic-transition);
    position: relative;
    border-radius: var(--cosmic-radius);
    box-shadow: inset 0 0 0 1px rgba(224, 86, 250, 0.2);
}

.your-wildest-guess td:hover {
    background-color: var(--cosmic-secondary);
    box-shadow: 0 0 15px rgba(193, 71, 233, 0.2);
}

/* Current date highlight */
.your-wildest-guess td.current-day {
    background-color: rgba(224, 86, 250, 0.15);
    border: 2px solid var(--cosmic-accent2);
    color: var(--cosmic-text) !important;
    font-weight: 600;
    animation: cosmic-pulse 3s infinite;
    box-shadow: inset 0 0 0 2px rgba(224, 86, 250, 0.3);
}

.your-wildest-guess td.current-day::before {
    content: "✨";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 3px rgba(224, 86, 250, 0.5));
    animation: star-twinkle 2s infinite;
}

.your-wildest-guess td.current-day>.date-number {
    position: relative;
    z-index: 2;
    color: var(--cosmic-accent2) !important;
    font-weight: 700;
}

/* ==================== EVENT MARKERS ==================== */
.your-wildest-guess .event-marker {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--cosmic-accent2);
    margin: 0 2px;
    transition: all var(--cosmic-transition);
    box-shadow: 0 0 5px rgba(224, 86, 250, 0.5);
}

.your-wildest-guess .event-marker:hover {
    transform: scale(1.6);
    background-color: var(--cosmic-accent2);
    box-shadow: 0 0 15px rgba(224, 86, 250, 0.8);
}

/* ==================== MODAL STYLES ==================== */
.your-wildest-guess .modal-content {
    position: relative;
    background-color: var(--cosmic-primary);
    border: 1px solid var(--cosmic-accent4);
    padding: 30px;
    color: var(--cosmic-text);
    box-shadow: 0 0 30px rgba(193, 71, 233, 0.3);
    border-radius: var(--cosmic-radius);
    animation: cosmic-drift 0.3s ease-out;
}

.your-wildest-guess .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg,
            var(--cosmic-accent1) 0%,
            var(--cosmic-accent2) 50%,
            var(--cosmic-accent1) 100%);
}

.your-wildest-guess .modal-content h2 {
    color: var(--cosmic-accent2);
    font-family: 'Syne', sans-serif;
    font-size: 2.2em;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 0 10px rgba(224, 86, 250, 0.5);
}

.your-wildest-guess .modal-content button {
    background-color: var(--cosmic-accent1);
    color: white;
    border: none;
    padding: 13px 26px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--cosmic-transition);
    letter-spacing: 1px;
    font-family: 'Space Mono', monospace;
    border-radius: var(--cosmic-radius);
    box-shadow: 0 0 10px rgba(193, 71, 233, 0.3);
}

.your-wildest-guess .modal-content button:hover {
    background-color: var(--cosmic-hover);
    box-shadow: 0 0 20px rgba(193, 71, 233, 0.5);
}

/* Close Button */
.your-wildest-guess .modal .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--cosmic-primary);
    color: var(--cosmic-accent1);
    border: 2px solid var(--cosmic-accent1);
    width: 34px;
    height: 34px;
    cursor: pointer;
    transition: all var(--cosmic-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(193, 71, 233, 0.3);
}

.your-wildest-guess .modal .close-button:hover {
    background-color: var(--cosmic-accent1);
    color: white;
    border-color: var(--cosmic-accent1);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.your-wildest-guess .button,
.your-wildest-guess .transparent-button {
    border: 2px solid var(--cosmic-accent1);
    color: var(--cosmic-accent1);
    background-color: transparent;
    padding: 0.9rem 1.7rem;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--cosmic-transition);
    position: relative;
    overflow: hidden;
    margin: 0.5rem;
    border-radius: var(--cosmic-radius);
    letter-spacing: 0.03em;
    box-shadow: 0 0 10px rgba(193, 71, 233, 0.2);
}

.your-wildest-guess .button::before,
.your-wildest-guess .transparent-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(193, 71, 233, 0.15), transparent);
    transition: 0.5s;
}

.your-wildest-guess .button:hover,
.your-wildest-guess .transparent-button:hover {
    background-color: var(--cosmic-accent1);
    color: white;
    box-shadow: 0 0 20px rgba(193, 71, 233, 0.4);
}

.your-wildest-guess .button:hover::before,
.your-wildest-guess .transparent-button:hover::before {
    left: 100%;
}

.your-wildest-guess .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.your-wildest-guess #theme-switcher-container {
    position: relative;
    margin: 0 1rem;
    min-width: 220px;
    z-index: 1000;
}

.your-wildest-guess #theme-switcher {
    background-color: var(--cosmic-primary);
    color: var(--cosmic-text) !important;
    border: 2px solid var(--cosmic-accent1);
    padding: 0.9rem 2.6rem 0.9rem 1.1rem;
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    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='%23C147E9'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.1rem;
    cursor: pointer;
    transition: all var(--cosmic-transition);
    border-radius: var(--cosmic-radius);
    box-shadow: 0 0 10px rgba(193, 71, 233, 0.2);
}

.your-wildest-guess #theme-switcher option {
    background-color: var(--cosmic-primary) !important;
    color: var(--cosmic-text) !important;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 12px 15px !important;
}

.your-wildest-guess #theme-switcher option:hover {
    background-color: var(--cosmic-accent1) !important;
    color: white !important;
}

.your-wildest-guess #theme-switcher:focus {
    outline: none;
    border-color: var(--cosmic-accent1);
    box-shadow: 0 0 0 3px rgba(193, 71, 233, 0.3);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.your-wildest-guess #backToTopBtn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 9999;
    border: none;
    padding: 1.1rem 1.9rem;
    font-size: 1.05rem;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: white;
    background-color: var(--cosmic-accent1);
    cursor: pointer;
    transition: all var(--cosmic-transition);
    opacity: 0.95;
    display: none;
    border-radius: var(--cosmic-radius);
    box-shadow: 0 0 15px rgba(193, 71, 233, 0.5);
    letter-spacing: 0.03em;
}

.your-wildest-guess #backToTopBtn:hover {
    background-color: var(--cosmic-hover);
    opacity: 1;
    box-shadow: 0 0 25px rgba(193, 71, 233, 0.7);
}

/* ==================== FOOTER ==================== */
.your-wildest-guess footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cosmic-accent4);
    color: var(--cosmic-text);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .your-wildest-guess .container {
        padding: 1.5rem;
    }

    .your-wildest-guess #calendar-title {
        font-size: 2.2rem;
    }

    .your-wildest-guess #current-date {
        font-size: 1.6rem;
    }

    .your-wildest-guess #today-weather {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .your-wildest-guess {
        font-size: 1rem;
        line-height: 1.6;
    }

    .your-wildest-guess .clock-face {
        width: 160px;
        height: 160px;
        border-width: 7px;
    }

    .your-wildest-guess th {
        font-size: 0.9rem;
        padding: 0.9rem 0.4rem;
    }

    .your-wildest-guess th span.full-day-name {
        display: none;
    }

    .your-wildest-guess th abbr {
        display: inline;
    }

    .your-wildest-guess td {
        padding: 0.8rem;
        height: 85px;
        font-size: 0.9rem;
    }

    .your-wildest-guess td.current-day::before {
        font-size: 1.1rem;
        top: 4px;
        right: 4px;
    }

    .your-wildest-guess #backToTopBtn {
        right: 20px;
        bottom: 20px;
        padding: 1rem 1.6rem;
        font-size: 0.95rem;
    }

    .your-wildest-guess #theme-switcher {
        padding: 0.8rem 2.1rem 0.8rem 0.9rem;
        font-size: 0.95rem;
        min-width: 180px;
    }

    .your-wildest-guess #theme-switcher option {
        font-size: 0.95rem;
        padding: 10px !important;
    }
}

@media (max-width: 576px) {
    .your-wildest-guess .container {
        padding: 1rem;
    }

    .your-wildest-guess #calendar-title {
        font-size: 1.8rem;
    }

    .your-wildest-guess #current-date {
        font-size: 1.4rem;
    }

    .your-wildest-guess #today-weather {
        font-size: 1.1rem;
    }

    .your-wildest-guess .clock-face {
        width: 140px;
        height: 140px;
        border-width: 5px;
    }

    .your-wildest-guess th {
        font-size: 0.8rem;
        padding: 0.6rem 0.3rem;
    }

    .your-wildest-guess td {
        padding: 0.6rem;
        height: 75px;
        font-size: 0.9rem;
    }

    .your-wildest-guess td.current-day::before {
        font-size: 1rem;
    }

    .your-wildest-guess #theme-switcher {
        min-width: 160px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .your-wildest-guess th {
        font-size: 0.7rem;
        padding: 0.5rem 0.2rem;
    }

    .your-wildest-guess td {
        height: 65px;
    }

    .your-wildest-guess #theme-switcher {
        min-width: 140px;
        font-size: 0.85rem;
    }
}