/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --void:        #121212;
    --void-mid:    #1a1a1a;
    --void-soft:   #222222;
    --void-card:   #2a2a2a;
    --void-rim:    #333333;
    --void-line:   #3d3d3d;
    --void-muted:  #555555;

    /* GIPHY multicolor palette */
    --pink:        #e6246e;
    --pink-lt:     #f03882;
    --pink-bg:     rgba(230,36,110,.14);
    --pink-ring:   rgba(230,36,110,.32);
    --cyan:        #00d4ff;
    --cyan-dk:     #00b8e0;
    --cyan-bg:     rgba(0,212,255,.12);
    --cyan-ring:   rgba(0,212,255,.28);
    --green:       #00ff99;
    --purple:      #9b30ff;
    --yellow:      #ffd930;

    --white:       #ffffff;
    --white-dim:   rgba(255,255,255,.78);
    --white-soft:  rgba(255,255,255,.46);
    --white-faint: rgba(255,255,255,.22);

    --sh1: 0 1px 6px rgba(0,0,0,.55);
    --sh2: 0 4px 16px rgba(0,0,0,.65);
    --sh3: 0 8px 32px rgba(0,0,0,.75);
    --rr:  10px;
    --rr2: 6px;
    --rr3: 14px;
    --pill: 999px;
}

html { font-size: 15px; }

body {
    background: var(--void);
    color: var(--white);
    font-family: 'PingFang SC','Noto Sans SC','Hiragino Sans GB','Microsoft YaHei',
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

a { color: var(--cyan); text-decoration: none; transition: color .16s; }
a:hover { color: var(--cyan-dk); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.cf::after { content: ''; display: table; clear: both; }

/* ===== OUTER CONTAINER ===== */
.gp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.gp-header {
    background: var(--void-mid);
    border-bottom: 1px solid var(--void-rim);
    padding: 8px 0;
    box-shadow: var(--sh1);
}

.gp-header .gp-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.gp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.gp-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* Rainbow gradient text for logo — GIPHY signature */
.gp-logo-txt {
    font-size: 1.40rem;
    font-weight: 900;
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
    background: linear-gradient(90deg, #e6246e 0%, #ffd930 25%, #00ff99 50%, #00d4ff 75%, #9b30ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gp-domain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--void-card);
    border: 1.5px solid var(--void-rim);
    border-radius: var(--pill);
    padding: 4px 14px;
    position: relative;
    overflow: hidden;
}

/* thin rainbow top border */
.gp-domain::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e6246e, #ffd930, #00ff99, #00d4ff, #9b30ff);
}

.gp-domain .gd-note {
    font-size: 0.67rem;
    color: var(--white-soft);
    white-space: nowrap;
}

.gp-domain .gd-url {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--white);
    white-space: nowrap;
}

/* ===== BANNER ===== */
.gp-banner {
    margin: 4px 0 3px;
}
.gp-banner img { border-radius: var(--rr); width: 100%; }

/* ===== CATEGORY NAV ===== */
.gp-catbox {
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.gp-cat-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--void-line);
    min-height: 38px;
}

.gp-cat-row:last-child { border-bottom: none; }

/* rotate through 6 accent colors for zone labels */
.gp-cat-row:nth-child(1) .gp-zone-lbl { background: var(--pink); }
.gp-cat-row:nth-child(2) .gp-zone-lbl { background: var(--purple); }
.gp-cat-row:nth-child(3) .gp-zone-lbl { background: #0099cc; }
.gp-cat-row:nth-child(4) .gp-zone-lbl { background: #cc7700; }
.gp-cat-row:nth-child(5) .gp-zone-lbl { background: #008844; }
.gp-cat-row:nth-child(6) .gp-zone-lbl { background: #994499; }

.gp-zone-lbl {
    color: rgba(255,255,255,.92);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(255,255,255,.10);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

.gp-zone-links {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 4px 8px;
    gap: 3px;
    flex: 1;
}

.gp-zone-links a {
    font-size: .82rem;
    color: var(--white-dim);
    padding: 4px 6px;
    border-radius: var(--rr2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.gp-zone-links a:hover {
    background: var(--cyan-bg);
    color: var(--cyan);
    border-color: var(--cyan-ring);
}

.gp-zone-links a.active {
    background: var(--pink);
    color: var(--white);
    border-color: var(--pink);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.gp-search {
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.gp-search form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.gp-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 2px solid var(--void-line);
    border-radius: var(--pill);
    padding: 0 16px;
    font-size: .88rem;
    color: var(--white);
    background: var(--void-soft);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.gp-search input[type="text"]:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px var(--pink-ring);
    background: var(--void-card);
}

.gp-search input[type="text"]::placeholder { color: var(--white-faint); }

.gp-search button {
    height: 38px;
    padding: 0 12px;
    border: none;
    border-radius: var(--pill);
    background: var(--void-card);
    color: var(--white-dim);
    font-size: .80rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s;
    flex-shrink: 0;
}

.gp-search button:hover {
    background: var(--void-muted);
    color: var(--white);
}

.gp-search button[value="1"] {
    background: var(--pink);
    color: var(--white);
}
.gp-search button[value="1"]:hover { background: var(--pink-lt); }

.gp-search button[value="2"] {
    background: var(--cyan);
    color: var(--void);
}
.gp-search button[value="2"]:hover { background: var(--cyan-dk); color: var(--void); }

/* ===== TRENDING TAGS ===== */
.gp-trending {
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.gp-trending h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--white-soft);
    margin-bottom: 5px;
}

.gp-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gp-tag-list .gpt {
    display: inline-block;
    background: var(--void-card);
    color: var(--white-dim);
    border: 1px solid var(--void-line);
    border-radius: var(--pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.gp-tag-list .gpt:hover {
    background: var(--pink-bg);
    color: var(--pink-lt);
    border-color: var(--pink-ring);
}

/* ===== CONTENT SECTION ===== */
.gp-section {
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.gp-sect-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--void-rim);
    position: relative;
}

/* rainbow underline bar */
.gp-sect-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--pink), var(--cyan));
    border-radius: 2px;
}

.gp-sect-hd h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--white);
}

.gp-sect-hd h3 a { color: var(--white); }
.gp-sect-hd h3 a:hover { color: var(--cyan); }

.gp-sect-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--white);
}

/* ===== MEDIA GRID ===== */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gp-grid li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--void-rim);
    background: var(--void-card);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.gp-grid li:hover {
    box-shadow: var(--sh3);
    transform: translateY(-2px);
    border-color: var(--pink);
}

