/* ==========================================================================
   Polar Star Theme - Arctic Night Calendar
   Version: 1.4
   Updated: 2024-06-08
   Changes:
   - MAXIMUM TEXT VISIBILITY ENHANCEMENTS
   - EXTREME CONTRAST for all text elements
   - SUPER BOLD typography with strong outlines
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@800;900&family=Roboto:wght@700;800&display=swap');

:root {
    /* Polar Star Palette - MAXIMUM CONTRAST */
    --ps-bg: #0A1428;
    --ps-text: #FFFFFF;
    --ps-primary: #1A2438;
    --ps-secondary: #243048;
    --ps-date-number: #FFFFFF;

    /* Polar Blue - Maximum Contrast */
    --ps-blue1: #2A4A7A;
    --ps-blue2: #1A3A6A;
    --ps-blue3: #0A2A5A;
    --ps-blue4: rgba(42, 74, 122, 0.9);
    --ps-blue5: rgba(42, 74, 122, 0.4);

    /* Star White - Maximum Brightness */
    --ps-star1: #FFFFFF;
    --ps-star2: #FFFFFF;
    --ps-star3: #FFFFFF;
    --ps-star4: rgba(255, 255, 255, 1);
    --ps-star5: rgba(255, 255, 255, 0.5);

    /* Silver Frost - Maximum Contrast */
    --ps-silver1: #E0E8FF;
    --ps-silver2: #C8D0FF;
    --ps-silver3: #B0B8FF;
    --ps-silver4: rgba(224, 232, 255, 1);
    --ps-silver5: rgba(224, 232, 255, 0.5);

    /* Ice Crystal - Maximum Brightness */
    --ps-ice1: #FFFFFF;
    --ps-ice2: #E0FFFF;
    --ps-ice3: #C0FFFF;
    --ps-ice4: rgba(255, 255, 255, 1);
    --ps-ice5: rgba(255, 255, 255, 0.5);

    /* Aurora Teal - Maximum Brightness */
    --ps-aurora1: #70FFFF;
    --ps-aurora2: #50FFFF;
    --ps-aurora3: #30FFFF;
    --ps-aurora4: rgba(112, 255, 255, 1);
    --ps-aurora5: rgba(112, 255, 255, 0.5);

    /* Night Violet - Maximum Contrast */
    --ps-violet1: #A090FF;
    --ps-violet2: #9080FF;
    --ps-violet3: #8070FF;
    --ps-violet4: rgba(160, 144, 255, 1);
    --ps-violet5: rgba(160, 144, 255, 0.5);

    /* Theme Variables - Enhanced Visibility */
    --ps-shadow: rgba(255, 255, 255, 0.3);
    --ps-radius: 8px;
    --ps-transition: 0.3s ease;
    --ps-hover: #50FFFF;
    --ps-glow: 0 0 25px rgba(255, 255, 255, 0.4);
    --ps-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=".1" fill="%23FFFFFF"/><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=".15" fill="%23FFFFFF"/><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=".2" fill="%23FFFFFF"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes ps-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes ps-slide {
    from {
        transform: translateY(3px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ps-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--ps-shadow);
    }

    50% {
        box-shadow: var(--ps-glow);
    }
}

@keyframes ps-twinkle {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes ps-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes ps-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes ps-ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes ps-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes ps-star-trail {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        transform: translateX(100px) translateY(100px);
        opacity: 0;
    }
}

@keyframes ps-constellation {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes ps-aurora-wave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ==================== BASE STYLES ==================== */
.polar-star {
    font-family: 'Roboto', sans-serif;
    color: var(--ps-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--ps-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-weight: 700;
}

.polar-star::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--ps-blue5) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--ps-star5) 0%, transparent 50%),
        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.8" fill="%23FFFFFF" opacity="1"/><circle cx="40" cy="60" r="1" fill="%23FFFFFF" opacity="0.9"/><circle cx="70" cy="30" r="0.8" fill="%23FFFFFF" opacity="1"/><circle cx="90" cy="80" r="1" fill="%23FFFFFF" opacity="0.9"/><circle cx="10" cy="90" r="0.6" fill="%23FFFFFF" opacity="0.8"/><circle cx="50" cy="50" r="1.2" fill="%23FFFFFF" opacity="0.7"/></svg>');
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 1;
}

