:root {
    --bg: #000000;
    --card: #121212;
    --primary: #5236ce;
    --primary-hover: #6a4cff;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.1);
    --glow: radial-gradient(circle at 50% 0%, #2b1d5c 0%, #000000 60%);
    --gold: #ffd700;
}

* { box-sizing: border-box; }

body {
    margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg); background-image: var(--glow);
    background-attachment: fixed; background-repeat: no-repeat;
    color: var(--text); min-height: 100vh; line-height: 1.5;
    display: flex; flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* HEADER */
header {
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(15px);
    position: sticky; top: 0; z-index: 100; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.brand-link { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: white; }
.brand-icon { width: 32px; height: 32px; fill: white; }
.brand-divider { opacity: 0.3; font-weight: 300; margin: 0 5px; }
.brand-subtitle { font-weight: 400; color: #ccc; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; }

/* FOOTER */
footer {
    margin-top: auto; padding: 40px 20px; text-align: center;
    border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px;
    background: #050505;
}

/* BUTTONS */
.btn {
    padding: 10px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; border: none; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; transition: all 0.3s ease; white-space: nowrap;
}
.btn-primary { background: linear-gradient(90deg, #302b63 0%, #24243e 100%); background-color: var(--primary); color: white; box-shadow: 0 4px 15px rgba(82, 54, 206, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(82, 54, 206, 0.6); background-color: var(--primary-hover); }
.btn-outline { border: 1px solid rgba(255,255,255,0.2); color: white; background: transparent; }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.05); }
.btn-danger { background: rgba(255,71,87,0.15); color: #ff4757; }
.btn-gold { background: rgba(255, 215, 0, 0.1); color: var(--gold); border: 1px solid rgba(255, 215, 0, 0.3); }
.btn-gold:hover { background: rgba(255, 215, 0, 0.2); box-shadow: 0 0 15px rgba(255,215,0,0.2); }

/* HERO */
.hero { text-align: center; padding: 100px 20px 80px; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; background: linear-gradient(180deg, #fff, #999); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-img {
    max-width: 180px; width: 100%; height: auto; margin-bottom: 25px;
    filter: drop-shadow(0 10px 30px rgba(82, 54, 206, 0.4));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

/* FEATURES */
.features-section { padding: 40px 20px; max-width: 1200px; margin: 0 auto; width: 100%; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); padding: 30px; border-radius: 20px; text-align: center; transition: 0.3s; }
.feature-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-5px); }
.feature-icon { font-size: 40px; margin-bottom: 20px; display: block; }
.feature-card h3 { margin: 0 0 10px; font-size: 1.2rem; color: white; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; line-height: 1.5; }

/* SLIDER */
.slider-container { width: 100%; overflow: hidden; position: relative; padding: 20px 0; margin-bottom: 40px; }
.slider-container.masked { mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.slider-container.no-mask { mask-image: none; }
.slider-track { display: flex; gap: 20px; width: max-content; }
.slider-track.animated { animation: scroll 40s linear infinite; }
.slider-track.static { justify-content: flex-start; width: 100%; flex-wrap: wrap; } 
.slide-card { width: 260px; flex-shrink: 0; background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.05), #1a1a1a); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.slide-card:hover { border-color: var(--gold); background: #222; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.slider-track:hover { animation-play-state: paused; }

/* GRID */
.container { max-width: 1240px; margin: 0 auto; padding: 40px 20px; width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; transition: 0.3s; }
.card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.3); background: #1a1a1a; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #222; flex-shrink: 0; }
.card-title { font-weight: 700; font-size: 1rem; color: white; margin-bottom: 2px; }
.card-cat { font-size: 0.75rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; }
.card-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; flex-grow: 1; line-height: 1.4; }

/* CABINET & OTHER */
.cabinet-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.form-box { background: var(--card); padding: 30px; border-radius: 20px; border: 1px solid var(--border); }
.mini-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 15px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.channel-page-card { background: var(--card); border: 1px solid var(--border); border-radius: 30px; padding: 50px; max-width: 800px; margin: 0 auto; text-align: center; }
.channel-big-logo { width: 140px; height: 140px; object-fit: cover; border-radius: 40px; margin: 0 auto 25px; display: block; background: #222; }
.auth-container { max-width: 400px; margin: 80px auto; }
.auth-box { background: var(--card); padding: 40px; border-radius: 20px; border: 1px solid var(--border); text-align: center; }

/* FORMS */
.type-selector { display: flex; gap: 10px; margin-bottom: 20px; }
.type-option { flex: 1; padding: 10px; text-align: center; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; color: var(--text-muted); font-size: 14px; }
.type-option:hover { background: rgba(255,255,255,0.05); }
.type-option.checked { background: var(--primary); color: white; border-color: var(--primary); }
.type-option input { display: none; }

.badge { font-size: 10px; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; white-space: nowrap; }
.badge-pending { color: orange; border: 1px solid orange; }
.badge-approved { color: #2ecc71; border: 1px solid #2ecc71; }
.badge-rejected { color: #e74c3c; border: 1px solid #e74c3c; }

/* АДМИНКА */
.tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.tab-link { padding: 10px 20px; border-radius: 8px 8px 0 0; color: var(--text-muted); cursor: pointer; text-decoration: none; border: 1px solid transparent; border-bottom: none; transition: 0.2s; }
.tab-link:hover { color: white; background: rgba(255,255,255,0.05); }
.tab-link.active { background: var(--card); color: var(--primary); border-color: var(--border); font-weight: bold; border-bottom: 1px solid var(--card); margin-bottom: -11px; z-index: 2; }
.notify-badge { background: #ff4757; color: white; border-radius: 50%; padding: 2px 6px; font-size: 10px; margin-left: 5px; vertical-align: top; }
.admin-row { display: grid; grid-template-columns: 50px 1fr 1fr 120px; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; position: relative; }
.admin-actions { display: flex; gap: 5px; flex-direction: column; }
.notify-dot { position: absolute; top: 10px; left: 10px; width: 12px; height: 12px; background: #ff4757; border-radius: 50%; box-shadow: 0 0 10px #ff4757; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }

/* INPUTS */
input, select, textarea { width: 100%; background: #000; border: 1px solid #333; padding: 14px; border-radius: 12px; color: white; margin-bottom: 15px; font-size: 14px; }
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
.search-wrapper { max-width: 600px; margin: 0 auto 40px; }
.filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-tag { padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,0.05); color: var(--text-muted); font-size: 13px; border: 1px solid transparent; cursor: pointer; }
.filter-tag:hover, .filter-tag.active { background: var(--primary); color: white; }
.pagination { text-align: center; margin-top: 40px; }

/* НОВОЕ: Скрытые категории */
.cat-hidden { display: none; }
.btn-more-cats {
    background: none; border: 1px dashed rgba(255,255,255,0.2); color: var(--text-muted);
    border-radius: 20px; padding: 6px 14px; font-size: 13px; cursor: pointer; transition: 0.2s;
}
.btn-more-cats:hover { color: white; border-color: white; }

@media(max-width: 900px){
    .features-grid { grid-template-columns: 1fr; }
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 2rem; margin-bottom: 15px; }
    .hero .btn { width: 100%; margin-bottom: 10px; }
    .hero > div { flex-direction: column; gap: 10px; }
    .cabinet-layout { grid-template-columns: 1fr; gap: 20px; }
    .form-box { padding: 20px; }
    .mini-card { flex-direction: column; text-align: center; gap: 15px; }
    .mini-card > div { flex-direction: column; }
    input, select, textarea { padding: 16px; font-size: 16px; } 
    .grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
    .slide-card { width: 220px; }
    .admin-row { grid-template-columns: 1fr; text-align: center; }
    .admin-row img { margin: 0 auto; }
    .admin-actions { flex-direction: row; justify-content: center; margin-top: 10px; }
}