/* ==========================================================================
   Back in Line Theme - Modern Professional Calendar
   Version: 1.2
   Updated: 2024-06-08
   Changes:
   - Clean, minimalist design with geometric precision
   - Professional color scheme with accent highlights
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500;600&display=swap');

:root {
    /* Professional Color Palette */
    --back-bg: #F8FAFC;
    --back-text: #1E293B;
    --back-primary: #FFFFFF;
    --back-secondary: #F1F5F9;
    --back-date-number: #1E293B;

    /* Accent Colors */
    --back-accent1: #3B82F6;
    --back-accent2: #2563EB;
    --back-accent3: #1D4ED8;
    --back-accent4: rgba(59, 130, 246, 0.7);
    --back-accent5: rgba(59, 130, 246, 0.5);

    /* Neutral Colors */
    --back-neutral1: #64748B;
    --back-neutral2: #475569;
    --back-neutral3: #334155;
    --back-neutral4: rgba(100, 116, 139, 0.1);
    --back-neutral5: rgba(100, 116, 139, 0.05);

    /* Theme Variables */
    --back-shadow: rgba(59, 130, 246, 0.1);
    --back-radius: 8px;
    --back-transition: 0.2s ease;
    --back-hover: #1E40AF;
    --back-glow: 0 0 12px rgba(59, 130, 246, 0.15);
    --back-border: 1px solid #E2E8F0;
}

/* ==================== ANIMATIONS ==================== */
@keyframes back-fade {

    0%,
    100% {
        opacity: 0.95;
    }

    50% {
        opacity: 1;
    }
}

@keyframes back-slide {
    from {
        transform: translateY(5px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes back-pulse {

    0%,
    100% {
        box-shadow: 0 0 3px var(--back-shadow);
    }

    50% {
        box-shadow: var(--back-glow);
    }
}

@keyframes progress-bar {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* ==================== BASE STYLES ==================== */
.back-in-line {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--back-bg);
    min-height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="10" y="10" width="2" height="2" fill="%233B82F6" opacity="0.1"/><rect x="50" y="30" width="2" height="2" fill="%233B82F6" opacity="0.1"/><rect x="30" y="70" width="2" height="2" fill="%233B82F6" opacity="0.1"/><rect x="80" y="80" width="2" height="2" fill="%233B82F6" opacity="0.1"/></svg>');
}

.back-in-line .container {
    background-color: var(--back-primary);
    padding: 2rem;
    border: var(--back-border);
    box-shadow: var(--back-glow);
    position: relative;
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: var(--back-radius);
}

.back-in-line .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--back-accent1) 0%,
            var(--back-accent2) 50%,
            var(--back-accent1) 100%);
}

.back-in-line .container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--back-accent2), transparent);
    opacity: 0.3;
}

/* ==================== HEADER & TITLE ==================== */
.back-in-line #calendar-title {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
    position: relative;
    font-weight: 700;
}

.back-in-line #calendar-title::after {
    content: "─";
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    opacity: 0.6;
}

/* ==================== DATE & WEATHER DISPLAY ==================== */
.back-in-line #date-weather-container {
    text-align: center;
    margin: 1.8rem 0;
    padding: 1.2rem;
    background-color: var(--back-primary);
    border: var(--back-border);
    border-radius: var(--back-radius);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-in-line #date-weather-container::before {
    content: "OVERVIEW";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--back-primary);
    padding: 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--back-text);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.back-in-line #date-weather-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--back-accent2), transparent);
}

.back-in-line #current-date {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.back-in-line #today-weather {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ==================== ANALOG CLOCK ==================== */
.back-in-line #analog-watch {
    display: flex;
    justify-content: center;
    margin: 1.8rem 0;
}

.back-in-line .clock-face {
    width: 180px;
    height: 180px;
    border: 4px solid var(--back-accent2);
    border-radius: 50%;
    position: relative;
    background-color: var(--back-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.back-in-line .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);
}

.back-in-line .hour-hand {
    width: 40%;
    left: 10%;
    height: 4px;
    background: var(--back-accent1);
    margin-top: -2px;
    border-radius: 2px;
}

