/*
Theme Name: AnimeHub4U Neon
Theme URI: https://animehub4u.in/
Author: AnimeHub4U
Description: Modern dark anime catalog theme with responsive cards, search, metadata panels and collapsible episode download links.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: animehub4u
*/

/* =========================
   ROOT VARIABLES
========================= */

:root{
    --bg:#09080f;
    --surface:#14111f;
    --surface-2:#1d1830;
    --line:#332b4c;
    --text:#f6f3ff;
    --muted:#b8b0cc;
    --primary:#7650ff;
    --primary-2:#9b72ff;
    --pink:#e14cbd;
    --green:#16e0a0;
    --shadow:0 0 35px rgba(112,72,255,.18);
}

/* =========================
   GLOBAL
========================= */

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:
        radial-gradient(circle at 50% -15%,#241649 0,transparent 42%),
        var(--bg);
    color:var(--text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    line-height:1.65;
}

a{
    color:inherit;
    text-decoration:none;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

/* =========================
   CONTAINER
========================= */

.container{
    width:min(1180px,calc(100% - 32px));
    margin:auto;
}

/* =========================
   HEADER
========================= */

.site-header{
    position:sticky;
    top:0;
    z-index:99;
    background:rgba(9,8,15,.9);
    backdrop-filter:blur(14px);
    border-top:2px solid var(--primary);
    border-bottom:1px solid #3c2b75;
    box-shadow:0 0 24px rgba(109,70,255,.35);
}

.nav-wrap{
    min-height:74px;
    display:flex;
    align-items:center;
    gap:28px;
}

.brand{
    font-size:30px;
    font-weight:950;
    letter-spacing:-2px;
    line-height:1;
    color:#fff;
}

.brand span{
    color:var(--primary-2);
}

.main-nav{
    display:flex;
    align-items:center;
    gap:24px;
    margin-left:auto;
    font-size:13px;
    font-weight:800;
    text-transform:uppercase;
}

.main-nav a:hover,
.main-nav .current-menu-item>a{
    color:var(--primary-2);
}

.menu-toggle{
    display:none;
    background:none;
    border:0;
    color:#fff;
    font-size:27px;
}

.search-toggle{
    font-size:22px;
}

/* =========================
   BUTTONS
========================= */

.hero-actions{
    padding:20px 0 28px;
}

.button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    padding:10px 24px;
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary),#6945e8);
    color:#fff;
    font-weight:900;
    text-transform:uppercase;
    box-shadow:var(--shadow);
    border:1px solid #8d70ff;
    transition:.2s;
}

.button:hover{
    transform:translateY(-2px);
    filter:brightness(1.1);
}

.button.full{
    width:100%;
}

.action-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-top:12px;
}

/* =========================
   PAGE TITLES
========================= */

.page-title{
    font-size:clamp(28px,4vw,48px);
    line-height:1.2;
    margin:28px 0 16px;
    font-weight:950;
    letter-spacing:-1px;
}

.section-heading{
    display:flex;
    align-items:center;
    gap:14px;
    margin:34px 0 22px;
    text-transform:uppercase;
    font-size:18px;
    letter-spacing:1px;
}

.section-heading:before,
.section-heading:after{
    content:"";
    height:2px;
    background:linear-gradient(90deg,transparent,var(--primary),transparent);
    flex:1;
}

.section-heading span{
    white-space:nowrap;
}

/* =========================
   ANIME GRID
========================= */

.grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:18px;
}

.anime-card{
    min-width:0;
}

/* =========================
   POSTER
========================= */

.poster{
    position:relative;
    aspect-ratio:2/3;
    overflow:hidden;
    border-radius:12px;
    border:1px solid var(--line);
    background:var(--surface-2);
    box-shadow:0 10px 25px rgba(0,0,0,.22);
}

.poster img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.3s;
}

.anime-card:hover .poster img{
    transform:scale(1.04);
}

/* =========================
   CARD BODY
========================= */

.card-body{
    padding:11px 2px;
}

/* =========================
   FULL CARD TITLE
   NO TRUNCATION
   NO ELLIPSIS
========================= */

.card-title{
    font-size:16px;
    font-weight:850;
    line-height:1.45;

    /* Full title */
    display:block !important;
    width:100% !important;

    /* Remove fixed height */
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;

    /* Remove text clipping */
    overflow:visible !important;
    white-space:normal !important;
    text-overflow:clip !important;

    /* Remove line clamp */
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
    -webkit-box-orient:initial !important;

    /* Long title wrap */
    word-break:normal !important;
    overflow-wrap:anywhere !important;
}

/* =========================
   CARD DATE
========================= */

.card-date{
    color:var(--muted);
    font-size:12px;
    margin-top:8px;
}

/* =========================
   BADGES
========================= */

.badge{
    display:inline-flex;
    align-items:center;
    padding:4px 9px;
    border-radius:999px;
    background:#2b2050;
    border:1px solid #6744a5;
    color:#d4b6ff;
    font-size:11px;
    font-weight:800;
    margin:3px;
}

/* =========================
   POST HEADER
========================= */

.post-head{
    text-align:center;
    max-width:1000px;
    margin:25px auto;
}

.post-head .page-title{
    margin-bottom:14px;
}

.meta-line{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:7px;
    align-items:center;
    color:var(--muted);
    font-size:13px;
}

.intro{
    font-size:17px;
    color:#eee;
    margin:25px auto;
    max-width:1000px;
}

