/* ==========================================================================
   Tavewa Island Theme - Fijian Paradise Calendar
   Version: 1.2
   Updated: 2024-06-08
   Changes:
   - Fijian island design with vibrant tropical aesthetics
   - Coral reef, sand, and palm palette with ocean wave patterns
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;500;600&display=swap');

:root {
    /* Tavewa Island Palette */
    --ti-bg: #EAF7F9;
    --ti-text: #2C3E50;
    --ti-primary: #FFFFFF;
    --ti-secondary: #F0F9FB;
    --ti-date-number: #2C3E50;

    /* Fijian Ocean Blue */
    --ti-ocean1: #1E88E5;
    --ti-ocean2: #1565C0;
    --ti-ocean3: #0D47A1;
    --ti-ocean4: rgba(30, 136, 229, 0.7);
    --ti-ocean5: rgba(30, 136, 229, 0.3);

    /* Tropical Sand */
    --ti-sand1: #FFE0B2;
    --ti-sand2: #FFCC80;
    --ti-sand3: #FFB74D;
    --ti-sand4: rgba(255, 224, 178, 0.7);
    --ti-sand5: rgba(255, 224, 178, 0.3);

    /* Palm Green */
    --ti-palm1: #43A047;
    --ti-palm2: #388E3C;
    --ti-palm3: #2E7D32;
    --ti-palm4: rgba(67, 160, 71, 0.7);
    --ti-palm5: rgba(67, 160, 71, 0.3);

    /* Coral Reef */
    --ti-coral1: #FF7043;
    --ti-coral2: #F4511E;
    --ti-coral3: #D84315;
    --ti-coral4: rgba(255, 112, 67, 0.7);
    --ti-coral5: rgba(255, 112, 67, 0.3);

    /* Tropical Sky */
    --ti-sky1: #4FC3F7;
    --ti-sky2: #29B6F6;
    --ti-sky3: #03A9F4;
    --ti-sky4: rgba(79, 195, 247, 0.7);
    --ti-sky5: rgba(79, 195, 247, 0.3);

    /* Theme Variables */
    --ti-shadow: rgba(30, 136, 229, 0.15);
    --ti-radius: 10px;
    --ti-transition: 0.25s ease;
    --ti-hover: #1976D2;
    --ti-glow: 0 0 15px rgba(30, 136, 229, 0.2);
    --ti-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=".04" fill="%231E88E5"/><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=".05" fill="%231E88E5"/><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=".07" fill="%231E88E5"/></svg>');
}

/* ==================== ANIMATIONS ==================== */
@keyframes ti-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes ti-slide {
    from {
        transform: translateY(3px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ti-pulse {

    0%,
    100% {
        box-shadow: 0 0 3px var(--ti-shadow);
    }

    50% {
        box-shadow: var(--ti-glow);
    }
}

@keyframes ti-wave {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

@keyframes ti-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes ti-ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes ti-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes ti-palm-sway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes ti-shell-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== BASE STYLES ==================== */
.tavewa-island {
    font-family: 'Open Sans', sans-serif;
    color: var(--ti-text);
    line-height: 1.5;
    font-size: 0.95rem;
    background-color: var(--ti-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.tavewa-island::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--ti-ocean5) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--ti-sand5) 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"><path d="M10,40 Q30,30 50,40 Q70,50 90,40" stroke="%231E88E5" fill="none" stroke-width="0.3" opacity="0.08"/><path d="M5,60 Q25,50 45,60 Q65,70 85,60" stroke="%2343A047" fill="none" stroke-width="0.3" opacity="0.05"/><path d="M15,80 Q35,70 55,80 Q75,90 95,80" stroke="%23FF7043" fill="none" stroke-width="0.3" opacity="0.04"/></svg>');
    background-size: 150px 150px;
    pointer-events: none;
    z-index: 1;
}

.tavewa-island .container {
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    padding: 1.5rem;
    border: 1px solid var(--ti-ocean4);
    box-shadow:
        var(--ti-glow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    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(--ti-ocean5) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, var(--ti-sand5) 0%, transparent 50%);
}

.tavewa-island .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            var(--ti-ocean1) 0%,
            var(--ti-coral1) 50%,
            var(--ti-sand1) 100%);
    animation: ti-wave 4s linear infinite;
    background-size: 200% 100%;
}

.tavewa-island .container::after {
    content: "🐚";
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.2rem;
    opacity: 0.15;
    animation: ti-shell-rotate 8s linear infinite;
}

/* ==================== HEADER & TITLE ==================== */
.tavewa-island #calendar-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--ti-text);
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    position: relative;
    font-weight: 600;
    text-shadow:
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--ti-ocean1) 0%, var(--ti-coral1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: ti-shimmer 4s linear infinite;
}