.gp-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--void-soft);
}

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

.gp-thumb:hover img { transform: scale(1.05); }

.gp-cap {
    padding: 5px 7px 7px;
}

.gp-cap h5 {
    font-size: .78rem;
    font-weight: 500;
    color: var(--white-dim);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gp-cap h5 a { color: var(--white-dim); }
.gp-cap h5 a:hover { color: var(--cyan); }

/* ===== PAGINATION ===== */
.gp-pages {
    margin: 14px 0 6px;
    display: flex;
    justify-content: center;
}

.gp-pages-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.gp-pages-row a.gpp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--void-card);
    border: 1px solid var(--void-line);
    border-radius: var(--rr2);
    font-size: .84rem;
    color: var(--white-dim);
    text-decoration: none;
    transition: all .16s;
}

.gp-pages-row a.gpp:hover {
    background: var(--pink-bg);
    border-color: var(--pink-ring);
    color: var(--pink-lt);
}

.gp-pages-row a.gpp-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--pink);
    border: 1px solid var(--pink);
    border-radius: var(--rr2);
    font-size: .84rem;
    font-weight: 700;
    color: var(--white);
    cursor: default;
}

/* ===== FOOTER ===== */
.gp-flinks {
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.gp-fl-set {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gp-fl-set dd { display: inline; }

.gp-fl-set a {
    display: inline-block;
    font-size: .77rem;
    color: var(--white-soft);
    padding: 2px 9px;
    border-radius: var(--rr2);
    border: 1px solid var(--void-line);
    background: var(--void-card);
    text-decoration: none;
    transition: all .16s;
}

.gp-fl-set a:hover { color: var(--cyan); border-color: var(--cyan-ring); }

.gp-cr {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--white-faint);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.gp-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-left: 4px solid var(--pink);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
}

.gp-dtl-title a {
    color: var(--pink-lt);
    font-weight: 700;
    margin-right: 6px;
}

.gp-dtl-meta {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--void-mid);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    box-shadow: var(--sh1);
    margin: 4px 0;
    color: var(--white-dim);
}

.gp-preview {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.gp-preview picture,
.gp-preview img {
    width: 100%;
    height: auto;
    border-radius: var(--rr2);
    display: block;
}

/* ===== DOWNLOAD BUTTONS ===== */
.gp-dl-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.gp-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--pill);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.gp-dl-btn:hover {
    background: var(--pink-lt);
    color: var(--white);
    transform: translateY(-1px);
}

.gp-app-hint {
    text-align: center;
    padding: 7px;
    font-size: .82rem;
}

.gp-app-hint a { color: var(--cyan); font-weight: 600; }
.gp-app-hint a:hover { color: var(--cyan-dk); }

/* ===== SHARE BAR ===== */
.gp-share {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--void-card);
    border: 1px solid var(--void-rim);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.gp-share .gs-tag  { font-size: .77rem; color: var(--white-soft); white-space: nowrap; }
.gp-share .gs-url  { font-size: .79rem; color: var(--white-dim); flex: 1; min-width: 0; word-break: break-all; }

.gp-share .gs-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--pink);
    color: var(--white);
    border: none;
    border-radius: var(--pill);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s;
    flex-shrink: 0;
}

.gp-share .gs-copy:hover { background: var(--pink-lt); }

/* ===== VISIBILITY ===== */
.dsk-only { display: block; }
.mob-only { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .gp-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .dsk-only { display: none; }
    .mob-only { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .gp-logo-txt { font-size: 1.10rem; }
    .gp-domain .gd-url { font-size: .92rem; }

    .gp-cat-row { align-items: stretch; }

    .gp-zone-lbl {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.5;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gp-zone-links {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

    .gp-zone-links a {
        font-size: 13px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .gp-search form { flex-wrap: nowrap; gap: 4px; }

    .gp-search input[type="text"] {
        height: 34px;
        font-size: .79rem;
        padding: 0 10px;
    }

    .gp-search button {
        height: 34px;
        padding: 0 7px;
        font-size: .74rem;
    }

    .gp-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }

    .gp-thumb { aspect-ratio: 600 / 350; }
    .gp-cap h5 { font-size: .72rem; }
    .gp-section { padding: 9px 9px 7px; }
    .gp-dl-btn { padding: 9px 16px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .gp-zone-lbl { font-size: 10px; }
    .gp-zone-links a { font-size: 13px; }
}

@media (max-width: 380px) {
    .gp-zone-lbl { font-size: 10px; }
    .gp-zone-links a { font-size: 12px; }
    .gp-search button { padding: 0 5px; font-size: .68rem; }
}
