/*body*/
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: radial-gradient(circle at center, #0b0028, #120034, #1a003d);
    background-attachment: fixed;
    background-size: cover;
    background-blend-mode: screen;
    color: #333;
}
html, body {
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
}
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
}
@keyframes twinkle {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
    z-index: -1;
}

/*header*/
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}
.logo-title {
    display: flex;
    align-items: center;
}
.logo {
    width: 80px;
    margin-right: 10px;
}
.logo-title h1 {
    margin: 0;
}
.gradient-text {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #eef107, #2619da);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (max-width: 500px) {
    .gradient-text {
        font-size: 2.2rem;
    }
}
@media (max-width: 600px) {
    .comic-card img {
        height: auto;
    }
}

.section-title {
    padding: 20px 30px 10px;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

/*navigation*/
.navbar {
    display: flex;
    justify-content: center;
    background-color: transparent;
    padding: 15px;
    border: 2px solid #222;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.nav-item {
    color: #bbb;
    text-decoration: none;
    font-weight: 500;
    margin: 0 20px;
    position: relative;
    transition: color 0.3s ease;
}
.nav-item:hover {
    color: black;
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #eef107, #2619da);
    border-radius: 5px;
}
.nav-item.active {
    color: black;
    font-weight: 700;
}

/*login*/
#loginBtn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}
#loginBtn:hover {
    background-color: #357ABD;
}
.user-section {
    position: relative;
    display: inline-block;
}
#userIcon {
    font-size: 30px;
    cursor: pointer;
}
#userCard {
    position: absolute;
    top: 35px;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
.hidden {
    display: none;
}

/*comic*/
.comics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 0 30px 40px;
}
.comic-card {
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
}
.comic-card:hover {
    transform: translateY(-5px);
}
.comic-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}
.comic-info {
    padding: 10px;
    text-align: center;
}
.comic-info h3 {
    margin: 0;
    font-size: 16px;
}
.comic-info p {
    margin: 5px 0 0;
    font-size: 13px;
    color: #777;
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}
.modal.show {
    opacity: 1;
    visibility: visible;
}
.modal.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-content, .read-content {
    margin: 0;
    background: #fff;
    padding: 25px 35px;
    border-radius: 12px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}
.modal.show .modal-content,
.modal.show .read-content {
    transform: translateY(0);
}
.read-content {
    width: 90%;
    max-width: 600px;
    height: 90%;
}
.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #333;
}
#episodeList {
    max-height: 200px;
    overflow-y: auto;
    padding-left: 20px;
}
#episodeList::-webkit-scrollbar {
    width: 6px;
}
#episodeList::-webkit-scrollbar-thumb {
    background: #424d47;
    border-radius: 4px;
}
#episodeList li {
    margin: 8px 0;
}
#episodeList li a {
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: 0.2s;
    background: #f5f5f5;
}
#episodeList li a:hover {
    background: #00d564;
    color: #fff;
}
.comic-detail-card {
    background: #fdfdfd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.comic-detail {
    display: flex;
    gap: 15px;
}
.comic-detail img {
    width: 120px;
    height: 170px;
    object-fit: cover;
    border-radius: 6px;
}
.comic-text h2 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #00d564;
}
.comic-text p {
    margin: 5px 0;
    font-size: 14px;
    color: #444;
}
.comic-pages img {
    width: 100%;
    max-width: 600px;
    height: auto;
}
#comicSynopsis {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.6;
    text-align: justify;
    margin-top: 5px;
}