/* Constellation lines in background */
.polar-star::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, transparent 98%, var(--ps-star5) 100%),
        linear-gradient(135deg, transparent 98%, var(--ps-star5) 100%),
        linear-gradient(225deg, transparent 98%, var(--ps-star5) 100%),
        linear-gradient(315deg, transparent 98%, var(--ps-star5) 100%);
    opacity: 0.2;
    z-index: 0;
}

.polar-star .container {
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    padding: 1.5rem;
    border: 2px solid var(--ps-blue4);
    box-shadow:
        var(--ps-glow),
        inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 14px;
    z-index: 2;
    background-image:
        radial-gradient(circle at 10% 20%, var(--ps-blue5) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, var(--ps-star5) 0%, transparent 50%);
}

.polar-star .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--ps-ice1),
            var(--ps-star1),
            var(--ps-ice1),
            transparent);
    animation: ps-aurora-wave 6s linear infinite;
    background-size: 200% 100%;
}

.polar-star .container::after {
    content: "✨";
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: ps-twinkle 3s ease-in-out infinite;
}

/* ==================== HEADER & TITLE - MAXIMUM VISIBILITY ==================== */
.polar-star #calendar-title {
    font-family: 'Alegreya Sans SC', sans-serif;
    color: var(--ps-text);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    position: relative;
    font-weight: 900;
    text-shadow:
        0 0 20px var(--ps-ice4),
        0 0 40px var(--ps-blue4),
        0 0 60px var(--ps-violet4),
        0 4px 8px rgba(0, 0, 0, 0.8),
        0 6px 12px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, var(--ps-star1) 0%, var(--ps-ice1) 50%, var(--ps-aurora1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: ps-shimmer 6s linear infinite;
    padding: 0.5rem 0;
    border-bottom: 3px solid var(--ps-ice1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.polar-star #calendar-title::after {
    content: "⭐";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    opacity: 1;
    animation: ps-rotate 20s linear infinite;
    text-shadow: 0 0 20px var(--ps-star4), 0 0 40px var(--ps-aurora4);
}

/* ==================== DATE & WEATHER DISPLAY - MAXIMUM VISIBILITY ==================== */
.polar-star #date-weather-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    border: 2px solid var(--ps-blue4);
    border-radius: var(--ps-radius);
    position: relative;
    box-shadow:
        0 4px 20px var(--ps-shadow),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.polar-star #date-weather-container::before {
    content: "POLAR STAR";
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    padding: 4px 12px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--ps-ice1);
    font-weight: 800;
    font-family: 'Alegreya Sans SC', sans-serif;
    text-transform: uppercase;
    border: 2px solid var(--ps-blue4);
    border-radius: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px var(--ps-ice4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.polar-star #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ps-ice1), var(--ps-aurora1), var(--ps-ice1), transparent);
    box-shadow: 0 0 10px var(--ps-ice4);
}

.polar-star #current-date {
    font-family: 'Alegreya Sans SC', sans-serif;
    color: var(--ps-text);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow:
        0 0 15px var(--ps-ice4),
        0 0 30px var(--ps-blue4),
        0 3px 6px rgba(0, 0, 0, 0.8),
        0 5px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.05em;
}

.polar-star #today-weather {
    font-family: 'Roboto', sans-serif;
    color: var(--ps-ice1);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow:
        0 0 12px var(--ps-ice4),
        0 0 24px var(--ps-aurora4),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid var(--ps-ice4);
}

/* ==================== ANALOG CLOCK - MAXIMUM VISIBILITY ==================== */
.polar-star #analog-watch {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.polar-star .clock-face {
    width: 180px;
    height: 180px;
    border: 4px solid var(--ps-ice1);
    border-radius: 50%;
    position: relative;
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    box-shadow:
        0 6px 30px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.polar-star .clock-face::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-star1) 100%);
    border-radius: 50%;
    z-index: 10;
    box-shadow:
        0 0 20px var(--ps-shadow),
        inset 0 0 5px rgba(255, 255, 255, 0.5);
    animation: ps-twinkle 2s ease-in-out infinite;
    border: 3px solid var(--ps-primary);
}

