/* ═══════════════════════════════════════════════════
   DARK CYBERPUNK THEME — FADILL AI CREATOR STUDIO
   ═══════════════════════════════════════════════════ */
:root {
    --bg: #0a0c14;
    --bg-sidebar: #080a10;
    --bg-card: rgba(14,16,24,0.85);
    --bg-card-hover: rgba(20,24,36,0.9);
    --border: rgba(99,102,241,0.12);
    --border-glow: rgba(34,211,238,0.25);
    --cyan: #22d3ee;
    --cyan-dim: rgba(34,211,238,0.15);
    --cyan-glow: rgba(34,211,238,0.06);
    --green: #10b981;
    --green-dim: rgba(16,185,129,0.15);
    --red: #f43f5e;
    --red-dim: rgba(244,63,94,0.15);
    --amber: #f59e0b;
    --amber-dim: rgba(245,158,11,0.15);
    --purple: #8b5cf6;
    --purple-dim: rgba(139,92,246,0.15);
    --blue: #3b82f6;
    --blue-dim: rgba(59,130,246,0.15);
    --text: #e2e8f0;
    --text-dim: #64748b;
    --text-muted: #475569;
    --sidebar-w: 220px;
    --topbar-h: 60px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ═══ CUSTOM CURSOR ═══ */
.custom-cursor {
    pointer-events: none;
    position: fixed;
    z-index: 99999;
    transform: translate(-50%, -50%);
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(34,211,238,0.5));
    transition: transform 0.15s;
    user-select: none;
}
.custom-cursor.hover { transform: translate(-50%, -50%) scale(1.4); }

/* ═══ ANIMATED GRADIENT ═══ */
@keyframes gradShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(135deg, #111 0%, #222 25%, #333 50%, #222 75%, #111 100%);
    background-size: 400% 400%;
    animation: gradShift 8s ease infinite;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 100;
    overflow-y: auto;
}
.sb-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
}
.sb-logo h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #eee;
}
.sb-logo h1 span { color: #aaa; }
.sb-logo p { font-size: 11px; color: #666; margin-top: 2px; }
.sb-nav { flex: 1; padding: 8px 0; }
.sb-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    padding: 12px 20px 6px;
    font-weight: 700;
}
.sb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #999;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.sb-item:hover, .sb-item.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-left-color: #ccc;
}
.sb-item svg { width: 18px; height: 18px; min-width: 18px; }

.sb-group { margin-top: 2px; }
.sb-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--transition);
    user-select: none;
}
.sb-group-header:hover { color: #ccc; }
.sb-chevron {
    width: 13px; height: 13px; min-width: 13px;
    transition: transform var(--transition);
}
.sb-group.open .sb-chevron { transform: rotate(180deg); }
.sb-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.sb-group.open .sb-group-items { max-height: 400px; }

.sb-bottom {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 11px;
    color: #666;
}
.sb-bottom span { color: #ccc; }

/* ═══ MAIN ═══ */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ═══ TOPBAR ═══ */
.topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,12,20,0.7);
    backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.topbar-title em { font-style: italic; color: var(--cyan); }
.topbar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-dim);
    transition: all var(--transition);
}
.topbar-back:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-dim);
}
.topbar-back svg { width: 16px; height: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-stats { display: flex; gap: 32px; }
.topbar-stat { text-align: center; }
.topbar-stat .val {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--cyan);
}
.topbar-stat .lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
}
.topbar-user .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff;
}

/* ═══ CONTENT ═══ */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}
.card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 600;
}

/* ═══ STAT CARDS ═══ */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { text-align: center; padding: 20px 16px; }
.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin: 0 auto 10px;
}
.stat-icon.c1 { background: var(--cyan-dim); color: var(--cyan); }
.stat-icon.c2 { background: var(--green-dim); color: var(--green); }
.stat-icon.c3 { background: var(--amber-dim); color: var(--amber); }
.stat-icon.c4 { background: var(--blue-dim); color: var(--blue); }
.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--mono);
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text);
}
.stat-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ═══ SECTION LABEL ═══ */
.section-label {
    margin: 32px 0 16px;
    padding: 0 4px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.section-label span { color: var(--cyan); }

/* ═══ TOOL GRID ═══ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.tool-card {
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}
.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--cyan);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.tool-card .card-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
}
.tool-card h6 {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--text);
}
.tool-card p {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin: 0;
}
.badge-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge-tag.live { background: var(--green-dim); color: var(--green); }
.badge-tag.new { background: var(--cyan-dim); color: var(--cyan); }

/* ═══ SEARCH ═══ */
.search-wrap {
    position: relative;
    margin-bottom: 20px;
}
.search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    transition: all var(--transition);
}
.search-wrap input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap svg {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px; height: 16px;
}

