.calendar-container {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden; /* Köşelerin düzgün yuvarlanması için */
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgb(5 15 32 / 90%); /* Takvim için genel arkaplan */
    width: 100%;
    margin: 20px auto; /* Ortalamak için */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #4A90E2;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap; /* Küçük ekranlarda sarmalamayı sağlar */
    /* Üst header için sadece top-left ve top-right yuvarlaklık */
    border-top-left-radius: 10px; /* calendar-container'ın radius'una göre ayarlayın */
    border-top-right-radius: 10px; /* calendar-container'ın radius'una göre ayarlayın */
}

/* Alt kısımdaki navigasyon çubuğu için stil */
.calendar-header.bottom-header-nav {
    border-bottom: none; /* Alt navigasyonda alt çizgi olmasın */
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Üstüne çizgi ekle */
    background-color: #4A90E2; /* Aynı arka plan rengi */
    /* Alt header için sadece bottom-left ve bottom-right yuvarlaklık */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 10px; /* calendar-container'ın radius'una göre ayarlayın */
    border-bottom-right-radius: 10px; /* calendar-container'ın radius'una göre ayarlayın */
}

.calendar-header h2 {
    margin: 0;
    font-size: 2em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    flex-grow: 1;
    text-align: center;
}

.nav-button {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 8px 8px 12px 8px; /* Daha geniş padding */
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    font-size: 1em;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* Butonlar için minimum genişlik */
}

.nav-button:hover {
    background-color: #77b300;
    border-color: #77b300;
    color: #ffffff;
}

/* Yeni Takvim Gün Listesi Stilleri */
.calendar-days-list {
    padding: 15px;
    /* Header ve footer arasına denk geldiği için border-radius olmamalı */
    border-radius: 0;
    /* Üstteki headerın border-bottom'u ve alttaki headerın border-top'u yeterli */
    border-top: none;
    border-bottom: none;
}

.calendar-day {
    background-color: rgb(15 25 42 / 90%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 12px; /* Günler arasında boşluk */
    padding: 15px;
    display: flex; /* İçeriği hizalamak için */
    flex-direction: column; /* İçeriği dikey sırala */
    transition: background-color 0.3s ease-in-out;
}

.calendar-day.other-month {
    background-color: rgb(5 15 32 / 90%);
    color: #6a6a6a;
    border-color: rgba(255, 255, 255, 0.05);
}

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.day-number {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.day-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #bbbbbb;
}

.calendar-day.has-event {
    background-color: rgb(5 15 32 / 90%);
}

.calendar-day.has-event:hover {
    background-color: rgb(74 144 226 / 20%);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.4);
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
    text-align: left;
}

.event-list li {
    color: white;
    padding: 5px 0;
    margin-bottom: 3px;
    display: flex; /* İçeriği yan yana hizalamak için */
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Küçük ekranlarda sarmalamayı sağlar */
}

.event-list .manga-name {
    color: #90EE90;
    font-weight: bold;
    margin-right: 10px; /* Bölüm numarasından ayır */
    white-space: nowrap; /* Metin taşmasını engeller */
    overflow: hidden;
    text-overflow: ellipsis; /* Taşınan metni üç nokta ile gösterir */
}

.event-list .chapter-number {
    font-weight: bold;
    background-color: #737373;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 0.85em;
    flex-shrink: 0; /* Bölüm numarasının küçülmesini engeller */
}

.event-list .more-events {
    color: #FFD700;
    font-style: italic;
    font-size: 0.8em;
    margin-top: 5px; /* Üstteki olaylardan ayır */
    width: 100%; /* Kendi satırına gelsin */
    text-align: right;
}