.polar-star .clock-face::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at center, transparent 70%, var(--ps-blue5) 100%),
        repeating-conic-gradient(from 0deg,
            transparent 0deg 29deg,
            var(--ps-star5) 30deg 30deg);
}

.polar-star .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);
    z-index: 5;
}

.polar-star .hour-hand {
    width: 35%;
    left: 15%;
    height: 6px;
    background: linear-gradient(90deg, var(--ps-star1) 0%, var(--ps-ice1) 100%);
    margin-top: -3px;
    border-radius: 3px;
    box-shadow: 0 0 12px var(--ps-shadow);
    border: 1px solid var(--ps-primary);
}

.polar-star .minute-hand {
    width: 45%;
    left: 5%;
    height: 4px;
    background: linear-gradient(90deg, var(--ps-ice1) 0%, var(--ps-silver1) 100%);
    margin-top: -2px;
    border-radius: 2px;
    box-shadow: 0 0 12px var(--ps-shadow);
    border: 1px solid var(--ps-primary);
}

.polar-star .second-hand {
    width: 45%;
    left: 5%;
    height: 3px;
    background: linear-gradient(90deg, var(--ps-primary) 0%, var(--ps-violet1) 100%);
    margin-top: -1.5px;
    box-shadow: 0 0 10px var(--ps-violet4), 0 0 20px var(--ps-violet4);
    border: 1px solid var(--ps-violet1);
}

/* Clock numbers for better visibility */
.polar-star .clock-face .clock-number {
    position: absolute;
    color: var(--ps-ice1);
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--ps-ice4), 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ==================== CALENDAR TABLE - MAXIMUM VISIBILITY ==================== */
.polar-star table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin: 2rem auto;
    background-color: transparent;
    table-layout: fixed;
    border: 2px solid var(--ps-blue4);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* DAY OF WEEK HEADERS - EXTREME VISIBILITY */
.polar-star th {
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-blue1) 100%);
    color: var(--ps-primary) !important;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 900;
    padding: 1rem 0.5rem;
    border-radius: var(--ps-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px var(--ps-ice4);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.5);
}

.polar-star th::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.4) 100%);
    pointer-events: none;
}

.polar-star th span.full-day-name {
    display: inline;
    position: relative;
    z-index: 1;
    font-weight: 900;
}

.polar-star th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES - EXTREME VISIBILITY */
.polar-star td {
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    color: var(--ps-text);
    padding: 1rem;
    border: 2px solid var(--ps-blue4);
    height: 90px;
    vertical-align: top;
    transition: all var(--ps-transition);
    position: relative;
    border-radius: var(--ps-radius);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.3),
        0 4px 15px var(--ps-shadow);
}

.polar-star td .date-number {
    color: var(--ps-date-number) !important;
    font-weight: 900;
    font-size: 1.5rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Alegreya Sans SC', sans-serif;
    text-shadow:
        0 0 15px var(--ps-ice4),
        0 0 30px var(--ps-aurora4),
        0 3px 6px rgba(0, 0, 0, 0.9),
        0 5px 10px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--ps-ice4);
}

.polar-star td:hover {
    background: linear-gradient(135deg, var(--ps-secondary) 0%, #2A3858 100%);
    box-shadow:
        0 6px 25px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
    border-color: var(--ps-ice1);
    transform: translateY(-3px) scale(1.02);
}

/* Current date highlight - MAXIMUM VISIBILITY */
.polar-star td.current-day {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(112, 255, 255, 0.3) 100%);
    border: 3px solid var(--ps-ice1);
    animation: ps-pulse 3s infinite;
    background-image:
        radial-gradient(circle at 70% 30%, var(--ps-star5) 0%, transparent 50%);
    box-shadow:
        0 0 30px var(--ps-ice4),
        0 0 50px var(--ps-aurora4),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.polar-star td.current-day .date-number {
    color: var(--ps-star1) !important;
    font-weight: 900;
    font-size: 1.8rem;
    text-shadow:
        0 0 20px var(--ps-ice4),
        0 0 40px var(--ps-aurora4),
        0 0 60px var(--ps-violet4),
        0 4px 8px rgba(0, 0, 0, 1);
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--ps-star1);
    padding: 6px 12px;
}

