/* ==== GLOBAL ==== */
body {
    background: #1a1a1a url('https://www.transparenttextures.com/patterns/brushed-alum.png') repeat;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
}

h1, .calendar-header {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

/* ==== GRID ==== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}
@media (max-width: 992px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .calendar-header {
        display: none;
    }
}
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .calendar-header {
        display: none;
    }
}

/* ==== HEADERS ==== */
.calendar-header {
    background: linear-gradient(#3b2f1d, #1f1a12);
    color: #d4af37;
    text-shadow: 1px 1px 2px #000;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    border: 1px solid #8b6b2d;
}

/* ==== CONTAINER ==== */
.calendar-container {
    border: 2px solid #8b6b2d;
    border-radius: 8px;
    background: linear-gradient(145deg, #2a2a2a, #1c1c1c);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* ==== CELLS ==== */
.calendar-cell {
    min-height: 120px;
    padding: 8px;
    border: 1px solid #444;
    background-color: rgba(34, 34, 34, 0.95);
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.calendar-cell .events {
    margin-top: 1em;
}
.calendar-cell:hover {
    background-color: #2f2f2f;
    transform: scale(1.02);
}

.calendar-cell.gray,
.calendar-cell .gray {
    background-color: #2a2a2a;
    color: #777;
}

/* ==== DATE LABEL ==== */
.calendar-cell strong {
    display: inline-block;
    background-color: #8b6b2d;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* ==== EVENT TITLE ==== */
.event-title {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

/* ==== HIGHLIGHTING ==== */
.highlight {
    background-color: rgba(214, 180, 68, 0.2) !important;
    border-color: #d4af37 !important;
}
.highlight-soft {
    background-color: rgba(100, 149, 237, 0.2) !important;
    border-color: #6495ed !important;
}

/* ==== ALERT ==== */
#copied-alert {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: none;
}

/* ==== SELECTS & MENUS ==== */
.label-color {
    color: #ba9a30;
}

#monthSelect, #yearSelect, #eventFilter {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #8b6b2d;
}
#monthSelect:focus, #yearSelect:focus, #eventFilter:focus {
    background-color: #1c1c1c;
    border-color: #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* ==== BUTTONS ==== */
.btn {
    background-color: #2a2a2a;
    color: #ba9a30;
    border: 1px solid #8b6b2d;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn:hover {
    background-color: #5a441f;
    color: #fff3c0;
    transform: scale(1.02);
}
.btn-outline-primary {
    background-color: transparent;
    color: #d4af37;
    border: 1px solid #d4af37;
}
.btn-outline-primary:hover {
    background-color: #d4af37;
    color: #1a1a1a;
}

/* ==== EVENT SPANS ==== */
.event-span {
    font-size: 0.85em;
    margin-top: 2px;
    position: relative;
    z-index: 2;
}
.event-span-right {
    background: rgba(139, 107, 45, 0.15);
    border-radius: 0 8px 8px 0;
    padding-left: 8px;
    border-left: 3px solid #d4af37;
    width: 55%;
    float: right;
    clear: both;
}
.event-span-left {
    background: rgba(139, 107, 45, 0.15);
    border-radius: 8px 0 0 8px;
    padding-right: 8px;
    border-right: 3px solid #d4af37;
    width: 55%;
    float: left;
    clear: both;
    text-align: right;
}

/* ==== EVENT TIME ==== */
.event-time {
    color: #d4af37;
    font-size: 0.8em;
}

.event-name {
    color: #fee6ab;
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.event-important {
    color: #ffdf91;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}