.tavewa-island #calendar-title::after {
    content: "🌺";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
    animation: ti-float 3s ease-in-out infinite;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.tavewa-island #date-weather-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    border: 1px solid var(--ti-ocean4);
    border-radius: var(--ti-radius);
    position: relative;
    box-shadow:
        0 2px 12px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    overflow: hidden;
}

.tavewa-island #date-weather-container::before {
    content: "TAVEWA ISLAND";
    position: absolute;
    top: -8px;
    right: 15px;
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    padding: 0 8px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--ti-ocean2);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    border: 1px solid var(--ti-ocean4);
    border-radius: 4px;
}

.tavewa-island #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ti-ocean2), transparent);
}

.tavewa-island #current-date {
    font-family: 'Montserrat', sans-serif;
    color: var(--ti-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tavewa-island #today-weather {
    font-family: 'Open Sans', sans-serif;
    color: var(--ti-ocean2);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* ==================== ANALOG CLOCK ==================== */
.tavewa-island #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.tavewa-island .clock-face {
    width: 150px;
    height: 150px;
    border: 2px solid var(--ti-ocean2);
    border-radius: 50%;
    position: relative;
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    box-shadow:
        0 4px 15px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    overflow: hidden;
}

.tavewa-island .clock-face::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    border-radius: 50%;
    z-index: 10;
    box-shadow:
        0 0 5px var(--ti-shadow),
        inset 0 0 3px rgba(255, 255, 255, 0.5);
}

.tavewa-island .clock-face::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at center, transparent 70%, var(--ti-ocean5) 100%),
        repeating-conic-gradient(from 0deg,
            transparent 0deg 29deg,
            var(--ti-ocean5) 30deg 30deg);
}

.tavewa-island .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;
}