.polar-star td.current-day::before {
    content: "⭐";
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    font-size: 1.5rem;
    animation: ps-twinkle 1.5s ease-in-out infinite;
    opacity: 1;
    text-shadow: 0 0 20px var(--ps-star4), 0 0 40px var(--ps-aurora4);
}

/* ==================== EVENT MARKERS - MAXIMUM VISIBILITY ==================== */
.polar-star .event-marker {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-star1) 100%);
    margin: 0 2px;
    transition: all var(--ps-transition);
    animation: ps-twinkle 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 8px var(--ps-shadow),
        0 0 0 3px rgba(255, 255, 255, 0.5);
    border: 2px solid var(--ps-primary);
}

.polar-star .event-marker::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background-color: var(--ps-primary);
    border-radius: 50%;
    opacity: 1;
}

.polar-star .event-marker:hover {
    transform: scale(2);
    background: linear-gradient(135deg, var(--ps-star1) 0%, var(--ps-aurora1) 100%);
    box-shadow:
        0 0 15px var(--ps-shadow),
        0 0 0 4px rgba(255, 255, 255, 0.6);
    animation: ps-twinkle 0.5s ease-in-out infinite;
}

/* ==================== MODAL STYLES - MAXIMUM VISIBILITY ==================== */
.polar-star .modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    border: 3px solid var(--ps-blue4);
    padding: 25px;
    color: var(--ps-text);
    box-shadow:
        0 15px 50px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    animation: ps-slide 0.3s ease-out;
    overflow: hidden;
}

.polar-star .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            transparent,
            var(--ps-ice1),
            var(--ps-star1),
            var(--ps-ice1),
            transparent);
    animation: ps-aurora-wave 6s linear infinite;
    background-size: 200% 100%;
    box-shadow: 0 0 20px var(--ps-ice4);
}

.polar-star .modal-content h2 {
    color: var(--ps-text);
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--ps-star1) 0%, var(--ps-ice1) 50%, var(--ps-aurora1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow:
        0 0 20px var(--ps-ice4),
        0 0 40px var(--ps-blue4),
        0 4px 8px rgba(0, 0, 0, 0.9);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ps-ice1);
}

/* Modal date display */
.polar-star .modal-date {
    font-family: 'Alegreya Sans SC', sans-serif;
    color: var(--ps-text);
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--ps-blue4);
    text-shadow:
        0 0 12px var(--ps-ice4),
        0 0 24px var(--ps-aurora4),
        0 3px 6px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid var(--ps-ice4);
}

/* Event list */
.polar-star .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.polar-star .event-item {
    background: linear-gradient(135deg, var(--ps-secondary) 0%, #2A3858 100%);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 5px solid var(--ps-ice1);
    border-radius: var(--ps-radius);
    transition: all var(--ps-transition);
    box-shadow:
        0 4px 15px var(--ps-shadow),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.polar-star .event-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(112, 255, 255, 0.3) 100%);
    transform: translateX(5px) scale(1.03);
    border-left-color: var(--ps-star1);
    box-shadow:
        0 6px 25px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.polar-star .event-time {
    font-family: 'Roboto', sans-serif;
    color: var(--ps-ice1);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
    text-shadow:
        0 0 10px var(--ps-ice4),
        0 0 20px var(--ps-aurora4),
        0 2px 4px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--ps-ice4);
}

.polar-star .event-title {
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--ps-text);
    text-shadow:
        0 0 10px var(--ps-ice4),
        0 0 20px var(--ps-blue4),
        0 3px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.03em;
}

.polar-star .event-description {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ps-text);
    font-weight: 700;
    text-shadow:
        0 0 8px var(--ps-ice4),
        0 0 16px var(--ps-blue4),
        0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--ps-blue4);
}