.back-in-line .minute-hand {
    width: 48%;
    left: 2%;
    height: 2px;
    background: var(--back-accent2);
    margin-top: -1px;
    border-radius: 1px;
}

.back-in-line .second-hand {
    width: 48%;
    left: 2%;
    height: 1px;
    background: var(--back-accent3);
    margin-top: -0.5px;
}

/* ==================== CALENDAR TABLE ==================== */
.back-in-line table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin: 1.8rem auto;
    background-color: transparent;
    table-layout: fixed;
}

/* DAY OF WEEK HEADERS */
.back-in-line th {
    background-color: var(--back-accent1);
    color: var(--back-primary) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.8rem 0.4rem;
    border-radius: var(--back-radius);
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.back-in-line th span.full-day-name {
    display: inline;
}

.back-in-line th abbr {
    display: none;
    text-decoration: none;
    border-bottom: none;
}

/* DATE NUMBER STYLES */
.back-in-line td {
    background-color: var(--back-primary);
    color: var(--back-text);
    padding: 1rem;
    border: var(--back-border);
    height: 90px;
    vertical-align: top;
    transition: all var(--back-transition);
    position: relative;
    border-radius: var(--back-radius);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.05);
}

.back-in-line td .date-number {
    color: var(--back-text) !important;
    font-weight: 600;
    font-size: 1.2rem;
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: 'Inter', sans-serif;
}

.back-in-line td:hover {
    background-color: var(--back-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Current date highlight */
.back-in-line td.current-day {
    background-color: rgba(59, 130, 246, 0.08);
    border: 2px solid var(--back-accent2);
    animation: back-pulse 3s infinite;
}

.back-in-line td.current-day .date-number {
    color: var(--back-text) !important;
    font-weight: 700;
}

.back-in-line td.current-day::before {
    content: "●";
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--back-accent1);
    font-weight: bold;
}

/* ==================== EVENT MARKERS ==================== */
.back-in-line .event-marker {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--back-accent2);
    margin: 0 1px;
    transition: all var(--back-transition);
}

.back-in-line .event-marker:hover {
    transform: scale(1.4);
    background-color: var(--back-accent2);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.2);
}

/* ==================== MODAL STYLES ==================== */
.back-in-line .modal-content {
    position: relative;
    background-color: var(--back-primary);
    border: var(--back-border);
    padding: 25px;
    color: var(--back-text);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-radius: var(--back-radius);
    animation: back-slide 0.2s ease-out;
}

.back-in-line .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--back-accent1) 0%,
            var(--back-accent2) 50%,
            var(--back-accent1) 100%);
}

.back-in-line .modal-content h2 {
    color: var(--back-text);
    font-family: 'Inter', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Modal date display */
.back-in-line .modal-date {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--back-accent4);
}

/* Event list */
.back-in-line .event-list {
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.back-in-line .event-item {
    background-color: var(--back-secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--back-accent1);
    border-radius: var(--back-radius);
    transition: all var(--back-transition);
}

.back-in-line .event-item:hover {
    background-color: var(--back-neutral5);
    transform: translateX(3px);
}

.back-in-line .event-time {
    font-family: 'Inter', sans-serif;
    color: var(--back-text);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.back-in-line .event-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--back-text);
}

.back-in-line .event-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--back-text);
    opacity: 0.9;
}

.back-in-line .modal-content button {
    background-color: var(--back-accent1);
    color: var(--back-primary);
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--back-transition);
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    border-radius: var(--back-radius);
}

.back-in-line .modal-content button:hover {
    background-color: var(--back-hover);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.1);
}

/* Close Button */
.back-in-line .modal .close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--back-primary);
    color: var(--back-text);
    border: 1px solid var(--back-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all var(--back-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.back-in-line .modal .close-button:hover {
    background-color: var(--back-text);
    color: var(--back-accent1);
    border-color: var(--back-text);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.back-in-line .button,
.back-in-line .transparent-button {
    border: 1px solid var(--back-accent1);
    color: var(--back-text);
    background-color: transparent;
    padding: 0.8rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--back-transition);
    position: relative;
    overflow: hidden;
    margin: 0.4rem;
    border-radius: var(--back-radius);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.back-in-line .button:hover,
.back-in-line .transparent-button:hover {
    background-color: var(--back-accent1);
    color: var(--back-primary);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.1);
}

.back-in-line .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}

/* ==================== THEME SWITCHER ==================== */
.back-in-line #theme-switcher-container {
    position: relative;
    margin: 0 0.8rem;
    min-width: 200px;
    z-index: 1000;
}

