/* ==========================================================================
   Middle of the Night Theme - Global Journey Calendar
   Version: 1.0
   Updated: 2024-06-10
   Changes:
   - Deep night and moonlight color palette
   - Nocturnal and starry elements
   - Mysterious night design aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500&display=swap');

:root {
    /* Middle of the Night Color Palette */
    --night-bg: #0A0A14;
    --night-text: #E6E6FA;
    --night-primary: #1A1A24;
    --night-secondary: #2A2A34;
    --night-date-number: #4A4A8C;

    /* Night Layer Colors */
    --night-layer1: #1A1A24;
    --night-layer2: #2A2A34;
    --night-layer3: #3A3A44;
    --night-layer4: #4A4A54;
    --night-layer5: #5A5A64;

    /* Night Accent Colors */
    --night-accent1: #4A4A8C;
    /* Dark Blue */
    --night-accent2: #6A6AAC;
    /* Medium Blue */
    --night-accent3: #8A8ACC;
    /* Light Blue */
    --night-accent4: #A0A0D0;
    /* Pale Blue */
    --night-accent5: rgba(74, 74, 140, 0.3);
    --night-accent6: rgba(106, 106, 172, 0.3);

    /* Theme Variables */
    --night-shadow: rgba(74, 74, 140, 0.15);
    --night-radius: 12px;
    --night-transition: 0.3s ease-in-out;
    --night-hover: #3A3A7C;
    --night-glow: 0 0 15px rgba(74, 74, 140, 0.3);
    --night-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="%234A4A8C"/><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="%234A4A8C"/><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="%234A4A8C"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes night-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes night-rise {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes night-pulse {

    0%,
    100% {
        box-shadow: 0 0 3px var(--night-shadow);
    }

    50% {
        box-shadow: var(--night-glow);
    }
}

@keyframes night-journey {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes night-compass {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-15px);
    }
}

@keyframes night-passport {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes night-flight {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes night-stars {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes night-moon {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes night-twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== BASE STYLES ==================== */
.middle-of-the-night {
    font-family: 'Inter', sans-serif;
    color: var(--night-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--night-bg);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(74, 74, 140, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(106, 106, 172, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="120" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,120 L100,100 L200,110 L300,95 L400,105 L500,90 L600,100 L700,85 L800,95 L900,80 L1000,90 L1100,75 L1200,85 L1200,120 Z" fill="%231A1A24" opacity="0.6"/></svg>'),
        linear-gradient(to bottom, var(--night-bg), var(--night-layer5));
    background-repeat: no-repeat;
    background-position: bottom;
    animation: night-journey 90s linear infinite;
    position: relative;
}

.middle-of-the-night::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="20" cy="25" r="0.8" fill="%234A4A8C"/><circle cx="80" cy="40" r="0.6" fill="%236A6AAC"/><circle cx="40" cy="70" r="1" fill="%238A8ACC"/><circle cx="60" cy="20" r="0.5" fill="%23A0A0D0"/><circle cx="90" cy="80" r="0.8" fill="%234A4A8C"/><circle cx="30" cy="50" r="0.7" fill="%236A6AAC"/><circle cx="70" cy="60" r="0.9" fill="%238A8ACC"/><circle cx="10" cy="30" r="0.6" fill="%23A0A0D0"/></svg>');
    background-size: 200px 200px;
    animation: night-stars 4s ease-in-out infinite;
    pointer-events: none;
}

.middle-of-the-night .container {
    background-color: var(--night-primary);
    padding: 2rem;
    border: 1px solid var(--night-accent5);
    box-shadow: var(--night-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--night-radius);
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    z-index: 1;
}

.middle-of-the-night .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--night-accent1) 0%,
            var(--night-accent2) 50%,
            var(--night-accent1) 100%);
}

.middle-of-the-night .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background-image: var(--night-pattern);
    background-size: 1200px 100%;
    opacity: 0.1;
}

/* ==================== HEADER & TITLE ==================== */
.middle-of-the-night #calendar-title {
    font-family: 'Playfair Display', serif;
    color: var(--night-text);
    text-align: center;
    font-size: 2.6rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
    position: relative;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.middle-of-the-night #calendar-title::after {
    content: "🌙";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    opacity: 0.8;
    animation: night-passport 3s ease-in-out infinite;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.middle-of-the-night #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--night-primary);
    border: 1px solid var(--night-accent5);
    border-radius: var(--night-radius);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.middle-of-the-night #date-weather-container::before {
    content: "🌌 NIGHT OVERVIEW";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--night-primary);
    padding: 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--night-text);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.middle-of-the-night #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--night-accent1), transparent);
}

