/* ==========================================================================
   Lost Borders Theme - Minimalist Borderless Calendar
   Version: 1.0
   Updated: 2024-10-15
   Changes:
   - Ultra-minimalist design with removed borders and clean aesthetics
   - Focus on typography and spacing for a borderless, airy feel
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Lost Borders Palette */
    --lb-bg: #FFFFFF;
    --lb-text: #2D3748;
    --lb-primary: #FFFFFF;
    --lb-secondary: #F8FAFC;
    --lb-date-number: #2D3748;

    /* Neutral Grays */
    --lb-gray1: #F7FAFC;
    --lb-gray2: #EDF2F7;
    --lb-gray3: #E2E8F0;
    --lb-gray4: rgba(237, 242, 247, 0.7);
    --lb-gray5: rgba(237, 242, 247, 0.5);

    /* Accent Colors */
    --lb-accent1: #4A5568;
    --lb-accent2: #718096;
    --lb-accent3: #A0AEC0;
    --lb-accent4: rgba(113, 128, 150, 0.7);
    --lb-accent5: rgba(113, 128, 150, 0.5);

    /* Highlight Colors */
    --lb-highlight1: #4299E1;
    --lb-highlight2: #3182CE;
    --lb-highlight3: #2B6CB0;
    --lb-highlight4: rgba(66, 153, 225, 0.7);
    --lb-highlight5: rgba(66, 153, 225, 0.5);

    /* Theme Variables */
    --lb-shadow: rgba(113, 128, 150, 0.08);
    --lb-radius: 8px;
    --lb-transition: 0.2s ease;
    --lb-hover: #3182CE;
    --lb-glow: 0 0 0 transparent;
    --lb-pattern: none;
}

/* ==================== ANIMATIONS ==================== */
@keyframes lb-fade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes lb-slide {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes lb-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes lb-wave {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

@keyframes lb-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes lb-shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ==================== BASE STYLES ==================== */
.lost-borders {
    font-family: 'Inter', sans-serif;
    color: var(--lb-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--lb-bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.lost-borders::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: none;
    pointer-events: none;
    z-index: 1;
}

.lost-borders .container {
    background-color: var(--lb-primary);
    padding: 2rem;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 0;
    z-index: 2;
    background-image: none;
}

.lost-borders .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lb-accent2), transparent);
    animation: none;
    background-size: 200% 100%;
}

.lost-borders .container::after {
    display: none;
}

/* ==================== HEADER & TITLE ==================== */
.lost-borders #calendar-title {
    font-family: 'Inter', sans-serif;
    color: var(--lb-text);
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
    position: relative;
    font-weight: 700;
    text-shadow: none;
    background: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--lb-text);
    background-clip: text;
    background-size: auto;
    animation: none;
}

.lost-borders #calendar-title::after {
    display: none;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.lost-borders #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.5rem;
    background-color: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    box-shadow: none;
    overflow: hidden;
}

.lost-borders #date-weather-container::before {
    display: none;
}

.lost-borders #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lb-accent2), transparent);
}

.lost-borders #current-date {
    font-family: 'Inter', sans-serif;
    color: var(--lb-text);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.lost-borders #today-weather {
    font-family: 'Inter', sans-serif;
    color: var(--lb-accent2);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ==================== ANALOG CLOCK ==================== */
.lost-borders #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.lost-borders .clock-face {
    width: 180px;
    height: 180px;
    border: 1px solid var(--lb-accent2);
    border-radius: 50%;
    position: relative;
    background-color: transparent;
    box-shadow: none;
    overflow: hidden;
}

.lost-borders .clock-face::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: var(--lb-accent2);
    border-radius: 50%;
    z-index: 10;
    box-shadow: none;
}

.lost-borders .clock-face::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
}

.lost-borders .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;
}

.lost-borders .hour-hand {
    width: 35%;
    left: 15%;
    height: 3px;
    background-color: var(--lb-text);
    margin-top: -1.5px;
    border-radius: 1.5px;
}

.lost-borders .minute-hand {
    width: 45%;
    left: 5%;
    height: 2px;
    background-color: var(--lb-accent2);
    margin-top: -1px;
    border-radius: 1px;
}

.lost-borders .second-hand {
    width: 45%;
    left: 5%;
    height: 1px;
    background-color: var(--lb-accent3);
    margin-top: -0.5px;
}