.tavewa-island .hour-hand {
    width: 35%;
    left: 15%;
    height: 3px;
    background: linear-gradient(90deg, var(--ti-coral2) 0%, var(--ti-ocean2) 100%);
    margin-top: -1.5px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tavewa-island .minute-hand {
    width: 45%;
    left: 5%;
    height: 2px;
    background: linear-gradient(90deg, var(--ti-ocean2) 0%, var(--ti-palm2) 100%);
    margin-top: -1px;
    border-radius: 1.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tavewa-island .second-hand {
    width: 45%;
    left: 5%;
    height: 1px;
    background: linear-gradient(90deg, var(--ti-primary) 0%, var(--ti-sand2) 100%);
    margin-top: -0.5px;
}

/* ==================== CALENDAR TABLE ==================== */
.tavewa-island table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin: 1.5rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.tavewa-island th {
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    color: var(--ti-primary) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 0.8rem 0.4rem;
    border-radius: var(--ti-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tavewa-island th::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
}

.tavewa-island th span.full-day-name {
    display: inline;
    position: relative;
    z-index: 1;
}

.tavewa-island th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.tavewa-island td {
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    color: var(--ti-text);
    padding: 0.8rem;
    border: 1px solid var(--ti-ocean4);
    height: 80px;
    vertical-align: top;
    transition: all var(--ti-transition);
    position: relative;
    border-radius: var(--ti-radius);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.8),
        0 1px 5px var(--ti-shadow);
}

.tavewa-island td .date-number {
    color: var(--ti-text) !important;
    font-weight: 600;
    font-size: 1.1rem;
    position: absolute;
    top: 6px;
    left: 6px;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tavewa-island td:hover {
    background: linear-gradient(135deg, var(--ti-secondary) 0%, #E8F4F7 100%);
    box-shadow:
        0 4px 15px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    border-color: var(--ti-ocean2);
    transform: translateY(-2px);
}

/* Current date highlight */
.tavewa-island td.current-day {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(255, 112, 67, 0.1) 100%);
    border: 1px solid var(--ti-coral2);
    animation: ti-pulse 4s infinite;
    background-image:
        radial-gradient(circle at 70% 30%, var(--ti-sand5) 0%, transparent 50%);
}

.tavewa-island td.current-day .date-number {
    color: var(--ti-coral2) !important;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.tavewa-island td.current-day::before {
    content: "🌊";
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    font-size: 1rem;
    animation: ti-float 2s ease-in-out infinite;
    opacity: 0.7;
}

/* ==================== EVENT MARKERS ==================== */
.tavewa-island .event-marker {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    margin: 0 1px;
    transition: all var(--ti-transition);
    animation: ti-pulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 2px var(--ti-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.5);
}

.tavewa-island .event-marker::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2px;
    background-color: var(--ti-primary);
    border-radius: 50%;
    opacity: 0.9;
}

.tavewa-island .event-marker:hover {
    transform: scale(1.3);
    background: linear-gradient(135deg, var(--ti-coral2) 0%, var(--ti-ocean2) 100%);
    box-shadow:
        0 0 5px var(--ti-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* ==================== MODAL STYLES ==================== */
.tavewa-island .modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    border: 1px solid var(--ti-ocean4);
    padding: 20px;
    color: var(--ti-text);
    box-shadow:
        0 10px 30px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    animation: ti-slide 0.25s ease-out;
    overflow: hidden;
}

.tavewa-island .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            var(--ti-ocean1) 0%,
            var(--ti-coral1) 50%,
            var(--ti-sand1) 100%);
    animation: ti-wave 4s linear infinite;
    background-size: 200% 100%;
}

.tavewa-island .modal-content h2 {
    color: var(--ti-text);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--ti-ocean1) 0%, var(--ti-coral1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Modal date display */
.tavewa-island .modal-date {
    font-family: 'Montserrat', sans-serif;
    color: var(--ti-text);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--ti-ocean4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Event list */
.tavewa-island .event-list {
    margin: 1.2rem 0;
    padding: 0;
    list-style: none;
}

.tavewa-island .event-item {
    background: linear-gradient(135deg, var(--ti-secondary) 0%, #E8F4F7 100%);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--ti-ocean2);
    border-radius: var(--ti-radius);
    transition: all var(--ti-transition);
    box-shadow:
        0 1px 5px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.tavewa-island .event-item:hover {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(255, 112, 67, 0.1) 100%);
    transform: translateX(3px);
    border-left-color: var(--ti-coral2);
    box-shadow:
        0 2px 12px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.tavewa-island .event-time {
    font-family: 'Open Sans', sans-serif;
    color: var(--ti-ocean2);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    display: block;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tavewa-island .event-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--ti-text);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tavewa-island .event-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--ti-text);
    opacity: 0.9;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.tavewa-island .modal-content button {
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    color: var(--ti-primary);
    border: none;
    padding: 8px 16px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ti-transition);
    letter-spacing: 0.3px;
    font-family: 'Montserrat', sans-serif;
    border-radius: var(--ti-radius);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tavewa-island .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.2), transparent);
    transition: left 0.6s;
}

.tavewa-island .modal-content button:hover::before {
    left: 100%;
}

.tavewa-island .modal-content button:hover {
    background: linear-gradient(135deg, var(--ti-hover) 0%, var(--ti-coral3) 100%);
    box-shadow:
        0 4px 15px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Close Button */
.tavewa-island .modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    color: var(--ti-ocean2);
    border: 1px solid var(--ti-ocean2);
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: all var(--ti-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: normal;
    box-shadow:
        0 1px 5px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.tavewa-island .modal .close-button:hover {
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    color: var(--ti-primary);
    border-color: var(--ti-ocean2);
    transform: rotate(90deg);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.tavewa-island .button,
.tavewa-island .transparent-button {
    border: 1px solid var(--ti-ocean2);
    color: var(--ti-ocean2);
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    padding: 0.6rem 1.2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ti-transition);
    position: relative;
    overflow: hidden;
    margin: 0.3rem;
    border-radius: var(--ti-radius);
    letter-spacing: 0.02em;
    font-size: 0.9rem;
    box-shadow:
        0 1px 5px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.tavewa-island .button::before,
.tavewa-island .transparent-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--ti-ocean5), transparent);
    transition: left 0.6s;
}

.tavewa-island .button:hover::before,
.tavewa-island .transparent-button:hover::before {
    left: 100%;
}

.tavewa-island .button:hover,
.tavewa-island .transparent-button:hover {
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    color: var(--ti-primary);
    box-shadow:
        0 3px 12px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.tavewa-island .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
    gap: 0.4rem;
}

/* ==================== THEME SWITCHER ==================== */
.tavewa-island #theme-switcher-container {
    position: relative;
    margin: 0 0.6rem;
    min-width: 180px;
    z-index: 1000;
}

.tavewa-island #theme-switcher {
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%);
    color: var(--ti-ocean2) !important;
    border: 1px solid var(--ti-ocean2);
    padding: 0.6rem 1.8rem 0.6rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    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='%231E88E5'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.9rem;
    cursor: pointer;
    transition: all var(--ti-transition);
    border-radius: var(--ti-radius);
    box-shadow:
        0 1px 5px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.tavewa-island #theme-switcher option {
    background: linear-gradient(135deg, var(--ti-primary) 0%, var(--ti-secondary) 100%) !important;
    color: var(--ti-ocean2) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 10px !important;
}

