/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #f0f0f0;
    line-height: 1.6;
}

/* ===== LAYOUT ===== */
.container {
    max-width: none;
    margin: 0 auto;
    padding: 20px;
    padding-right: 320px;
}

.main-content {
    display: flex;
    gap: 20px;
    position: relative;
}

.events-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    flex: 1;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

h1 {
    color: #e0a800;
    margin-bottom: 15px;
}

h2 {
    color: #e0a800;
    margin-bottom: 20px;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    margin-right: 320px;
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    position: relative;
}

.custom-select {
    position: relative;
    width: 160px;
}

.selected-option {
    padding: 8px 12px;
    border-radius: 5px;
    background-color: #252525;
    color: #f0f0f0;
    border: 1px solid #444;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
}

.selected-option::after {
    content: '▼';
    font-size: 0.8rem;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.selected-option:hover {
    background-color: #333;
}

.options-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #252525;
    border: 1px solid #444;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    display: none;
    margin-top: 2px;
}

.options-container.show {
    display: block;
}

.option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.option:hover {
    background-color: #333;
}

.flag-icon {
    display: inline-block;
    width: 30px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-color: transparent;
}

/* ===== TIME INFO ===== */
.time-info {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    font-size: 1.2rem;
}

.local-time, .server-time {
    background-color: #1e1e1e;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ===== FILTER CONTROLS ===== */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.control-button {
    margin-left: 10px;
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-button:disabled {
    background-color: #4CAF50 !important;
    cursor: not-allowed;
    opacity: 0.9;
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sound-button {
    background-color: #ff5722;
}

.sound-button:hover:not(:disabled) {
    background-color: #e64a19;
}

.notification-button {
    background-color: #2196F3;
}

.notification-button:hover:not(:disabled) {
    background-color: #1976d2;
}

/* ===== EVENTS LIST ===== */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.event-card {
    background-color: #252525;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.event-card.world-boss {
    border-left: 4px solid #ff5722;
}

.event-card.thrall {
    border-left: 4px solid #2196f3;
}

.event-card.fieldboss {
    border-left: 4px solid #9c27b0;
}

.event-time {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #e0a800;
}

.countdown {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #4caf50;
}

.countdown.urgent {
    color: #ff5722;
    font-weight: bold;
    animation: pulse 1s infinite;
}

.event-location {
    font-size: 1rem;
    color: #bbb;
}

.event-day {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

.loading {
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notification.show {
    opacity: 1;
    visibility: visible;
}

.notification-content {
    background-color: #252525;
    border-radius: 8px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-left: 5px solid #ff5722;
}

.notification-content h3 {
    color: #ff5722;
    margin-bottom: 15px;
}

#close-notification {
    background-color: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#close-notification:hover {
    background-color: #444;
}

.notification-success {
    margin-left: 10px;
    color: #4CAF50;
    font-weight: bold;
    animation: fadeIn 0.5s;
}

/* ===== DISCORD BUTTON ===== */
.discord-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.discord-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.discord-button img {
    width: 30px;
    height: 30px;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding-top: 20px;
    color: #888;
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid #333;
    font-style: italic;
    font-size: 0.85rem;
}

/* ===== SKELETON LOADING ===== */
.skeleton-card {
    background-color: #252525;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #333;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line.title {
    height: 20px;
    width: 60%;
}

.skeleton-line.countdown {
    height: 18px;
    width: 40%;
}

.skeleton-line.location {
    width: 80%;
}

.skeleton-line.day {
    width: 50%;
    height: 14px;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header-top {
        margin-right: 0;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .time-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .events-list {
        grid-template-columns: 1fr;
    }
}