/* ==========================================================================
   AO Components — dijeljene komponente koje se koriste na više stranica
   ========================================================================== */

/* ── Anime/Manga nav buttons ── */
.anime-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.anime-nav a {
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    color: #aaa;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.anime-nav a:hover {
    background: rgba(126,184,247,0.12);
    border-color: rgba(126,184,247,0.35);
    color: #fff;
}

/* ── Anime/Manga hero layout ── */
.anime-hero {
    display: flex;
    gap: 28px;
    margin-bottom: 32px;
    align-items: flex-start;
}
.anime-poster {
    flex-shrink: 0;
    width: 240px;
}
.anime-poster img {
    width: 240px !important;
    max-width: 240px !important;
    max-height: none !important;
    height: auto !important;
    border-radius: 12px;
    border: 2px solid rgba(126,184,247,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    display: block;
}
.anime-details {
    flex: 1;
    min-width: 0;
}
.anime-details h1 {
    font-size: 26px !important;
    margin: 0 0 0 !important;
    color: #f0f0f8 !important;
    line-height: 1.2 !important;
}
/* streaming h1 ima malo drugaciji margin */
.anime-details.streaming h1 {
    margin: 12px 0 0 !important;
}

/* Japanski naziv ispod glavnog naslova */
.ao-japname {
    display: block;
    font-size: 14px;
    color: #6b7fa0;
    font-style: italic;
    margin-top: 2px;
    margin-bottom: 16px;
    line-height: 1.3;
}
/* Prazan ao-japname (kad nema japname) nosi isti margin kao originalni h1 margin */
.ao-japname:empty {
    margin-top: 0;
    margin-bottom: 18px;
}

/* ── Badges ── */
.anime-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid rgba(126,184,247,0.2);
    background: rgba(126,184,247,0.08);
}
.badge-info .label { color: #7eb8f7; }
.badge-info .value { color: #ddd; font-weight: normal; }
.badge-complete {
    background: rgba(76,175,80,0.12);
    border-color: rgba(76,175,80,0.3);
}
.badge-complete .label,
.badge-complete .value { color: #4caf50; }

/* ── Genre tags ── */
.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.genre-tag {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #bbb;
}
.anime-studio { font-size: 13px; color: #888; margin: 10px 0 8px; }
.anime-studio strong { color: #7eb8f7; }
.anime-description { font-size: 13px; line-height: 1.75; color: #aaa; margin-top: 10px; }
.anime-description strong { color: #7eb8f7; display: block; margin-bottom: 4px; }
.anime-rss { margin-top: 14px; font-size: 12px; }
.anime-rss a { color: #666; text-decoration: none; }
.anime-rss a:hover { color: #f90; }

/* ── Sub/Chapter cards ── */
.subs-header {
    font-size: 13px;
    color: #7eb8f7;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(126,184,247,0.2);
    margin-bottom: 12px;
    font-weight: bold;
}
.sub-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(200,200,210,0.14) !important;
    background: rgba(255,255,255,0.02);
    margin-bottom: 8px;
    transition: background 0.2s, border-color 0.2s;
    z-index: 1;
}
.sub-card:hover {
    background: rgba(80,30,30,0.5);
    border-color: rgba(180,80,80,0.4) !important;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    z-index: 100;
}
.sub-card-main { flex: 1; min-width: 0; }
.sub-card-title {
    font-size: 14px;
    color: #ddd;
    margin: 0 0 4px;
    font-weight: bold;
}
.sub-card-rank {
    color: #555;
    font-size: 13px;
    margin-right: 4px;
    font-weight: normal;
}
.sub-card-info {
    position: absolute;
    left: -1px;
    right: -1px;
    top: 100%;
    background: rgba(80,30,30,0.97);
    border: 1px solid rgba(180,80,80,0.4);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 8px 16px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #ccc;
    visibility: hidden;
    opacity: 0;
    z-index: 99;
    transition: opacity 0.2s ease;
}
.sub-card:hover .sub-card-info { visibility: visible; opacity: 1; }
.sub-card-info strong { color: #7eb8f7; }
.sub-card-info a { color: #7eb8f7; text-decoration: none; }
.sub-card-info a:hover { text-decoration: underline; }

.sub-download-btn,
.sub-watch-btn {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
    background: #3355cc;
    color: #fff !important;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.sub-download-btn:hover,
.sub-watch-btn:hover { background: #4466dd; }

.download-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 20px;
    background: rgba(51,85,204,0.15);
    border: 1px solid rgba(126,184,247,0.3);
    color: #7eb8f7 !important;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none !important;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.download-all-btn:hover {
    background: rgba(51,85,204,0.35);
    border-color: rgba(126,184,247,0.6);
    color: #fff !important;
}

/* ── Stars / rating ── */
.ao-stars-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none !important;
}
.ao-star {
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: color 0.1s, transform 0.1s;
    line-height: 1;
    user-select: none;
    background: none !important;
    text-shadow: none;
}
.ao-star.filled        { color: #f5a623; text-shadow: 0 0 6px rgba(245,166,35,0.4); }
.ao-star.filled.red    { color: #e84040; text-shadow: 0 0 6px rgba(232,64,64,0.4); }
.ao-star.filled.yellow { color: #f5a623; text-shadow: 0 0 6px rgba(245,166,35,0.4); }
.ao-star.filled.green  { color: #4caf50; text-shadow: 0 0 6px rgba(76,175,80,0.4); }
.ao-star.hover { color: #ffc94d; transform: scale(1.15); }
.ao-star:hover { color: #ffc94d; transform: scale(1.15); }
.ao-score-label {
    margin-left: 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 24px;
}
.ao-score-label.red    { color: #e84040; }
.ao-score-label.yellow { color: #f5a623; }
.ao-score-label.green  { color: #4caf50; }
.stars { background: none !important; min-height: 0 !important; }
.stars .select, .stars .current { display: none !important; }