.polar-star .modal-content button {
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-blue1) 100%);
    color: var(--ps-primary);
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--ps-transition);
    letter-spacing: 0.1em;
    font-family: 'Alegreya Sans SC', sans-serif;
    border-radius: var(--ps-radius);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 1),
        0 0 10px var(--ps-ice4);
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.polar-star .modal-content button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.polar-star .modal-content button:hover::before {
    left: 100%;
}

.polar-star .modal-content button:hover {
    background: linear-gradient(135deg, var(--ps-hover) 0%, var(--ps-blue2) 100%);
    box-shadow:
        0 6px 30px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 1),
        0 0 15px var(--ps-star4);
}

/* Close Button - MAXIMUM VISIBILITY */
.polar-star .modal .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    color: var(--ps-ice1);
    border: 3px solid var(--ps-ice1);
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all var(--ps-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow:
        0 4px 15px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 10px var(--ps-ice4);
}

.polar-star .modal .close-button:hover {
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-blue1) 100%);
    color: var(--ps-primary);
    border-color: var(--ps-star1);
    transform: rotate(180deg) scale(1.2);
    box-shadow:
        0 0 30px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* ==================== BUTTONS & CONTROLS - MAXIMUM VISIBILITY ==================== */
.polar-star .button,
.polar-star .transparent-button {
    border: 3px solid var(--ps-ice1);
    color: var(--ps-ice1);
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    padding: 1rem 1.8rem;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--ps-transition);
    position: relative;
    overflow: hidden;
    margin: 0.5rem;
    border-radius: var(--ps-radius);
    letter-spacing: 0.08em;
    font-size: 1rem;
    box-shadow:
        0 4px 20px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px var(--ps-ice4);
}

.polar-star .button::before,
.polar-star .transparent-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--ps-ice5), transparent);
    transition: left 0.6s;
}

.polar-star .button:hover::before,
.polar-star .transparent-button:hover::before {
    left: 100%;
}

.polar-star .button:hover,
.polar-star .transparent-button:hover {
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-blue1) 100%);
    color: var(--ps-primary);
    box-shadow:
        0 6px 30px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.08);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 1),
        0 0 15px var(--ps-star4);
}

.polar-star .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    gap: 0.6rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 2px solid var(--ps-blue4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* ==================== THEME SWITCHER - MAXIMUM VISIBILITY ==================== */
.polar-star #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.polar-star #theme-switcher {
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%);
    color: var(--ps-ice1) !important;
    border: 3px solid var(--ps-ice1);
    padding: 1rem 2.5rem 1rem 1.2rem;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    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='%23FFFFFF'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    cursor: pointer;
    transition: all var(--ps-transition);
    border-radius: var(--ps-radius);
    box-shadow:
        0 4px 20px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px var(--ps-ice4);
}

.polar-star #theme-switcher option {
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-secondary) 100%) !important;
    color: var(--ps-ice1) !important;
    font-size: 1rem;
    font-weight: 900;
    padding: 12px 15px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.polar-star #theme-switcher:focus {
    outline: none;
    border-color: var(--ps-star1);
    box-shadow:
        0 0 0 4px var(--ps-shadow),
        0 0 40px var(--ps-glow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
    transform: scale(1.02);
}

/* ==================== BACK TO TOP BUTTON - MAXIMUM VISIBILITY ==================== */
.polar-star #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 900;
    color: var(--ps-primary);
    background: linear-gradient(135deg, var(--ps-ice1) 0%, var(--ps-blue1) 100%);
    cursor: pointer;
    transition: all var(--ps-transition);
    opacity: 1;
    display: none;
    border-radius: var(--ps-radius);
    box-shadow:
        0 6px 30px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.3);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 1),
        0 0 10px var(--ps-ice4);
    border: 3px solid rgba(255, 255, 255, 0.4);
    letter-spacing: 0.08em;
}

.polar-star #backToTopBtn:hover {
    background: linear-gradient(135deg, var(--ps-hover) 0%, var(--ps-blue2) 100%);
    opacity: 1;
    transform: translateY(-4px) scale(1.08);
    box-shadow:
        0 8px 40px var(--ps-shadow),
        inset 0 0 0 3px rgba(255, 255, 255, 0.4);
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 1),
        0 0 15px var(--ps-star4);
}

