/**
 * Alqanime Scraper - Frontend Stylesheet
 *
 * Digunakan untuk menampilkan Kartu Informasi Anime & Kotak Unduhan responsif
 *
 * @package Alqanime_Anime_Scraper
 */

:root {
    --alq-primary: #2563eb;
    --alq-primary-dark: #1d4ed8;
    --alq-primary-light: #eff6ff;
    --alq-border: #e2e8f0;
    --alq-text: #1e293b;
    --alq-muted: #64748b;
}

/* ============================================================
   1. KARTU INFORMASI ANIME (INFO CARD)
   ============================================================ */
.alqanime-info-card {
    background: #ffffff;
    border: 1px solid var(--alq-border);
    border-radius: 8px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    font-family: inherit;
}

.alqanime-info-card.kuso-info-wrapper {
    padding: 0 !important;
    border-left: 1px solid var(--alq-border) !important;
}

.alqanime-info-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--alq-border);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alqanime-info-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alqanime-info-title .dashicons {
    color: var(--alq-primary);
}

.alqanime-badge-score {
    background: #fef08a;
    color: #854d0e;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #fde047;
}

.alqanime-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px 20px;
    padding: 18px;
}

.alqanime-info-item {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--alq-text);
}

.alqanime-info-label {
    font-weight: 600;
    color: var(--alq-muted);
    min-width: 85px;
    display: inline-block;
}

.alqanime-info-val {
    color: #0f172a;
}

.alqanime-col-span-full {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 4px;
}

.alqanime-info-genres {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.alqanime-genre-tag,
a.alqanime-genre-tag {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
    font-size: 11.5px;
    padding: 2.5px 9px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 1.4;
    transition: all 0.2s ease-in-out;
}

a.alqanime-genre-tag:hover,
a.alqanime-genre-tag:focus {
    background: var(--alq-primary, #2563eb);
    border-color: var(--alq-primary-dark, #1d4ed8);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

/* Tautan Kategori & Badge Taksonomi Kartu Info Anime */
.alqanime-tax-link,
a.alqanime-tax-link {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 1.4;
    transition: all 0.2s ease-in-out;
}

/* Badge Tipe Anime (TV, Movie, OVA, dsb) */
a.alq-badge-type {
    background: #e0f2fe;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
}
a.alq-badge-type:hover {
    background: #0284c7;
    color: #ffffff !important;
    border-color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

/* Badge Status Penayangan (Completed) */
a.alq-badge-completed {
    background: #dcfce7;
    color: #15803d !important;
    border: 1px solid #bbf7d0;
}
a.alq-badge-completed:hover {
    background: #16a34a;
    color: #ffffff !important;
    border-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
}

/* Badge Status Penayangan (Ongoing) */
a.alq-badge-ongoing {
    background: #fef3c7;
    color: #b45309 !important;
    border: 1px solid #fde68a;
}
a.alq-badge-ongoing:hover {
    background: #d97706;
    color: #ffffff !important;
    border-color: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}

/* Badge Musim Rilis (Season) */
a.alq-badge-season {
    background: #f3e8ff;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff;
}
a.alq-badge-season:hover {
    background: #9333ea;
    color: #ffffff !important;
    border-color: #7e22ce;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(147, 51, 234, 0.25);
}

/* Badge Studio / Produser */
a.alq-badge-studio {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
    margin-right: 4px;
    margin-bottom: 3px;
}
a.alq-badge-studio:hover {
    background: #475569;
    color: #ffffff !important;
    border-color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(71, 85, 105, 0.25);
}

/* Judul Jepang Value */
.alq-japanese-val {
    font-weight: 500;
    color: #0f172a;
    font-family: inherit, 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
}

/* Skor MAL Value */
.alq-score-val {
    font-weight: 700;
    color: #854d0e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.alq-score-val .alq-star {
    color: #eab308;
    font-size: 14px;
}

/* ============================================================
   2. KOTAK UNDUHAN ANIME (DOWNLOAD BOX)
   ============================================================ */
.alqanime-dl-box {
    border: 1px solid var(--alq-border);
    border-radius: 8px;
    margin: 30px 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    font-family: inherit;
}

.alqanime-dl-header {
    padding: 14px 20px;
    color: #ffffff;
    background: var(--alq-primary);
}

.alqanime-dl-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alqanime-dl-content {
    padding: 16px 20px;
}

.alqanime-dl-group {
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.alqanime-dl-group:last-child {
    margin-bottom: 0;
}

.alqanime-group-heading {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alqanime-group-body {
    padding: 10px 14px;
    background: #ffffff;
}

.alqanime-res-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 14px;
}

.alqanime-res-row:last-child {
    border-bottom: none;
}

.alqanime-res-badge {
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.alqanime-server-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

/* Tombol Download */
.alqanime-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.alqanime-dl-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.style-pill .alqanime-dl-btn {
    border-radius: 9999px;
}

.style-rounded .alqanime-dl-btn {
    border-radius: 6px;
}

.style-square .alqanime-dl-btn {
    border-radius: 2px;
}

/* Server-Specific Colors */
.srv-gdrive {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}
.srv-gdrive:hover { background: #4f46e5; color: #ffffff; }

.srv-acefile {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #ddd6fe;
}
.srv-acefile:hover { background: #7c3aed; color: #ffffff; }

.srv-pixeldrain {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}
.srv-pixeldrain:hover { background: #059669; color: #ffffff; }

.srv-terabox {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.srv-terabox:hover { background: #2563eb; color: #ffffff; }

.srv-mediafire {
    background: #f0f9ff;
    color: #075985;
    border-color: #bae6fd;
}
.srv-mediafire:hover { background: #0284c7; color: #ffffff; }

.srv-gofile {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.srv-gofile:hover { background: #d97706; color: #ffffff; }

.srv-mega {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}
.srv-mega:hover { background: #dc2626; color: #ffffff; }

.srv-resharer {
    background: #faf5ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}
.srv-resharer:hover { background: #9333ea; color: #ffffff; }

.srv-default {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.srv-default:hover { background: #475569; color: #ffffff; }

/* Theme Colors */
.theme-blue .alqanime-dl-header { background: #2563eb; }
.theme-red .alqanime-dl-header  { background: #dc2626; }
.theme-green .alqanime-dl-header{ background: #16a34a; }
.theme-purple .alqanime-dl-header{ background: #7c3aed; }
.theme-dark .alqanime-dl-header { background: #0f172a; }
.theme-orange .alqanime-dl-header{ background: #ea580c; }

/* Responsive adjustments */
@media (max-width: 640px) {
    .alqanime-res-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