.middle-of-the-night #current-date {
    font-family: 'Playfair Display', serif;
    color: var(--night-text);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.middle-of-the-night #today-weather {
    font-family: 'Inter', sans-serif;
    color: var(--night-text);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ==================== ANALOG CLOCK ==================== */
.middle-of-the-night #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.middle-of-the-night .clock-face {
    width: 180px;
    height: 180px;
    border: 6px solid var(--night-accent1);
    border-radius: 50%;
    position: relative;
    background-color: var(--night-primary);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    background-image:
        radial-gradient(circle at center, transparent 65%, var(--night-accent5) 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="%234A4A8C" stroke-width="0.5" opacity="0.3"/></svg>');
}

.middle-of-the-night .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);
}

.middle-of-the-night .hour-hand {
    width: 40%;
    left: 10%;
    height: 6px;
    background: var(--night-accent1);
    margin-top: -3px;
    border-radius: 3px;
}

.middle-of-the-night .minute-hand {
    width: 48%;
    left: 2%;
    height: 4px;
    background: var(--night-accent2);
    margin-top: -2px;
    border-radius: 2px;
}

.middle-of-the-night .second-hand {
    width: 48%;
    left: 2%;
    height: 2px;
    background: var(--night-accent3);
    margin-top: -1px;
}

/* Clock center ornament */
.middle-of-the-night .clock-face::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: var(--night-accent1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 2px var(--night-primary);
    animation: night-moon 4s ease-in-out infinite;
}

/* Twinkling star effects */
.middle-of-the-night .clock-face::before {
    content: "⭐";
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 0.8rem;
    animation: night-twinkle 2s ease-in-out infinite;
}

/* ==================== CALENDAR TABLE ==================== */
.middle-of-the-night table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.middle-of-the-night th {
    background: linear-gradient(135deg, var(--night-accent1), var(--night-accent2));
    color: var(--night-text) !important;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    padding: 0.8rem 0.4rem;
    border-radius: var(--night-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.middle-of-the-night th span.full-day-name {
    display: inline;
}

.middle-of-the-night th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.middle-of-the-night td {
    background-color: var(--night-primary);
    color: var(--night-text);
    padding: 1rem;
    border: 1px solid var(--night-accent5);
    height: 90px;
    vertical-align: top;
    transition: all var(--night-transition);
    position: relative;
    border-radius: var(--night-radius);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.middle-of-the-night td .date-number {
    color: var(--night-date-number) !important;
    font-weight: 700;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Playfair Display', serif;
}

.middle-of-the-night td:hover {
    background-color: var(--night-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Current date highlight */
.middle-of-the-night td.current-day {
    background-color: rgba(74, 74, 140, 0.15);
    border: 2px solid var(--night-accent1);
    animation: night-pulse 3s infinite;
}

.middle-of-the-night td.current-day .date-number {
    color: var(--night-text) !important;
    font-weight: 700;
}

.middle-of-the-night td.current-day::before {
    content: "🌠";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: bold;
    animation: night-flight 2s ease-in-out infinite;
}

/* ==================== EVENT MARKERS ==================== */
.middle-of-the-night .event-marker {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--night-accent1);
    margin: 0 1px;
    transition: all var(--night-transition);
}

.middle-of-the-night .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--night-accent4);
    box-shadow: 0 0 6px rgba(160, 160, 208, 0.4);
}

/* ==================== MODAL STYLES ==================== */
.middle-of-the-night .modal-content {
    position: relative;
    background-color: var(--night-primary);
    border: 1px solid var(--night-accent5);
    padding: 25px;
    color: var(--night-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-radius: var(--night-radius);
    animation: night-rise 0.3s ease-out;
}

.middle-of-the-night .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--night-accent1) 0%,
            var(--night-accent2) 50%,
            var(--night-accent1) 100%);
}

.middle-of-the-night .modal-content h2 {
    color: var(--night-text);
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Modal date display */
.middle-of-the-night .modal-date {
    font-family: 'Playfair Display', serif;
    color: var(--night-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--night-accent5);
}

/* Event list */
.middle-of-the-night .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.middle-of-the-night .event-item {
    background-color: var(--night-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--night-accent1);
    border-radius: var(--night-radius);
    transition: all var(--night-transition);
}

.middle-of-the-night .event-item:hover {
    background-color: var(--night-layer3);
    transform: translateX(3px);
}

.middle-of-the-night .event-time {
    font-family: 'Playfair Display', serif;
    color: var(--night-text);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.middle-of-the-night .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--night-text);
}