/* =========================
   DIVIDER
========================= */

.divider{
    display:flex;
    align-items:center;
    gap:16px;
    margin:32px 0 20px;
    color:#fff;
    font-weight:950;
    letter-spacing:2px;
}

.divider:before,
.divider:after{
    content:"";
    height:2px;
    background:linear-gradient(90deg,transparent,var(--primary));
    flex:1;
}

.divider:after{
    background:linear-gradient(90deg,var(--primary),transparent);
}

/* =========================
   INFO CARD
========================= */

.info-card{
    border:1px solid var(--line);
    border-radius:18px;
    padding:20px;
    background:linear-gradient(145deg,rgba(36,28,58,.8),rgba(15,13,23,.9));
    box-shadow:var(--shadow);
}

.anime-info{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:24px;
    align-items:start;
}

.info-poster{
    border-radius:13px;
    border:1px solid var(--line);
    overflow:hidden;
}

.info-table{
    display:grid;
    gap:10px;
}

.info-row{
    display:grid;
    grid-template-columns:145px 1fr;
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
    background:#12101a;
}

.info-label{
    padding:12px;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:1.5px;
    color:#aaa0c3;
    border-right:1px solid var(--line);
    font-weight:900;
}

.info-value{
    padding:12px;
    font-weight:750;
}

.synopsis{
    margin-top:14px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#12101a;
    padding:18px;
    color:#e7e2f2;
}

/* =========================
   EPISODES
========================= */

.episodes{
    display:grid;
    gap:12px;
}

.episode{
    border:1px solid var(--line);
    border-radius:14px;
    overflow:hidden;
    background:rgba(26,21,41,.8);
}

.episode summary{
    list-style:none;
    cursor:pointer;
    padding:17px 20px;
    font-weight:850;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.episode summary::-webkit-details-marker{
    display:none;
}

.episode summary:after{
    content:"⌄";
    color:var(--primary-2);
    font-size:24px;
}

.episode[open] summary:after{
    content:"⌃";
}

.episode-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    padding:0 20px 18px;
}

.quality-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:9px 15px;
    border-radius:10px;
    background:#24203a;
    border:1px solid #6552a4;
    color:#c8b6ff;
    font-weight:850;
    font-size:13px;
}

.quality-button:hover{
    background:var(--primary);
    color:#fff;
}

/* =========================
   NOTICE
========================= */

.notice{
    border:1px solid #795a14;
    background:#261d10;
    color:#ffc94e;
    padding:14px 16px;
    border-radius:12px;
    margin:20px 0;
}

/* =========================
   CONTENT
========================= */

.content-area{
    max-width:1000px;
    margin:0 auto;
}

.comments-area{
    margin-top:50px;
}

/* =========================
   FOOTER
========================= */

.site-footer{
    margin-top:70px;
    padding:35px 0;
    border-top:1px solid #3c2b75;
    text-align:center;
    color:var(--muted);
}

.footer-menu{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:22px;
    margin:20px 0;
    font-weight:800;
    font-size:13px;
}

/* =========================
   PAGINATION
========================= */

.pagination{
    display:flex;
    gap:8px;
    justify-content:center;
    margin:35px 0;
}

.pagination a,
.pagination span{
    padding:8px 13px;
    border:1px solid var(--line);
    border-radius:9px;
}

.pagination .current{
    background:var(--primary);
    border-color:var(--primary);
}

/* =========================
   SEARCH
========================= */

.search-form{
    display:flex;
    gap:10px;
    margin:30px 0;
}

.search-form input{
    flex:1;
    background:#15121f;
    color:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    padding:13px 15px;
}

.no-results{
    padding:40px;
    text-align:center;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:15px;
}

/* =========================
   TABLET
========================= */

@media(max-width:1000px){

    .grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }

    .main-nav{
        gap:14px;
    }

}

/* =========================
   MOBILE
========================= */

@media(max-width:760px){

    .container{
        width:min(100% - 24px,600px);
    }

    .nav-wrap{
        min-height:62px;
    }

    .brand{
        font-size:25px;
    }

    .menu-toggle{
        display:block;
    }

    .main-nav{
        display:none;
        position:absolute;
        top:62px;
        left:0;
        right:0;
        padding:15px 20px;
        background:#100d1b;
        border-bottom:1px solid var(--line);
        flex-direction:column;
        align-items:flex-start;
        gap:14px;
    }

    .main-nav.open{
        display:flex;
    }

    .grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:15px;
    }

    .anime-info{
        grid-template-columns:1fr;
    }

    .info-poster{
        max-width:260px;
        margin:auto;
    }

    .info-row{
        grid-template-columns:105px 1fr;
    }

    .action-grid{
        grid-template-columns:1fr;
    }

    .page-title{
        font-size:30px;
    }

    .intro{
        font-size:15px;
    }

    .section-heading{
        font-size:15px;
    }

    .section-heading span{
        white-space:normal;
        text-align:center;
    }

    .search-form{
        flex-direction:column;
    }

    /* Full title on mobile */
    .card-title{
        display:block !important;
        height:auto !important;
        max-height:none !important;
        min-height:0 !important;
        overflow:visible !important;
        white-space:normal !important;
        text-overflow:clip !important;
        -webkit-line-clamp:unset !important;
        line-clamp:unset !important;
        -webkit-box-orient:initial !important;
        overflow-wrap:anywhere !important;
    }

}