/* ==================== FOOTER - MAXIMUM VISIBILITY ==================== */
.polar-star footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 3px solid var(--ps-blue4);
    color: var(--ps-ice1);
    font-size: 1rem;
    font-weight: 900;
    text-shadow:
        0 0 12px var(--ps-ice4),
        0 0 24px var(--ps-aurora4),
        0 3px 6px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid var(--ps-blue4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.05em;
}

/* ==================== EXTRA VISIBILITY ENHANCEMENTS ==================== */
/* All text elements get black outline for maximum contrast */
.polar-star h1,
.polar-star h2,
.polar-star h3,
.polar-star h4,
.polar-star h5,
.polar-star h6,
.polar-star p,
.polar-star span,
.polar-star div,
.polar-star li,
.polar-star td,
.polar-star th {
    text-shadow:
        0 0 10px currentColor,
        0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Input elements */
.polar-star input,
.polar-star select,
.polar-star textarea {
    border: 2px solid var(--ps-ice1) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    color: var(--ps-text) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px var(--ps-ice4) !important;
    box-shadow: 0 0 15px var(--ps-shadow) !important;
}

/* Links */
.polar-star a {
    color: var(--ps-ice1) !important;
    text-shadow: 0 0 15px var(--ps-ice4), 0 0 30px var(--ps-aurora4) !important;
    font-weight: 800 !important;
    text-decoration: underline !important;
}

/* Tooltips and labels */
.polar-star .tooltip,
.polar-star label {
    background: rgba(0, 0, 0, 0.8) !important;
    color: var(--ps-ice1) !important;
    border: 2px solid var(--ps-ice1) !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px var(--ps-ice4) !important;
    box-shadow: 0 0 20px var(--ps-shadow) !important;
}

/* ==================== MEDIA QUERIES - MAINTAINING VISIBILITY ==================== */
@media (max-width: 992px) {
    .polar-star .container {
        padding: 1.5rem;
    }

    .polar-star #calendar-title {
        font-size: 2.2rem;
    }

    .polar-star #current-date {
        font-size: 1.6rem;
    }

    .polar-star #today-weather {
        font-size: 1rem;
    }

    .polar-star .modal-date {
        font-size: 1.3rem;
    }

    .polar-star .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .polar-star {
        font-size: 1rem;
        line-height: 1.5;
    }

    .polar-star .clock-face {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }

    .polar-star th {
        font-size: 0.9rem;
        padding: 0.8rem 0.3rem;
    }

    .polar-star th span.full-day-name {
        display: none;
    }

    .polar-star th abbr {
        display: inline;
        font-weight: 900;
    }

    .polar-star td {
        padding: 0.8rem;
        height: 80px;
        font-size: 0.9rem;
    }

    .polar-star td .date-number {
        font-size: 1.3rem;
        top: 6px;
        left: 6px;
    }

    .polar-star td.current-day::before {
        font-size: 1.2rem;
        top: 4px;
        right: 4px;
    }

    .polar-star #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .polar-star #theme-switcher {
        padding: 0.8rem 2rem 0.8rem 1rem;
        font-size: 0.9rem;
        min-width: 180px;
    }

    .polar-star .modal-content {
        padding: 20px;
    }

    .polar-star .event-item {
        padding: 0.9rem;
    }
}

@media (max-width: 576px) {
    .polar-star .container {
        padding: 1rem;
    }

    .polar-star #calendar-title {
        font-size: 1.8rem;
    }

    .polar-star #current-date {
        font-size: 1.4rem;
    }

    .polar-star #today-weather {
        font-size: 0.9rem;
    }

    .polar-star .clock-face {
        width: 130px;
        height: 130px;
        border-width: 3px;
    }

    .polar-star th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .polar-star td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .polar-star td .date-number {
        font-size: 1.1rem;
        top: 5px;
        left: 5px;
    }

    .polar-star #theme-switcher {
        min-width: 160px;
        font-size: 0.85rem;
    }

    .polar-star .modal-content {
        padding: 15px;
    }

    .polar-star .modal-date {
        font-size: 1.2rem;
    }

    .polar-star .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .polar-star th {
        font-size: 0.75rem;
        padding: 0.5rem 0.15rem;
    }

    .polar-star td {
        height: 65px;
    }

    .polar-star td .date-number {
        font-size: 1rem;
    }

    .polar-star #theme-switcher {
        min-width: 140px;
        font-size: 0.8rem;
    }

    .polar-star .controls {
        flex-direction: column;
        gap: 0.3rem;
    }

    .polar-star .button,
    .polar-star .transparent-button {
        width: 100%;
        margin: 0.2rem 0;
    }
}

