@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

:root {
    --bg: #0a0614; --card-bg: #120b25cc; --muted: #b8b5c9; --text: #f5f3ff;
    --brand: #8a63d2; --brand-light: #a881e3; --brand-dark: #6b4f9e;
    --border-color: rgba(255, 255, 255, .08); --glass: rgba(255, 255, 255, .06);
    --ok: #22c55e; --warn: #f59e0b;
}
.scripts-page-container {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(1200px 800px at 10% -20%, #2a1a59 0%, transparent 60%), radial-gradient(1000px 700px at 120% 10%, #2d0b3a 0%, transparent 60%), linear-gradient(180deg, #090510 0%, #0b0616 100%);
    color: var(--text);
    padding-top: 100px;
}
.container { width: min(1400px, 92vw); margin: 0 auto; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px; font-weight: 600;
    background: rgba(138, 99, 210, .15); color: #d7c8ff;
    border: 1px solid rgba(138, 99, 210, .2);
}

.hero { padding: 48px 0 24px; position: relative; overflow: hidden; }
.hero .layer {
    position: absolute; inset: auto -20% -40% -20%; height: 300px;
    background: radial-gradient(60% 120% at 50% 10%, rgba(138, 99, 210, .35), transparent 60%);
    filter: blur(40px); animation: float 8s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero .head { display: grid; grid-template-columns: 1fr .8fr; gap: 64px; align-items: center; }
.hero-content-area { min-width: 0; }
.h1 { font-size: 48px; line-height: 1.1; margin: 12px 0; font-weight: 900; letter-spacing: -1px; }
.lead { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 550px; }
.searchbar { display: flex; gap: 10px; margin-top: 24px; }
.input {
    background: var(--glass); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 14px 16px; color: #fff;
    font-family: inherit; font-size: 1rem; font-weight: 600;
    flex: 1; min-width: 0;
}
.select { display: none; }
.hero-mascot-area {
    display: flex; justify-content: center; align-items: center;
    align-self: stretch; min-height: 250px; 
}
.hero-mascot-image {
    max-width: 100%; height: 100%; object-fit: contain;
}

.marquee {
    margin-top: 24px; display: flex; gap: 24px; overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee .track { display: flex; gap: 24px; animation: run 40s linear infinite; }
@keyframes run { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.badge-lg {
    padding: 10px 16px; border-radius: 12px; background: var(--glass);
    border: 1px solid var(--border-color); font-weight: 700;
    text-decoration: none; color: var(--text);
    transition: background-color 0.2s; white-space: nowrap;
}
.badge-lg:hover { background-color: rgba(255, 255, 255, .15); }

.grid-controls { display: flex; justify-content: center; padding: 32px 0; }
.tabs {
    display: inline-flex; gap: 8px; background: var(--glass);
    padding: 6px; border: 1px solid var(--border-color); border-radius: 999px; position: relative;
}
.tab {
    padding: 12px 24px; border-radius: 999px; font-weight: 600;
    color: var(--muted); cursor: pointer; position: relative; user-select: none; transition: color .3s ease;
    z-index: 2;
}
.tab.active { color: #ffffff !important; }
.tab-indicator {
    position: absolute; top: 4px; bottom: 4px; border-radius: 999px;
    background: linear-gradient(180deg, var(--brand-dark), var(--brand));
    box-shadow: 0 8px 24px #8a63d255;
    transition: all .35s cubic-bezier(.2, .8, .2, 1);
    z-index: 1;
}
.grid { padding: 26px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
    position: relative; border-radius: 22px; background: var(--card-bg);
    border: 1px solid var(--border-color); overflow: hidden;
    transform-style: preserve-3d; transition: transform .3s ease, box-shadow .3s ease;
    display: flex; flex-direction: column;
}
.card:hover {
    box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 0 0 1px var(--border-color) inset;
    transform: translateY(-4px) perspective(1000px) rotateX(2deg) rotateY(-1.5deg);
}
.card .shine {
    position: absolute; inset: -200% -50% auto -50%; height: 60%;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .15) 50%, transparent 60%);
    transform: rotate(10deg); animation: shine 5s linear infinite; pointer-events: none;
}
@keyframes shine { 0% { transform: translateX(-20%) rotate(10deg); } 100% { transform: translateX(120%) rotate(10deg); } }

.thumb { height: 160px; background-size: cover; background-position: center; transition: transform .4s ease; flex-shrink: 0; }
.card:hover .thumb { transform: scale(1.05); }

.content {
    padding: 20px;
    display: flex; flex-direction: column;
    flex-grow: 1;
}
.title { font-size: 20px; font-weight: 700; margin: 0 0 8px 0; }
.desc {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 16px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.status-price-area {
    margin-bottom: 16px;
}
.dynamic-status {
    display: inline-block;
    font-size: 16px; padding: 10px 14px; font-weight: 700;
    border-radius: 12px; background: linear-gradient(180deg, #1f1536, #261a45);
    color: var(--text); white-space: nowrap;
}
.dynamic-status.status-free { color: var(--ok); }
.dynamic-status.status-soon { color: var(--warn); }
.dynamic-status.status-paid { color: var(--brand-light); }
.controls { display: flex; gap: 10px; width: 100%; }
.b {
    flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    padding: 12px; border-radius: 12px;
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, #251a45, #1a1235);
    font-weight: 600; cursor: pointer; transition: all .2s;
}
.b:hover { background: linear-gradient(180deg, #302157, #241942); border-color: rgba(255,255,255,.15); }
.b:active { transform: translateY(1px); }
.b.primary {
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 25px rgba(138, 99, 210, 0.2);
    border-color: var(--brand-dark);
    color: #ffffff !important;
}
.b.primary:hover { 
    background: linear-gradient(180deg, var(--brand-light), var(--brand));
    color: #ffffff !important;
}

.badge-status, .meta, .tags, .price, .card-footer {
    display: none;
}

.pager { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.page {
    min-width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 12px; background: var(--glass);
    border: 1px solid var(--border-color); cursor: pointer; font-weight: 600;
}
.page.active { background: linear-gradient(180deg, var(--brand), var(--brand-dark)); border-color: transparent; }
.skeleton { animation: pulse 1.4s ease-in-out infinite; background: linear-gradient(90deg, var(--glass), rgba(255,255,255,.12), var(--glass)); background-size: 200% 100%; }
@keyframes pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media(max-width: 1200px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 1024px) { 
    .hero .head { grid-template-columns: 1fr; } 
    .hero-mascot-area { margin-top: 32px; max-height: 250px; }
}
@media(max-width: 768px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 680px) {
    .grid { grid-template-columns: 1fr; }
    .searchbar { flex-direction: column; }
    .tabs { display: none; } .grid-controls { padding: 16px 0; }
}
.tabs .tab.active {
    color: #ffffff !important;
}