.middle-of-the-night .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--night-text);
    opacity: 0.9;
}

.middle-of-the-night .modal-content button {
    background: linear-gradient(135deg, var(--night-accent1), var(--night-accent2));
    color: var(--night-text);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--night-transition);
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    border-radius: var(--night-radius);
}

.middle-of-the-night .modal-content button:hover {
    background: linear-gradient(135deg, var(--night-hover), var(--night-accent2));
    box-shadow: 0 3px 10px rgba(74, 74, 140, 0.2);
}

/* Close Button */
.middle-of-the-night .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--night-primary);
    color: var(--night-text);
    border: 1px solid var(--night-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--night-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.middle-of-the-night .modal .close-button:hover {
    background-color: var(--night-text);
    color: var(--night-primary);
    border-color: var(--night-text);
}

/* ==================== BUTTONs & CONTROLS ==================== */
.middle-of-the-night .button,
.middle-of-the-night .transparent-button {
    border: 1px solid var(--night-accent1);
    color: var(--night-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--night-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--night-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.middle-of-the-night .button:hover,
.middle-of-the-night .transparent-button:hover {
    background: linear-gradient(135deg, var(--night-accent1), var(--night-accent2));
    color: var(--night-text);
    box-shadow: 0 3px 10px rgba(74, 74, 140, 0.15);
}

.middle-of-the-night .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.middle-of-the-night #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.middle-of-the-night #theme-switcher {
    background-color: var(--night-primary);
    color: var(--night-text) !important;
    border: 1px solid var(--night-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='%234A4A8C'%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(--night-transition);
    border-radius: var(--night-radius);
}

.middle-of-the-night #theme-switcher option {
    background-color: var(--night-primary) !important;
    color: var(--night-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 12px !important;
}

.middle-of-the-night #theme-switcher:focus {
    outline: none;
    border-color: var(--night-accent1);
    box-shadow: 0 0 0 2px rgba(74, 74, 140, 0.2);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.middle-of-the-night #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: var(--night-text);
    background: linear-gradient(135deg, var(--night-accent1), var(--night-accent2));
    cursor: pointer;
    transition: all var(--night-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--night-radius);
    box-shadow: 0 2px 8px rgba(74, 74, 140, 0.3);
}

.middle-of-the-night #backToTopBtn:hover {
    background: linear-gradient(135deg, var(--night-hover), var(--night-accent2));
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.middle-of-the-night footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--night-accent5);
    color: var(--night-text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .middle-of-the-night .container {
        padding: 1.5rem;
    }

    .middle-of-the-night #calendar-title {
        font-size: 2rem;
    }

    .middle-of-the-night #current-date {
        font-size: 1.5rem;
    }

    .middle-of-the-night #today-weather {
        font-size: 1.1rem;
    }

    .middle-of-the-night .modal-date {
        font-size: 1.3rem;
    }

    .middle-of-the-night .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .middle-of-the-night {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .middle-of-the-night .clock-face {
        width: 150px;
        height: 150px;
        border-width: 5px;
    }

    .middle-of-the-night th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .middle-of-the-night th span.full-day-name {
        display: none;
    }

    .middle-of-the-night th abbr {
        display: inline;
    }

    .middle-of-the-night td {
        padding: 0.7rem;
        height: 80px;
    }

    .middle-of-the-night td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .middle-of-the-night td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .middle-of-the-night #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .middle-of-the-night #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .middle-of-the-night .modal-content {
        padding: 20px;
    }

    .middle-of-the-night .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .middle-of-the-night .container {
        padding: 1rem;
    }

    .middle-of-the-night #calendar-title {
        font-size: 1.7rem;
    }

    .middle-of-the-night #current-date {
        font-size: 1.3rem;
    }

    .middle-of-the-night #today-weather {
        font-size: 1rem;
    }

    .middle-of-the-night .clock-face {
        width: 130px;
        height: 130px;
        border-width: 4px;
    }

    .middle-of-the-night th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .middle-of-the-night td {
        padding: 0.6rem;
        height: 70px;
    }

    .middle-of-the-night td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .middle-of-the-night #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .middle-of-the-night .modal-content {
        padding: 15px;
    }

    .middle-of-the-night .modal-date {
        font-size: 1.2rem;
    }

    .middle-of-the-night .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .middle-of-the-night th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .middle-of-the-night td {
        height: 60px;
    }

    .middle-of-the-night td .date-number {
        font-size: 0.9rem;
    }

    .middle-of-the-night #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}