/* ===========================
   RESET
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: #111827;
}

/* ===========================
   HEADER
=========================== */

.header {
    position: relative;
    background: url("images/img_page.jpg") center center / cover no-repeat;
    min-height: 320px;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .12);
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.language-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.language-button {
    background: rgba(255, 255, 255, .85);
    color: #111827;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    z-index: 100;
}

.language-button.active,
.language-button:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .45);
    mix-blend-mode: lighten;
}

.logo {
    position: relative;
    font-size: 42px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 1;
}

.logo span {
    display: inline-block;
    position: relative;
}

.logo-anime {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.3);
    animation: animePulse 3s ease-in-out infinite;
}

.logo-zone {
    color: #dc2626;
    text-shadow: 0 0 12px rgba(220, 38, 38, 0.7), 0 0 28px rgba(220, 38, 38, 0.28);
    animation: zoneFlare 2.6s ease-in-out infinite;
}

.logo-anime::after,
.logo-zone::after {
    content: "";
    position: absolute;
    inset: 0;
    filter: blur(4px);
    opacity: 0.35;
}

.logo-anime::after {
    background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.8), transparent 55%);
}

.logo-zone::after {
    background: radial-gradient(circle at 50% 20%, rgba(220, 38, 38, 0.9), transparent 55%);
}

@keyframes animePulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-2px) scale(1.02);
        opacity: 0.95;
    }
}

@keyframes zoneFlare {
    0%, 100% {
        transform: translateY(0) scale(1);
        text-shadow: 0 0 12px rgba(220, 38, 38, 0.7), 0 0 28px rgba(220, 38, 38, 0.28);
    }
    25% {
        transform: translateY(-1px) scale(1.01);
        text-shadow: 0 0 20px rgba(220, 38, 38, 0.85), 0 0 36px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: translateY(1px) scale(1.01);
        text-shadow: 0 0 16px rgba(220, 38, 38, 0.65), 0 0 30px rgba(220, 38, 38, 0.35);
    }
}

/* ===========================
   HERO
=========================== */

.hero {
    text-align: center;
    padding: 50px 20px;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 15px;
    color: #111827;
}

.hero p {
    color: #475569;
    font-size: 18px;
}

/* ===========================
   SEARCH
=========================== */

.search-box {
    width: 90%;
    max-width: 700px;
    margin: 20px auto;
}

.search-box input {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 14px;
    outline: none;
    font-size: 18px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* ===========================
   ADS
=========================== */



/* ===========================
   GRID
=========================== */

.anime-grid {

    width: 90%;

    max-width: 1200px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 25px;

    padding-bottom: 50px;

}

/* ===========================
   CARD
=========================== */

.anime-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}

.anime-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.anime-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.card-content {
    padding: 22px;
}

.card-content h2 {
    margin-bottom: 10px;
    color: #111827;
}

.card-content p {
    color: #475569;
    margin-bottom: 15px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 14px;
}

.card-genres {
    color: #667085;
    margin-bottom: 18px;
    font-size: 14px;
}

.watch-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: #dc2626;
    color: white;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(220, 38, 38, .22);
}

.watch-btn:hover {
    background: #b91c1c;
}

/* ===========================
   DETAIL PAGE
=========================== */

.detail-page {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 60px;
}

.detail-content {
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 32px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .12);
    overflow: hidden;
    position: relative;
}

.detail-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.1), transparent 25%),
                      radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.08), transparent 18%),
                      radial-gradient(circle at 50% 85%, rgba(244, 114, 182, 0.06), transparent 20%);
    pointer-events: none;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    padding: 48px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.detail-image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    max-height: 560px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .1);
}

.detail-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-summary {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.info-icon {
    min-width: 46px;
    min-height: 46px;
    display: grid;
    place-items: center;
    font-size: 22px;
    border-radius: 16px;
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.info-copy {
    display: grid;
    gap: 6px;
}

.info-label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-info-item strong {
    color: #111827;
    font-size: 16px;
}

.detail-genres {
    grid-column: span 2;
}

.detail-summary h1 {
    font-size: 42px;
    margin-bottom: 18px;
    color: #111827;
    letter-spacing: -0.035em;
}

.detail-summary p {
    color: #475569;
    line-height: 1.85;
    margin-bottom: 26px;
    font-size: 17px;
}

.detail-section h3 {
    margin-bottom: 14px;
    color: #111827;
    font-size: 19px;
}

.detail-section p {
    color: #334155;
    line-height: 1.8;
    font-size: 15.8px;
}

.detail-characters {
    list-style: none;
    padding: 0;
    margin: 0;
}

.character-item {
    margin-bottom: 14px;
    color: #475569;
    padding: 14px 16px;
    background: rgba(248, 113, 113, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(248, 113, 113, 0.12);
}

.character-item strong {
    display: inline-block;
    margin-bottom: 4px;
    color: #111827;
}

.platform-list {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 16px;
    color: #b91c1c;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.12);
}

.detail-badge {
    display: inline-block;
    background: #fde8e8;
    color: #b91c1c;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
}

.back-link {
    color: #111827;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-summary h1 {
    font-size: 38px;
    margin-bottom: 18px;
    color: #111827;
}

.detail-summary p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 26px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    margin-bottom: 14px;
    color: #111827;
}

.detail-characters {
    list-style: none;
    padding: 0;
}

.character-item {
    margin-bottom: 12px;
    color: #475569;
}

.platform-list {
    display: grid;
    gap: 14px;
}

.watch-now-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 16px 24px;
    background: #dc2626;
    color: white;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(220, 38, 38, .22);
    transition: background .2s ease;
}

.watch-now-btn:hover {
    background: #b91c1c;
}

.detail-notfound {
    padding: 60px;
    text-align: center;
}

.detail-notfound h2 {
    margin-bottom: 18px;
    color: #111827;
}

.detail-notfound p {
    color: #475569;
    margin-bottom: 30px;
    line-height: 1.7;
}

@media (max-width: 960px) {
    .detail-hero {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

@media (max-width: 680px) {
    .detail-page {
        margin: 24px auto 40px;
    }

    .detail-hero {
        gap: 24px;
    }
}

/* ===========================
   MODAL
=========================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, .45);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: 22px;
    padding: 28px;
    position: relative;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #111827;
}

.platform-link {
    display: block;
    margin-top: 15px;
    background: #dc2626;
    color: white;

    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
}

.platform-link:hover {
    background: #b91c1c;
}

/* ===========================
   FOOTER
=========================== */

footer {
    background: #ffffff;
    padding: 30px;
    text-align: center;
    color: #475569;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

footer p {
    margin: 8px 0;
}

/* ===========================
   MOBILE
=========================== */

@media(max-width:768px) {

    .hero h1 {

        font-size: 30px;

    }

    .logo {

        font-size: 26px;

    }

    .anime-card img {

        height: 280px;

    }

}