/* ── Page Layout ── */
.comics-page {
    display: flex;
    gap: 0;
    height: calc(100vh - 42px);
    padding: 42px 0 0 0;
}

/* ── Sidebar ── */
.tag-sidebar {
    width: 200px;
    min-width: 200px;
    background-color: #1a1c1b;
    border-right: 1px solid rgba(127, 255, 212, 0.15);
    padding: 12px 10px;
    box-sizing: border-box;
    position: sticky;
    top: 42px;
    height: calc(100vh - 42px);
    overflow-y: auto;
    overflow-x: visible;
    z-index: 100;
}

.tag-search-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.tag-search-input {
    width: 100%;
    box-sizing: border-box;
    background-color: #111312;
    border: 1px solid rgba(127, 255, 212, 0.2);
    color: aquamarine;
    font-family: "jf_dot_ayu";
    font-size: 12px;
    padding: 6px 8px;
    margin-bottom: 0;
    outline: none;
}

.tag-apply-btn {
    width: 100%;
    padding: 6px 0;
    background-color: rgba(127, 255, 212, 0.1);
    border: 1px solid rgba(127, 255, 212, 0.3);
    color: aquamarine;
    font-family: "jf_dot_ayu";
    font-size: 12px;
    cursor: pointer;
    margin-top: 0px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.tag-apply-btn:hover {
    background-color: rgba(127, 255, 212, 0.2);
}

.tag-search-input::placeholder {
    color: rgba(127, 255, 212, 0.3);
}

#tag-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    background-color: #1a1c1b;
    border: 1px solid rgba(127, 255, 212, 0.2);
    border-top: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    flex-direction: column;
}

.tag-search-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    font-family: "jf_dot_ayu";
}

.tag-search-result:hover {
    background-color: rgba(127, 255, 212, 0.06);
}

.tag-search-result .tag-category-label {
    font-size: 10px;
    opacity: 0.5;
    text-transform: uppercase;
}

#active-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.active-tag-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(127, 255, 212, 0.1);
    border: 1px solid rgba(127, 255, 212, 0.3);
    padding: 2px 6px;
    font-size: 11px;
    font-family: "jf_dot_ayu";
    color: aquamarine;
    cursor: pointer;
}

.active-tag-chip:hover {
    background: rgba(127, 255, 212, 0.18);
}

.tag-category {
    margin-bottom: 14px;
}

.tag-category-title {
    font-family: "jf_dot_ayu";
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(127, 255, 212, 0.4);
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(127, 255, 212, 0.1);
    margin-bottom: 6px;
}

.tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 2px;
    font-family: "jf_dot_ayu";
    font-size: 12px;
}

.tag-row:hover {
    background-color: rgba(127, 255, 212, 0.06);
}

.tag-count {
    font-size: 11px;
    opacity: 0.5;
}

.tag-copyright .tag-name  { color: #f0d060; }
.tag-character .tag-name  { color: #80c89a; }
.tag-general .tag-name    { color: #80aad0; }

.tag-copyright .tag-count { color: #f0d060; }
.tag-character .tag-count { color: #80c89a; }
.tag-general .tag-count   { color: #80aad0; }

.tag-copyright .tag-name.search-result { color: #f0d060; }
.tag-character .tag-name.search-result { color: #80c89a; }
.tag-general .tag-name.search-result   { color: #80aad0; }

/* ── Main Content ── */
.comics-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 12px;
}

.comic-cover {
    width: 250px;
    height: 375px;
    padding: 0;
    object-fit: cover;
    margin-top: 10px;
    border-radius: 1%;
    border: 1px solid aquamarine;
    transition: transform 0.2s;
}

.comic-cover:hover {
    transform: scale(1.01);
}

.title {
    color: rgb(11, 190, 161);
}

.comic-item:hover .title {
    animation: flasher 0.5s linear infinite alternate;
}

@keyframes flasher {
    0%   { color: rgb(11, 190, 161); }
    100% { color: white; }
}

.comic-item {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(127, 255, 212, 0.192);
    background-color: #151616;
}

.comic-item a.title {
    padding: 0;
    width: 100%;
    text-align: center;
    background-color: #202221;
    font-size: large;
    text-decoration: none;
}

.comic-details {
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    align-items: center;
    padding: 5px;
    width: 100%;
}

.comic-details p {
    color: #ddd;
    padding: 0;
    margin: 0;
    text-align: center;
    margin-bottom: 5px;
    font-size: 12px;
    height: 50%;
}

.detail-element {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.detail-element i { margin-right: 5px; }
.detail-element p { height: 100%; margin: 0; }

.comic-item.hidden { display: none; }

.series-type-plaque {
    font-family: "jf_dot_ayu";
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid;
    margin: 4px 0 6px 0;
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.series-type-comic { color: #80aad0 !important; border-color: rgba(128, 170, 208, 0.3); background-color: rgba(128, 170, 208, 0.08); }
.series-type-ongoing-comic { color: #80c89a !important; border-color: rgba(128, 200, 154, 0.3); background-color: rgba(128, 200, 154, 0.08); }
.series-type-image-set { color: #f0d060 !important; border-color: rgba(240, 208, 96, 0.3); background-color: rgba(240, 208, 96, 0.08); }
.series-type-image { color: #d080c8 !important; border-color: rgba(208, 128, 200, 0.3); background-color: rgba(208, 128, 200, 0.08); }
.series-type-video { color: #e08080 !important; border-color: rgba(224, 128, 128, 0.3); background-color: rgba(224, 128, 128, 0.08); }

.series-lock-plaque {
    font-family: "jf_dot_ayu";
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid #ffd43b;
    color: #ffd43b;
    margin: 0 0 6px 0;
    display: inline-block;
}