/* High contrast mode support - EXTREME CONTRAST */
@media (prefers-contrast: high) {
    .polar-star {
        --ps-ice1: #00FFFF;
        --ps-blue1: #0000FF;
        --ps-text: #FFFFFF;
        --ps-star1: #FFFFFF;
        --ps-aurora1: #00FF00;
        --ps-violet1: #FF00FF;
    }

    .polar-star td.current-day {
        border: 4px solid var(--ps-ice1) !important;
        background: linear-gradient(135deg, rgba(0, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%) !important;
        animation: ps-pulse 1s infinite !important;
    }

    .polar-star th {
        background: var(--ps-ice1) !important;
        color: #000000 !important;
    }

    .polar-star #calendar-title,
    .polar-star #current-date,
    .polar-star .event-title,
    .polar-star .event-description,
    .polar-star .modal-date {
        text-shadow:
            0 3px 0 #000000,
            0 6px 0 #000000,
            0 9px 0 #000000 !important;
        -webkit-text-stroke: 2px #000000;
        paint-order: stroke fill;
    }

    .polar-star td .date-number {
        font-weight: 900 !important;
        -webkit-text-stroke: 1.5px #000000;
    }

    .polar-star .button,
    .polar-star .transparent-button,
    .polar-star #theme-switcher {
        border: 4px solid var(--ps-ice1) !important;
        -webkit-text-stroke: 1px #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .polar-star *,
    .polar-star *::before,
    .polar-star *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .polar-star .hand {
        transition: none;
    }

    .polar-star .clock-face::before {
        animation: none;
    }
}

/* Light mode support - STILL MAXIMUM VISIBILITY */
@media (prefers-color-scheme: light) {
    .polar-star {
        --ps-bg: #FFFFFF;
        --ps-text: #000000;
        --ps-primary: #F0F8FF;
        --ps-secondary: #E0F0FF;
        --ps-date-number: #000000;
        --ps-shadow: rgba(0, 0, 0, 0.4);
        --ps-ice1: #0066CC;
        --ps-blue1: #003366;
        --ps-star1: #000000;
        --ps-aurora1: #008800;
        --ps-violet1: #6600CC;
    }

    .polar-star .container,
    .polar-star td {
        box-shadow:
            0 6px 30px rgba(0, 0, 0, 0.3),
            inset 0 0 0 3px rgba(0, 0, 0, 0.1);
    }

    .polar-star .modal-content {
        box-shadow:
            0 15px 50px rgba(0, 0, 0, 0.4),
            inset 0 0 0 3px rgba(0, 0, 0, 0.1);
    }

    .polar-star .button,
    .polar-star .transparent-button {
        box-shadow:
            0 4px 25px rgba(0, 0, 0, 0.3),
            inset 0 0 0 3px rgba(0, 0, 0, 0.1);
    }

    .polar-star #calendar-title,
    .polar-star #current-date,
    .polar-star .event-title,
    .polar-star .event-description,
    .polar-star .modal-date {
        text-shadow:
            0 0 15px rgba(255, 255, 255, 0.9),
            0 3px 6px rgba(0, 0, 0, 0.2),
            0 5px 10px rgba(0, 0, 0, 0.1);
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    }

    /* Invert background opacity for light mode */
    .polar-star #today-weather,
    .polar-star td .date-number,
    .polar-star .event-time,
    .polar-star .event-description {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #000000 !important;
        border-color: #000000 !important;
    }
}