/* ═══ PLAYER BAR ═══ */
.player-bar {
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.player-bar .player-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #555, #888);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
}
.player-bar .player-info { flex: 1; }
.player-bar .player-info h6 { font-size: 0.8rem; font-weight: 600; margin: 0; }
.player-bar .player-info small { font-size: 0.7rem; color: var(--text-dim); }
.player-bar .player-controls { display: flex; gap: 8px; align-items: center; }
.player-bar .player-controls button {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    color: var(--text-dim);
}
.player-bar .player-controls button:hover {
    border-color: #aaa;
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.player-bar .player-controls button.play-btn {
    background: linear-gradient(135deg, #555, #888);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
}
.player-bar .player-controls button.play-btn:hover { transform: scale(1.05); }
.player-bar progress {
    flex: 1; height: 4px;
    border: none; border-radius: 2px;
    appearance: none;
    background: rgba(255,255,255,0.06);
}
.player-bar progress::-webkit-progress-bar { background: rgba(255,255,255,0.06); border-radius: 2px; }
.player-bar progress::-webkit-progress-value { background: linear-gradient(90deg, #555, #aaa); border-radius: 2px; }
.player-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-family: var(--mono);
    min-width: 80px;
    text-align: right;
}

/* ═══ PROGRESS BAR ═══ */
.progress-wrap { margin-top: 16px; }
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.progress-label span:last-child { color: var(--cyan); font-weight: 600; font-family: var(--mono); }
.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transition: width 1s ease;
}

/* ═══ FOOTER ═══ */
.footer-bar {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}
.footer-bar span { color: var(--cyan); }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp 0.6s ease both; }
.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.2s; }
.anim-d3 { animation-delay: 0.3s; }
.anim-d4 { animation-delay: 0.4s; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .sidebar { display: none; }
    .content { padding: 16px; overflow-y: auto; height: calc(100vh - var(--topbar-h)); }
    .topbar-stats { gap: 16px; }
}
@media (max-width: 768px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar-title { font-size: 14px; }
    .topbar-stats { display: none; }
}
@media (max-width: 480px) {
    .stat-row { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 16px; }
    .content { padding: 12px; }
}

/* ═══ SHARED TOOL-PAGE COMPONENTS (mixing-checklist, music-visualizer,
   content-calendar, link-hub, qr-generator, dst) ═══ */
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.hero-card .eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan);
    margin-bottom: 8px;
    font-weight: 700;
}
.hero-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.hero-card p { font-size: 0.85rem; color: var(--text-dim); }
.hero-actions { display: flex; gap: 10px; }

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h3 { font-size: 0.95rem; font-weight: 700; }

.pill {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--cyan-dim);
    color: var(--cyan);
    white-space: nowrap;
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-row input,
.form-row select,
.form-row textarea {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
}
.form-row textarea { resize: vertical; font-family: var(--font); }
input[type=file] { color: var(--text-dim); font-size: 0.8rem; }
input[type=date] { color-scheme: dark; }

.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-dim); }

.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--purple)); border: none; color: #fff; }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(34,211,238,0.25); }

.history-item { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.history-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 0.85rem; }
.history-top span { color: var(--text-muted); font-size: 0.7rem; font-family: var(--mono); }
.history-item p { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 4px; }
.history-item small { color: var(--text-muted); font-size: 0.72rem; }

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.link-card p { font-size: 0.75rem; color: var(--text-dim); margin: 8px 0 14px; word-break: break-all; }

canvas { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255,255,255,0.02); }

/* ═══ GLOBAL MINI PLAYER (persisten lintas halaman) ═══ */
body.has-gplayer .content { padding-bottom: 84px; }
.gplayer {
    position: fixed;
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    height: 56px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    background: rgba(10,10,10,0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.gp-btn {
    width: 34px; height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #aaa;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.gp-btn:hover { background: #aaa; color: #111; }
.gp-info { flex: 1; min-width: 0; }
.gp-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gp-progress { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.gp-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #555, #aaa); }
.gp-volume { width: 80px; accent-color: #888; }
@media (max-width: 1024px) { .gplayer { left: 0; } }