.back-in-line #theme-switcher {
    background-color: var(--back-primary);
    color: var(--back-text) !important;
    border: 1px solid var(--back-accent1);
    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='%231E293B'%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(--back-transition);
    border-radius: var(--back-radius);
}

.back-in-line #theme-switcher option {
    background-color: var(--back-primary) !important;
    color: var(--back-text) !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px !important;
}

.back-in-line #theme-switcher:focus {
    outline: none;
    border-color: var(--back-accent1);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ==================== BACK TO TOP BUTTON ==================== */
.back-in-line #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: 500;
    color: var(--back-primary);
    background-color: var(--back-accent1);
    cursor: pointer;
    transition: all var(--back-transition);
    opacity: 0.9;
    display: none;
    border-radius: var(--back-radius);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.back-in-line #backToTopBtn:hover {
    background-color: var(--back-hover);
    opacity: 1;
}

/* ==================== FOOTER ==================== */
.back-in-line footer {
    text-align: center;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--back-accent4);
    color: var(--back-text);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 992px) {
    .back-in-line .container {
        padding: 1.5rem;
    }

    .back-in-line #calendar-title {
        font-size: 2rem;
    }

    .back-in-line #current-date {
        font-size: 1.5rem;
    }

    .back-in-line #today-weather {
        font-size: 1.1rem;
    }

    .back-in-line .modal-date {
        font-size: 1.3rem;
    }

    .back-in-line .event-title {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .back-in-line {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .back-in-line .clock-face {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }

    .back-in-line th {
        font-size: 0.85rem;
        padding: 0.7rem 0.3rem;
    }

    .back-in-line th span.full-day-name {
        display: none;
    }

    .back-in-line th abbr {
        display: inline;
    }

    .back-in-line td {
        padding: 0.7rem;
        height: 80px;
        font-size: 0.85rem;
    }

    .back-in-line td .date-number {
        font-size: 1.1rem;
        top: 6px;
        left: 6px;
    }

    .back-in-line td.current-day::before {
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }

    .back-in-line #backToTopBtn {
        right: 15px;
        bottom: 15px;
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .back-in-line #theme-switcher {
        padding: 0.7rem 1.8rem 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 170px;
    }

    .back-in-line .modal-content {
        padding: 20px;
    }

    .back-in-line .event-item {
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .back-in-line .container {
        padding: 1rem;
    }

    .back-in-line #calendar-title {
        font-size: 1.7rem;
    }

    .back-in-line #current-date {
        font-size: 1.3rem;
    }

    .back-in-line #today-weather {
        font-size: 1rem;
    }

    .back-in-line .clock-face {
        width: 130px;
        height: 130px;
        border-width: 2px;
    }

    .back-in-line th {
        font-size: 0.8rem;
        padding: 0.6rem 0.2rem;
    }

    .back-in-line td {
        padding: 0.6rem;
        height: 70px;
        font-size: 0.8rem;
    }

    .back-in-line td .date-number {
        font-size: 1rem;
        top: 5px;
        left: 5px;
    }

    .back-in-line #theme-switcher {
        min-width: 150px;
        font-size: 0.85rem;
    }

    .back-in-line .modal-content {
        padding: 15px;
    }

    .back-in-line .modal-date {
        font-size: 1.2rem;
    }

    .back-in-line .event-time {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .back-in-line th {
        font-size: 0.75rem;
        padding: 0.5rem 0.1rem;
    }

    .back-in-line td {
        height: 60px;
    }

    .back-in-line td .date-number {
        font-size: 0.9rem;
    }

    .back-in-line #theme-switcher {
        min-width: 130px;
        font-size: 0.8rem;
    }
}