/* ==================== CALENDAR TABLE ==================== */
.lost-borders table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 3px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.lost-borders th {
    background: transparent;
    color: var(--lb-accent2) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 1rem 0.5rem;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-shadow: none;
}

.lost-borders th::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
}

.lost-borders th span.full-day-name {
    display: inline;
    position: relative;
    z-index: 1;
}

.lost-borders th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.lost-borders td {
    background-color: transparent;
    color: var(--lb-text);
    padding: 1rem;
    border: none;
    height: 90px;
    vertical-align: top;
    transition: all var(--lb-transition);
    position: relative;
    border-radius: 0;
    box-shadow: none;
}

.lost-borders td .date-number {
    color: var(--lb-text) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Inter', sans-serif;
}

.lost-borders td:hover {
    background-color: var(--lb-gray1);
    box-shadow: none;
    border: none;
    transform: none;
}

/* Current date highlight */
.lost-borders td.current-day {
    background-color: var(--lb-gray1);
    border: none;
    animation: lb-pulse 2s infinite;
    background-image: none;
}

.lost-borders td.current-day .date-number {
    color: var(--lb-highlight1) !important;
    font-weight: 700;
}

.lost-borders td.current-day::before {
    display: none;
}

/* ==================== EVENT MARKERS ==================== */
.lost-borders .event-marker {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--lb-highlight1);
    margin: 0 1px;
    transition: all var(--lb-transition);
    animation: none;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.lost-borders .event-marker::before {
    display: none;
}

.lost-borders .event-marker:hover {
    transform: scale(1.2);
    background-color: var(--lb-highlight2);
    box-shadow: none;
}

/* ==================== MODAL STYLES ==================== */
.lost-borders .modal-content {
    position: relative;
    background-color: var(--lb-primary);
    border: none;
    padding: 25px;
    color: var(--lb-text);
    box-shadow: 0 8px 30px var(--lb-shadow);
    border-radius: var(--lb-radius);
    animation: lb-slide 0.3s ease-out;
    background-image: none;
    overflow: hidden;
}

.lost-borders .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--lb-highlight1), var(--lb-accent2));
    animation: none;
    background-size: 200% 100%;
}

.lost-borders .modal-content h2 {
    color: var(--lb-text);
    font-family: 'Inter', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: none;
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--lb-text);
    background-clip: text;
}

/* Modal date display */
.lost-borders .modal-date {
    font-family: 'Inter', sans-serif;
    color: var(--lb-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--lb-gray3);
}

/* Event list */
.lost-borders .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.lost-borders .event-item {
    background-color: var(--lb-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--lb-highlight1);
    border-radius: var(--lb-radius);
    transition: all var(--lb-transition);
    box-shadow: none;
}

.lost-borders .event-item:hover {
    background-color: var(--lb-gray1);
    transform: translateX(3px);
    border-left-color: var(--lb-highlight2);
    box-shadow: none;
}

.lost-borders .event-time {
    font-family: 'Inter', sans-serif;
    color: var(--lb-accent2);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.lost-borders .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--lb-text);
}

.lost-borders .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--lb-text);
    opacity: 0.8;
}

.lost-borders .modal-content button {
    background-color: var(--lb-highlight1);
    color: var(--lb-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--lb-transition);
    letter-spacing: 0.01em;
    font-family: 'Inter', sans-serif;
    border-radius: var(--lb-radius);
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.lost-borders .modal-content button::before {
    display: none;
}

.lost-borders .modal-content button:hover::before {
    left: 100%;
}

.lost-borders .modal-content button:hover {
    background-color: var(--lb-highlight2);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Close Button */
.lost-borders .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: transparent;
    color: var(--lb-accent2);
    border: 1px solid var(--lb-gray3);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--lb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: normal;
    box-shadow: none;
}

.lost-borders .modal .close-button:hover {
    background-color: var(--lb-gray2);
    color: var(--lb-text);
    border-color: var(--lb-accent2);
    transform: rotate(90deg);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.lost-borders .button,
.lost-borders .transparent-button {
    border: 1px solid var(--lb-gray3);
    color: var(--lb-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lb-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--lb-radius);
    letter-spacing: 0.01em;
    font-size: 0.95rem;
    box-shadow: none;
}

.lost-borders .button::before,
.lost-borders .transparent-button::before {
    display: none;
}

.lost-borders .button:hover::before,
.lost-borders .transparent-button:hover::before {
    left: 100%;
}

.lost-borders .button:hover,
.lost-borders .transparent-button:hover {
    background-color: var(--lb-gray2);
    color: var(--lb-text);
    box-shadow: none;
    transform: translateY(-1px);
}

.lost-borders .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
    gap: 0.5rem;
}

/* ==================== THEME SWITCHER ==================== */
.lost-borders #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.lost-borders #theme-switcher {
    background-color: transparent;
    color: var(--lb-text) !important;
    border: 1px solid var(--lb-gray3);
    padding: 0.8rem 2.2rem 0.8rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    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='%234A5568'%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(--lb-transition);
    border-radius: var(--lb-radius);
    box-shadow: none;
}