.tavewa-island #theme-switcher:focus {
    outline: none;
    border-color: var(--ti-ocean2);
    box-shadow:
        0 0 0 2px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.tavewa-island #backToTopBtn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--ti-primary);
    background: linear-gradient(135deg, var(--ti-ocean2) 0%, var(--ti-coral2) 100%);
    cursor: pointer;
    transition: all var(--ti-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--ti-radius);
    box-shadow:
        0 2px 12px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tavewa-island #backToTopBtn:hover {
    background: linear-gradient(135deg, var(--ti-hover) 0%, var(--ti-coral3) 100%);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow:
        0 4px 20px var(--ti-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* ==================== FOOTER ==================== */
.tavewa-island footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ti-ocean4);
    color: var(--ti-ocean2);
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .tavewa-island .container {
        padding: 1.2rem;
    }

    .tavewa-island #calendar-title {
        font-size: 1.8rem;
    }

    .tavewa-island #current-date {
        font-size: 1.3rem;
    }

    .tavewa-island #today-weather {
        font-size: 0.95rem;
    }

    .tavewa-island .modal-date {
        font-size: 1.2rem;
    }

    .tavewa-island .event-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .tavewa-island {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .tavewa-island .clock-face {
        width: 130px;
        height: 130px;
        border-width: 1.5px;
    }

    .tavewa-island th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .tavewa-island th span.full-day-name {
        display: none;
    }

    .tavewa-island th abbr {
        display: inline;
    }

    .tavewa-island td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .tavewa-island td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .tavewa-island td.current-day::before {
        font-size: 0.9rem;
        top: 3px;
        right: 3px;
    }

    .tavewa-island #backToTopBtn {
        right: 12px;
        bottom: 12px;
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }

    .tavewa-island #theme-switcher {
        padding: 0.5rem 1.5rem 0.5rem 0.6rem;
        font-size: 0.85rem;
        min-width: 160px;
    }

    .tavewa-island .modal-content {
        padding: 16px;
    }

    .tavewa-island .event-item {
        padding: 0.7rem;
    }
}

