* { 
    font-family: 'Inter', system-ui, sans-serif; 
    max-width: 100%;
    box-sizing: border-box;
}
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

/* Aksen cyan elektrik #00e0ff */
.bg-cyan-500 { background-color: #00e0ff; }
.text-cyan-500 { color: #00e0ff; }
.border-cyan-500 { border-color: #00e0ff; }
.bg-cyan-500\/20 { background-color: rgba(0, 224, 255, 0.2); }

body { background-color: #0b0f1a; color: #e2e8f0; }
.card-nexus { background: rgba(18, 28, 48, 0.8); backdrop-filter: blur(4px); border: 1px solid #1e2d4a; }
.bg-deep-space { background-color: #0a0f1c; }
.bg-card-space { background-color: #111b30; }
.text-dim { color: #9babc5; }

/* ── LOGO ────────────────────────────────── */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-fallback {
    width: 40px; height: 40px;
    min-width: 40px; min-height: 40px;
    background: linear-gradient(135deg, #00e0ff, #7c3aed);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(0,224,255,0.5);
    flex-shrink: 0;
}

.logo-footer-fallback {
    width: 32px; height: 32px;
    min-width: 32px; min-height: 32px;
    background: linear-gradient(135deg, #00e0ff, #7c3aed);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0,224,255,0.4);
    flex-shrink: 0;
}

.logo-image {
    width: auto; height: 40px; max-width: 40px;
    object-fit: contain; display: block;
}

.logo-footer-image {
    width: auto; height: 32px; max-width: 32px;
    object-fit: contain; display: block;
}

/* ── PROGRESS BAR ────────────────────────── */
progress {
    width: 100%; height: 20px;
    border-radius: 10px; overflow: hidden;
    background-color: #1e2d4a; border: none;
}
progress::-webkit-progress-bar  { background-color: #1e2d4a; }
progress::-webkit-progress-value {
    background: linear-gradient(90deg, #00e0ff, #7c3aed);
    transition: width 0.2s ease;
}
progress::-moz-progress-bar { background: linear-gradient(90deg, #00e0ff, #7c3aed); }

/* ── BUTTONS ─────────────────────────────── */
.btn-nexus {
    background-color: #00e0ff;
    color: #0a0f1c;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 9999px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(0,224,255,0.3);
    text-decoration: none;
    display: inline-block;
}
.btn-nexus:hover {
    background-color: #7c3aed;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -5px rgba(124,58,237,0.4);
}
.btn-nexus:disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: #4b5563;
    box-shadow: none;
}

.btn-danger-nexus {
    background-color: #dc2626;
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 9999px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(220,38,38,0.3);
}
.btn-danger-nexus:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -5px rgba(220,38,38,0.4);
}

/* ── FILE INPUT ──────────────────────────── */
.file-input-nexus {
    width: 100%;
    padding: 12px;
    background: #111b30;
    border: 1px dashed #00e0ff;
    border-radius: 12px;
    color: #9babc5;
    cursor: pointer;
}
.file-input-nexus::-webkit-file-upload-button {
    background: #00e0ff;
    color: #0a0f1c;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    margin-right: 16px;
    cursor: pointer;
}

/* ── FORMAT CARD ─────────────────────────── */
.format-card {
    background: #111b30;
    border: 1px solid #1e2d4a;
    border-radius: 16px;
    padding: 16px;
}

/* ── RIWAYAT ITEM ────────────────────────── */
.deleted-item {
    background: rgba(220,38,38,0.1);
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

/* ── TOAST ───────────────────────────────── */
.toast-nexus {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #111b30;
    border-left: 4px solid #00e0ff;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,224,255,0.2);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    max-width: calc(100vw - 40px);
}

/* ────────────────────────────────────────────────────────────────
   EFFECTS PANEL — Web Audio API effect chain controls
   ──────────────────────────────────────────────────────────────── */

.effects-panel {
    background: linear-gradient(135deg, rgba(0,224,255,0.04) 0%, rgba(124,58,237,0.06) 100%);
    border: 1px solid rgba(0,224,255,0.25);
    border-radius: 20px;
    overflow: hidden;
}

/* ────────────────────────────────────────────────────────────────
   PREVIEW PANEL — Real-time Audio Preview dengan Web Audio API
   ──────────────────────────────────────────────────────────────── */
.preview-panel {
    background: linear-gradient(145deg, rgba(0,224,255,0.03) 0%, rgba(124,58,237,0.05) 100%);
    border: 1px solid rgba(0,224,255,0.2);
    border-radius: 20px;
    margin-top: 20px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,224,255,0.1);
    background: rgba(0,0,0,0.2);
}

.preview-badge {
    background: rgba(124,58,237,0.2);
    color: #7c3aed;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(124,58,237,0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.preview-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4b5563;
    transition: background 0.3s;
}

.preview-status-dot.playing {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 1.5s infinite;
}

.preview-status-dot.loading {
    background: #f59e0b;
    animation: pulse 1s infinite;
}

.preview-status-dot.error {
    background: #ef4444;
}

.preview-status-text {
    color: #9babc5;
}

.preview-body {
    padding: 20px;
}

.preview-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.preview-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.preview-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.preview-btn-play {
    background: linear-gradient(90deg, #00e0ff, #7c3aed);
    color: white;
    box-shadow: 0 5px 15px rgba(0,224,255,0.3);
}

.preview-btn-play:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124,58,237,0.4);
}

.preview-btn-stop {
    background: #1e2d4a;
    color: #9babc5;
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-btn-stop:hover:not(:disabled) {
    background: #2a3d5e;
    color: white;
}

.preview-waveform {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(0,224,255,0.1);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#waveformCanvas {
    width: 100%;
    height: 44px;
    border-radius: 8px;
}

.preview-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9babc5;
    background: rgba(0,0,0,0.2);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}

.preview-warning {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 640px) {
    .preview-badge { display: none; }
    .preview-controls { flex-direction: column; }
}

/* Header bisa diklik untuk accordion */
.effects-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid rgba(0,224,255,0.1);
    transition: background 0.2s;
}
.effects-panel-header:hover {
    background: rgba(0,224,255,0.05);
}

/* Badge label "Web Audio API" */
.effects-badge {
    background: rgba(0,224,255,0.15);
    color: #00e0ff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,224,255,0.3);
    text-transform: uppercase;
}

/* Accordion body — collapsed by default, .open class untuk expand */
.effects-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    padding: 0 20px;
}
.effects-body.open {
    max-height: 1000px;
    padding: 16px 20px;
}

/* Setiap baris efek */
.effect-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.effect-row:last-child { border-bottom: none; }

/* Baris efek dengan toggle di kanan */
.effect-row-toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* Sub-row (indented, untuk LFO speed) */
.effect-subrow {
    background: rgba(0,224,255,0.04);
    border-radius: 10px;
    padding: 10px 14px !important;
    margin: -4px 0 4px 0;
    border-bottom: none !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Label baris efek */
.effect-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #c4d0e8;
}

/* Tag nama Web Audio API Node */
.effect-node-tag {
    font-size: 0.65rem;
    font-weight: 600;
    color: #7c3aed;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.3);
    padding: 1px 7px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    margin-left: 4px;
}

/* Wrapper slider + value */
.effect-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Slider styling */
.effect-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(to right, #00e0ff 0%, #7c3aed 100%);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    min-width: 0;
}
.effect-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #00e0ff;
    box-shadow: 0 0 8px rgba(0,224,255,0.6);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 2px solid #0a0f1c;
}
.effect-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 14px rgba(0,224,255,0.8);
}
.effect-slider::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #00e0ff;
    box-shadow: 0 0 8px rgba(0,224,255,0.6);
    cursor: pointer;
    border: 2px solid #0a0f1c;
}

/* Nilai slider (teks di kanan) */
.effect-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #00e0ff;
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Label "Slowed / Normal / Chipmunk" di bawah slider kecepatan */
.rate-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #5a6a85;
    padding: 0 2px;
}

/* Toggle Switch (8D Audio) */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-track {
    width: 48px; height: 26px;
    background: #1e2d4a;
    border-radius: 999px;
    border: 1px solid #2a3d5e;
    transition: background 0.3s, border-color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
}
.toggle-thumb {
    position: absolute;
    left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #4b5563;
    transition: left 0.3s, background 0.3s, box-shadow 0.3s;
}
.toggle-switch input:checked + .toggle-track {
    background: rgba(0,224,255,0.25);
    border-color: #00e0ff;
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
    left: 25px;
    background: #00e0ff;
    box-shadow: 0 0 10px rgba(0,224,255,0.7);
}

/* Info chain */
.effect-chain-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #5a6a85;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    line-height: 1.5;
}

/* Tombol Reset */
.reset-effects-btn {
    width: 100%;
    margin-top: 12px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #9babc5;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.reset-effects-btn:hover {
    color: #00e0ff;
    border-color: #00e0ff;
}

/* ── ABOUT SECTION GRID ───────────────────── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.tech-card {
    background: rgba(0,224,255,0.05);
    border: 1px solid rgba(0,224,255,0.15);
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: border-color 0.2s, transform 0.2s;
}
.tech-card:hover {
    border-color: rgba(0,224,255,0.4);
    transform: translateY(-4px);
}

/* ── FLOATING DONASI ─────────────────────── */
.floating-donasi {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    animation: float 3s ease-in-out infinite;
}
.donasi-button {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #00e0ff, #7c3aed);
    color: white;
    padding: 12px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0,224,255,0.4);
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
}
.donasi-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 20px 35px rgba(124,58,237,0.5);
    border-color: white;
}
.donasi-button i { font-size: 1.2rem; }
.donasi-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.donasi-text-main  { font-size: 0.95rem; font-weight: 600; }
.donasi-text-small { font-size: 0.65rem; opacity: 0.9; font-weight: 400; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 640px) {
    .floating-donasi { bottom: 20px; right: 15px; }
    .donasi-button   { padding: 10px 18px; gap: 8px; }
    .donasi-button i { font-size: 1rem; }
    .donasi-text-main  { font-size: 0.85rem; }
    .donasi-text-small { font-size: 0.6rem; }
    .effect-node-tag { display: none; } /* Hemat ruang di mobile */
    .effects-badge   { display: none; }
}

.flex-shrink-0 { flex-shrink: 0; }