.lost-borders #theme-switcher option {
    background-color: var(--lb-primary) !important;
    color: var(--lb-text) !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px !important;
}

.lost-borders #theme-switcher:focus {
    outline: none;
    border-color: var(--lb-highlight1);
    box-shadow: none;
}

/* ==================== BACK TO TOP BUTTON ==================== */
.lost-borders #backToTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    border: 1px solid var(--lb-gray3);
    padding: 1rem 1.7rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--lb-text);
    background-color: transparent;
    cursor: pointer;
    transition: all var(--lb-transition);
    opacity: 0.8;
    display: none;
    border-radius: var(--lb-radius);
    box-shadow: none;
}

.lost-borders #backToTopBtn:hover {
    background-color: var(--lb-gray2);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: none;
}

/* ==================== FOOTER ==================== */
.lost-borders footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--lb-gray3);
    color: var(--lb-accent2);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .lost-borders .container {
        padding: 1.5rem;
    }

    .lost-borders #calendar-title {
        font-size: 2rem;
    }

    .lost-borders #current-date {
        font-size: 1.5rem;
    }

    .lost-borders #today-weather {
        font-size: 1.1rem;
    }

    .lost-borders .modal-date {
        font-size: 1.3rem;
    }

    .lost-borders .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .lost-borders {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .lost-borders .clock-face {
        width: 150px;
        height: 150px;
        border-width: 1px;
    }

    .lost-borders th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .lost-borders th span.full-day-name {
        display: none;
    }

    .lost-borders th abbr {
        display: inline;
    }

    .lost-borders td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .lost-borders td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .lost-borders td.current-day::before {
        display: none;
    }

    .lost-borders #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .lost-borders #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .lost-borders .modal-content {
        padding: 20px;
    }

    .lost-borders .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .lost-borders .container {
        padding: 1rem;
    }

    .lost-borders #calendar-title {
        font-size: 1.7rem;
    }

    .lost-borders #current-date {
        font-size: 1.3rem;
    }

    .lost-borders #today-weather {
        font-size: 1rem;
    }

    .lost-borders .clock-face {
        width: 130px;
        height: 130px;
        border-width: 1px;
    }

    .lost-borders th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .lost-borders td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .lost-borders td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .lost-borders #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .lost-borders .modal-content {
        padding: 15px;
    }

    .lost-borders .modal-date {
        font-size: 1.2rem;
    }

    .lost-borders .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .lost-borders th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .lost-borders td {
        height: 60px;
    }

    .lost-borders td .date-number {
        font-size: 0.9rem;
    }

    .lost-borders #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }

    .lost-borders .controls {
        flex-direction: column;
        gap: 0.3rem;
    }

    .lost-borders .button,
    .lost-borders .transparent-button {
        width: 100%;
        margin: 0.2rem 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lost-borders {
        --lb-highlight1: #0066CC;
        --lb-accent1: #004080;
    }

    .lost-borders td.current-day {
        border: 1px solid var(--lb-highlight1);
        background-color: var(--lb-gray2);
    }

    .lost-borders th {
        color: var(--lb-text) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .lost-borders *,
    .lost-borders *::before,
    .lost-borders *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .lost-borders .hand {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lost-borders {
        --lb-bg: #1A202C;
        --lb-text: #E2E8F0;
        --lb-primary: #2D3748;
        --lb-secondary: #4A5568;
        --lb-date-number: #E2E8F0;
        --lb-shadow: rgba(0, 0, 0, 0.3);
        --lb-gray1: #2D3748;
        --lb-gray2: #4A5568;
        --lb-gray3: #718096;
    }

    .lost-borders .container,
    .lost-borders td {
        box-shadow: none;
    }

    .lost-borders .modal-content {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

    .lost-borders .button,
    .lost-borders .transparent-button {
        box-shadow: none;
    }
}