@media (max-width: 576px) {
    .tavewa-island .container {
        padding: 1rem;
    }

    .tavewa-island #calendar-title {
        font-size: 1.5rem;
    }

    .tavewa-island #current-date {
        font-size: 1.2rem;
    }

    .tavewa-island #today-weather {
        font-size: 0.9rem;
    }

    .tavewa-island .clock-face {
        width: 110px;
        height: 110px;
        border-width: 1.5px;
    }

    .tavewa-island th {
        font-size: 0.75rem;
        padding: 0.5rem 0.15rem;
    }

    .tavewa-island td {
        padding: 0.5rem;
        height: 60px;
        font-size: 0.75rem;
    }

    .tavewa-island td .date-number {
        font-size: 0.9rem;
        top: 4px;
        left: 4px;
    }

    .tavewa-island #theme-switcher {
        min-width: 140px;
        font-size: 0.8rem;
    }

    .tavewa-island .modal-content {
        padding: 12px;
    }

    .tavewa-island .modal-date {
        font-size: 1.1rem;
    }

    .tavewa-island .event-time {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .tavewa-island th {
        font-size: 0.7rem;
        padding: 0.4rem 0.1rem;
    }

    .tavewa-island td {
        height: 55px;
    }

    .tavewa-island td .date-number {
        font-size: 0.85rem;
    }

    .tavewa-island #theme-switcher {
        min-width: 120px;
        font-size: 0.75rem;
    }

    .tavewa-island .controls {
        flex-direction: column;
        gap: 0.2rem;
    }

    .tavewa-island .button,
    .tavewa-island .transparent-button {
        width: 100%;
        margin: 0.15rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tavewa-island {
        --ti-ocean2: #0056B3;
        --ti-coral2: #D84315;
    }

    .tavewa-island td.current-day {
        border: 2px solid var(--ti-coral2);
        background: linear-gradient(135deg, rgba(0, 86, 179, 0.2) 0%, rgba(216, 67, 21, 0.2) 100%);
    }

    .tavewa-island th {
        background: var(--ti-ocean2);
    }

    .tavewa-island #calendar-title,
    .tavewa-island #current-date,
    .tavewa-island .event-title,
    .tavewa-island .event-description,
    .tavewa-island .modal-date {
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .tavewa-island *,
    .tavewa-island *::before,
    .tavewa-island *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .tavewa-island .hand {
        transition: none;
    }

    .tavewa-island .clock-face::before {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tavewa-island {
        --ti-bg: #1A2B3A;
        --ti-text: #E8F1F8;
        --ti-primary: #2C3E50;
        --ti-secondary: #34495E;
        --ti-date-number: #E8F1F8;
        --ti-shadow: rgba(30, 136, 229, 0.2);
        --ti-sand1: #4A4030;
        --ti-sand2: #3A3020;
        --ti-sand3: #2A2010;
    }

    .tavewa-island .container,
    .tavewa-island td {
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.3),
            inset 0 0 0 1px var(--ti-shadow);
    }

    .tavewa-island .modal-content {
        box-shadow:
            0 8px 30px rgba(0, 0, 0, 0.4),
            inset 0 0 0 1px var(--ti-shadow);
    }

    .tavewa-island .button,
    .tavewa-island .transparent-button {
        box-shadow:
            0 1px 5px rgba(0, 0, 0, 0.2),
            inset 0 0 0 1px var(--ti-shadow);
    }

    .tavewa-island #calendar-title,
    .tavewa-island #current-date,
    .tavewa-island .event-title,
    .tavewa-island .event-description,
    .tavewa-island .modal-date {
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    }
}