/* --- Modal Stilleri (Mevcut haliyle iyi, küçük ayarlamalar) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background-color: rgb(25 35 52);
    padding: 25px 35px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    position: relative;
    animation: fadeIn 0.4s ease-out;
    color: #ffffff;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px) scale(0.98);}
    to {opacity: 1; transform: translateY(0) scale(1);}
}

.close-button {
    color: #bbb;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #FF6347;
    text-decoration: none;
    cursor: pointer;
}

#modalDate {
    margin-top: 0;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.6em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

#modalEventList {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4A90E2 #192334;
}

#modalEventList::-webkit-scrollbar {
    width: 6px;
}

#modalEventList::-webkit-scrollbar-track {
    background: #192334;
}

#modalEventList::-webkit-scrollbar-thumb {
    background-color: #4A90E2;
    border-radius: 10px;
    border: 1px solid #192334;
}

#modalEventList li {
    background-color: rgb(35 45 62);
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#modalEventList .modal-manga-name {
    color: #FFFFE0;
    font-weight: bold;
    flex-grow: 1;
    margin-right: 10px;
    text-align: left;
    min-width: 0;
}

#modalEventList .modal-chapter-number {
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9em;
    background-color: rgb(255 255 255 / 36%);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-content #modalEventList .modal-manga-name-link {
    color: #90EE90;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.modal-content #modalEventList .modal-manga-name-link:hover {
    color: #388E3C;
    text-decoration: underline;
}

/* responsive Tasarım */

@media (max-width: 768px) {
    .calendar-header h2 {
        font-size: 1.7em;
    }

    .nav-button {
        padding: 6px 12px;
        font-size: 0.9em;
        min-width: 70px;
    }

    .calendar-day {
        padding: 12px;
        margin-bottom: 10px;
    }

    .day-number {
        font-size: 1.6em;
    }

    .day-name {
        font-size: 1em;
    }

    .event-list {
        font-size: 0.85em;
    }

    .event-list .chapter-number {
        padding: 2px 6px;
        font-size: 0.8em;
    }

    .modal-content {
        padding: 20px 25px;
        max-width: 95%;
    }

    #modalDate {
        font-size: 1.4em;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    #modalEventList li {
        padding: 10px 12px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        border-radius: 8px;
        margin: 10px auto;
    }

    .calendar-header {
        padding: 10px 15px;
        flex-direction: column;
    }

    .calendar-header h2 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .nav-button {
        padding: 5px 10px;
        font-size: 0.8em;
        width: calc(50% - 10px); /* Yan yana butonlar */
        margin: 4px;
    }

    .calendar-days-list {
        padding: 10px;
    }

    .calendar-day {
        padding: 10px;
        margin-bottom: 8px;
    }

    .day-number {
        font-size: 1.4em;
    }

    .day-name {
        font-size: 0.9em;
    }

    .event-list {
        font-size: 0.8em;
    }

    .event-list li {
        flex-direction: column; /* Mobil liste elemanlarını dikey sırala */
        align-items: flex-start; /* Sola hizala */
        margin-bottom: 5px;
    }

    .event-list .manga-name {
        margin-right: 0;
        margin-bottom: 3px;
    }

    .event-list .chapter-number {
        font-size: 0.75em;
        padding: 2px 5px;
    }

    .modal-content {
        padding: 15px 20px;
        border-radius: 10px;
    }

    .close-button {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    #modalDate {
        font-size: 1.3em;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }

    #modalEventList li {
        padding: 8px 10px;
        font-size: 0.9em;
    }
}

/* Ekstra küçük telefonlar için */
@media (max-width: 375px) {
    .day-number {
        font-size: 1.2em;
    }
    .day-name {
        font-size: 0.8em;
    }
    .event-list {
        font-size: 0.75em;
    }
    .modal-content {
        padding: 12px 15px;
    }
    #modalEventList li {
        font-size: 0.85em;
    }
}


/* fansub-takvim için yeni stil */
.event-list .fansub-takvim {
    font-weight: bold;
    background-color: #5c8230;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 0.85em;
    flex-shrink: 0;
}

/* Modal içindeki fansub takvim stili */
#modalEventList .modal-fansub-takvim {
    color: #00FF00; /* Yeşil renk */
    font-size: 0.85em;
    margin: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    text-align: center;
}

/* Responsive düzenlemeler */
@media (max-width: 480px) {
    .event-list .fansub-takvim {
        margin: 5px 0; /* Mobil görünümde dikey boşluk */
        width: 100%; /* Kendi satırına insin */
        text-align: left; /* Sola hizala */
    }

    #modalEventList .modal-fansub-takvim {
        margin: 5px 0;
        width: 100%;
        text-align: left;
    }
}