/* =======================================================
   HOWQ PROJECT - FEATURE MODULES STYLESHEET
   (Cleaned: Beranda, Artikel, dan Nihongo sudah dipisah)
======================================================= */

:root { 
    --primary: #4f46e5; 
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(226, 232, 240, 0.8);
    --danger: #dc2626; 
    --success: #059669;
    --warning: #f59e0b;
    --radius-lg: 20px;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --blur: blur(10px);

    /* Manajemen Z-Index */
    --z-base: 10;
    --z-content: 2;
    --z-map: 10;
    --z-navbar: 100;
    --z-loader: 9999;
}

/* --- DARK MODE THEME --- */
[data-theme="dark"] {
    --primary: #6366f1;         
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.15);
    --bg: #0f172a;              
    --surface: #1e293b;          
    --text-main: #f8fafc;        
    --text-muted: #94a3b8;   
    --border: rgba(51, 65, 85, 0.8);
    --danger: #ef4444; 
    --success: #34d399; 
    --primary-glow: rgba(99, 102, 241, 0.2);
}

/* --- RESET & BASE SETUP --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body { 
    background: var(--bg); 
    color: var(--text-main); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: clip; 
    width: 100%;
    position: relative;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #475569; }

svg { display: block; } 

/* --- GLOBAL COMPONENT: BACK BUTTON & NAVBAR --- */
.btn-back { background: var(--bg); border: 1px solid var(--border); color: var(--text-main); width: 38px; height: 38px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.btn-back:hover { background: var(--surface); transform: translateY(-1px); }


/* =======================================================
   MODUL SPEEDTEST 
======================================================= */
.page-speedtest::before { content: ''; position: fixed; top: -20%; left: 30%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }
.page-speedtest::after { content: ''; position: fixed; bottom: -20%; right: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

.navbar-speed { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: var(--z-navbar); box-shadow: 0 4px 20px rgba(0,0,0,0.02); gap: 20px; }
[data-theme="dark"] .navbar-speed { background: rgba(30, 41, 59, 0.85); }

.nav-search-speed { display: flex; flex: 1; max-width: 500px; height: 42px; }
.nav-search-speed input { flex: 1; padding: 0 18px; border: 1px solid var(--border); border-right: none; border-radius: 12px 0 0 12px; font-size: 14px; outline: none; background: var(--bg); transition: 0.3s; color: var(--text-main);}
.nav-search-speed input:focus { background: var(--surface); border-color: var(--primary); }
.nav-search-speed input.error-state { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); color: var(--danger); font-weight: 600;}
.nav-search-speed input.error-state::placeholder { color: var(--danger); opacity: 0.8;}
.search-btn-speed { background: var(--primary); color: white; border: none; padding: 0 22px; border-radius: 0 12px 12px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; min-width: 56px;}
.search-btn-speed.error-btn { background: var(--danger); }

.sp-container { flex: 1; padding: 40px 24px; max-width: 640px; margin: 0 auto; width: 100%; text-align: center; display: flex; flex-direction: column; justify-content: center;}
.sp-card { background: var(--surface); padding: 48px 32px; border-radius: 32px; border: 1px solid var(--border); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.05); margin-bottom: 24px; position: relative; overflow: hidden; }
.sp-title { font-size: 26px; font-weight: 800; color: var(--text-main); margin-bottom: 10px; letter-spacing: -0.5px;}
.sp-subtitle { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-bottom: 32px; font-weight: 500;}

.speed-ring-container { position: relative; width: 240px; height: 240px; margin: 0 auto 48px; display: flex; align-items: center; justify-content: center; flex-direction: column; border-radius: 50%; background: var(--surface); box-shadow: 0 20px 40px rgba(0,0,0,0.04), inset 0 8px 16px rgba(0,0,0,0.02); transition: box-shadow 0.5s ease; border: 1px solid var(--border); }
.speed-ring-container::after { content: ''; position: absolute; inset: -20px; border-radius: 50%; background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(79, 70, 229, 0.05) 360deg); z-index: -1; opacity: 0; transition: opacity 0.5s ease; }
.speed-ring-container.is-active::after { opacity: 1; animation: spin-bg 3s linear infinite; }
@keyframes spin-bg { 100% { transform: rotate(360deg); } }

.progress-ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05));}
.progress-ring circle { fill: transparent; stroke-width: 14; stroke-linecap: round; }
.progress-ring .track { stroke: var(--bg); }
.progress-ring .fill { stroke: var(--primary); stroke-dasharray: 660; stroke-dashoffset: 660; transition: stroke-dashoffset 0.15s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease; }

.speed-value { font-family: 'Courier New', monospace; font-size: 56px; font-weight: 800; color: var(--text-main); line-height: 1; z-index: var(--z-content); margin-top: 4px; letter-spacing: -2px;}
.speed-label { font-size: 14px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; z-index: var(--z-content); }

.speed-type { font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 50px; margin-bottom: 8px; z-index: var(--z-content); opacity: 0; transition: all 0.4s ease; transform: translateY(10px); letter-spacing: 1px; }
.state-ping { color: var(--warning); background: rgba(245, 158, 11, 0.15); }
.state-dl { color: #0ea5e9; background: rgba(14, 165, 233, 0.15); }
.state-ul { color: #8b5cf6; background: rgba(139, 92, 246, 0.15); }
.state-finish { color: var(--success); background: rgba(16, 185, 129, 0.15); }

.sp-results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.sp-result-box { background: var(--bg); border: 1px solid var(--border); padding: 20px 12px; border-radius: 20px; text-align: center; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden; }
.sp-result-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: transparent; transition: 0.4s; }
.sp-result-title { font-size: 12px; color: var(--text-muted); font-weight: 800; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.5px; }
.sp-result-value { font-family: 'Courier New', monospace; font-size: 24px; font-weight: 700; color: var(--text-main); transition: transform 0.3s;}
.sp-result-unit { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 2px;}

.box-active { background: var(--surface); border-color: transparent; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); transform: translateY(-4px); }
.box-active#box-ping::before { background: var(--warning); }
.box-active#box-dl::before { background: #0ea5e9; }
.box-active#box-ul::before { background: #8b5cf6; }
.box-active .sp-result-value { transform: scale(1.05); }

.btn-action-speed { width: 100%; background: var(--text-main); color: var(--surface); border: none; padding: 20px; border-radius: 20px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; gap: 10px; }
.btn-action-speed:hover:not(:disabled) { transform: translateY(-2px); opacity: 0.9; }
.btn-action-speed:active:not(:disabled) { transform: translateY(1px); }
.btn-action-speed:disabled { background: var(--border); cursor: not-allowed; color: var(--text-muted);}

@media (max-width: 768px) { .navbar-speed { flex-wrap: wrap; padding: 12px 16px; gap: 12px; } .nav-search-speed { order: 3; min-width: 100%; height: 44px; } }
@media (max-width: 480px) { .sp-container { padding: 24px 16px; } .sp-card { padding: 32px 20px; border-radius: 28px;} .speed-ring-container { width: 190px; height: 190px; margin: 0 auto 32px; } .speed-value { font-size: 44px; } .sp-results-grid { gap: 10px; margin-bottom: 24px;} .sp-result-box { padding: 16px 8px; border-radius: 16px; } .sp-result-value { font-size: 18px; } }

/* =======================================================
   MODUL UTILITAS JARINGAN / TOOLS 
======================================================= */
.page-tools::before { content: ''; position: fixed; top: -10%; left: 40%; width: 70vw; height: 70vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }
.page-tools::after { content: ''; position: fixed; bottom: -20%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

.tools-top-bar { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: var(--z-navbar); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
[data-theme="dark"] .tools-top-bar { background: rgba(30, 41, 59, 0.85); }

.node-status { font-size: 12px; font-weight: 800; color: var(--success); letter-spacing: 0.5px; background: rgba(16, 185, 129, 0.1); padding: 8px 16px; border-radius: 50px; border: 1px solid rgba(16, 185, 129, 0.2); display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.05); }
.status-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse-status 2s infinite;}
@keyframes pulse-status { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } 100% { opacity: 1; transform: scale(1); } }

.tools-container-main { max-width: 740px; margin: 40px auto; padding: 0 24px; display: flex; flex-direction: column; gap: 20px;}
.tools-header-text { margin-bottom: 40px; text-align: center; }
.tools-title { font-size: 30px; font-weight: 800; color: var(--text-main); letter-spacing: -0.8px; margin-bottom: 12px;}
.tools-subtitle { font-size: 15px; color: var(--text-muted); line-height: 1.6; font-weight: 500; max-width: 500px; margin: 0 auto;}

.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tool-header { padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; background: transparent; cursor: pointer; transition: 0.3s; }
.tool-header:hover { background: var(--primary-light); }
.tool-header h2 { font-size: 17px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 12px; letter-spacing: -0.3px;}
.icon-toggle { width: 22px; height: 22px; color: var(--text-muted); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

.tool-card.active { box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.1), 0 0 0 1px rgba(79, 70, 229, 0.2); transform: translateY(-2px); border-color: transparent;}
.tool-card.active .tool-header { border-bottom: 1px solid var(--border); }
.tool-card.active .icon-toggle { transform: rotate(180deg); color: var(--primary); }
.tool-content { max-height: 0; overflow: hidden; opacity: 0; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); background: var(--surface); }
.tool-card.active .tool-content { max-height: 900px; padding: 28px; opacity: 1; }

.tool-input { width: 100%; padding: 18px 24px; border: 1px solid var(--border); background: var(--bg); border-radius: 16px; font-family: inherit; font-size: 15px; font-weight: 500; transition: all 0.3s ease; color: var(--text-main); margin-bottom: 24px;}
.tool-input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.tool-input::placeholder { color: var(--text-muted); font-weight: 400; }

.badge-vip { background: var(--primary-light); color: var(--primary); font-size: 10px; padding: 4px 10px; border-radius: 8px; font-weight: 800; letter-spacing: 1px;}

.terminal-box { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; font-family: 'Courier New', monospace; font-size: 13.5px; color: var(--text-muted); min-height: 80px; white-space: pre-wrap; line-height: 1.8; border-left: 4px solid var(--border); transition: all 0.4s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.terminal-box.state-wait { border-left-color: var(--primary); color: var(--text-muted); }
.terminal-box.state-success { border-left-color: var(--success); color: var(--text-main); font-weight: 600;}
.terminal-box.state-error { border-left-color: var(--danger); color: var(--danger); font-weight: 600;}

@media (max-width: 480px) { .tools-container-main { padding: 32px 16px; } .tools-title { font-size: 24px; } .tool-header { padding: 20px; } .tool-header h2 { font-size: 15px; } .tool-card.active .tool-content { padding: 20px; } .tool-input { padding: 16px; font-size: 14px; } .terminal-box { padding: 16px; font-size: 12.5px; } }

/* =======================================================
   MODUL RADAR WILAYAH
======================================================= */
.page-radar::before { content: ''; position: fixed; top: -10%; left: 50%; transform: translateX(-50%); width: 80vw; height: 80vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

#radar-section { display: none; }
.radar-box { width: 220px; height: 220px; border-radius: 50%; margin: 0 auto 32px; background: rgba(15, 23, 42, 0.02); border: 2px solid rgba(79, 70, 229, 0.3); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 40px rgba(79, 70, 229, 0.1), 0 0 0 10px rgba(79, 70, 229, 0.05); }
[data-theme="dark"] .radar-box { background: rgba(255, 255, 255, 0.02); }

.radar-grid { position: absolute; width: 100%; height: 100%; border-radius: 50%; background-image: linear-gradient(rgba(79, 70, 229, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.15) 1px, transparent 1px); background-size: 25px 25px; background-position: center; }
.radar-grid::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60%; height: 60%; border-radius: 50%; border: 1px solid rgba(79, 70, 229, 0.2); }

.radar-sweep { 
    position: absolute; 
    top: 0; 
    left: 50%; 
    width: 50%; 
    height: 50%; 
    background: conic-gradient(from 90deg, transparent 0%, rgba(79, 70, 229, 0.1) 40%, rgba(79, 70, 229, 0.6) 90%, var(--primary) 100%); 
    transform-origin: 0% 100%; 
    border-right: 2px solid var(--primary); 
    animation: sweep 2.5s linear infinite; 
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.radar-center { width: 14px; height: 14px; background: var(--primary); border-radius: 50%; z-index: var(--z-content); box-shadow: 0 0 15px 4px rgba(79, 70, 229, 0.6); }
@keyframes sweep { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.terminal-radar { background: #0f172a; border-radius: 16px; padding: 20px; text-align: left; font-family: 'Courier New', monospace; font-size: 12.5px; color: #38bdf8; height: 160px; overflow-y: auto; position: relative; box-shadow: inset 0 4px 20px rgba(0,0,0,0.6), 0 10px 20px -5px rgba(0,0,0,0.2); border: 1px solid #1e293b; }
.terminal-radar::-webkit-scrollbar { width: 6px; }
.terminal-radar::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
.log-line { opacity: 0; animation: fadeInLog 0.4s forwards; line-height: 1.6; margin-bottom: 6px; letter-spacing: -0.2px;}
.log-time { color: #64748b; margin-right: 8px; font-size: 11px;}
.log-ok { color: #10b981; font-weight: 700; text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);}
.log-warn { color: #f59e0b; font-weight: 700; text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);}
@keyframes fadeInLog { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(5px); } }

#map-section { display: none; padding: 0; overflow: hidden; border-radius: 32px;}
.map-header { padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--bg); display: flex; justify-content: space-between; align-items: center;}
.map-title { font-size: 16px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px;}
.map-title::before { content: ''; width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success);}
.status-badge-map { font-size: 12px; font-weight: 800; background: rgba(16, 185, 129, 0.1); color: var(--success); padding: 6px 14px; border-radius: 50px; border: 1px solid rgba(16, 185, 129, 0.2); letter-spacing: 0.5px;}

#map { width: 100%; height: 360px; z-index: var(--z-map); }
.location-info { padding: 24px; font-size: 14px; color: var(--text-muted); line-height: 1.8; text-align: left; background: var(--surface);}
.location-info strong { color: var(--text-main); font-weight: 800;}

@media (max-width: 480px) { .radar-box { width: 180px; height: 180px; } .terminal-radar { font-size: 11px; height: 140px; padding: 16px;} #map { height: 280px; } }

/* =======================================================
   MODUL INFO PERANGKAT / DASHBOARD 
======================================================= */
.page-dashboard::before { content: ''; position: fixed; top: -10%; left: 40%; width: 70vw; height: 70vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

.dash-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } }

.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.02); transition: transform 0.2s ease; }
.dash-card:hover { transform: translateY(-2px); }

.dash-card-title { font-size: 14px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;}
.live-indicator { background: rgba(16, 185, 129, 0.1); color: var(--success); font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(16, 185, 129, 0.2); 
    animation: pulse-soft 2s infinite;
}
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.metric-group { margin-bottom: 20px; }
.metric-group:last-child { margin-bottom: 0; }
.metric-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
.metric-val { color: var(--primary); font-family: 'Courier New', monospace; font-weight: 700; font-size: 15px;}

.progress-track { width: 100%; height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; width: 0%; border-radius: 6px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease; }
.fill-good { background-color: var(--success); } 
.fill-warn { background-color: var(--warning); } 
.fill-bad { background-color: var(--danger); }
.fill-neutral { background-color: var(--primary); }

.data-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.data-row:last-child { border-bottom: none; padding-bottom: 0;}
.data-key { color: var(--text-muted); font-weight: 600;}
.data-value { font-weight: 700; color: var(--text-main); font-family: 'Courier New', monospace;}

.status-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: bold; margin-bottom: 16px; background: rgba(16, 185, 129, 0.1); color: var(--success); box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-text { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--text-main);}
.status-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.log-container { height: 220px; overflow-y: auto; font-family: 'Courier New', monospace; font-size: 12.5px; background: var(--bg); color: var(--text-main); border-radius: 16px; padding: 16px; border: 1px solid var(--border); box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
.log-entry { margin-bottom: 10px; padding-left: 12px; border-left: 3px solid var(--border); word-wrap: break-word; line-height: 1.5;}
.log-time { color: var(--text-muted); margin-right: 8px; font-weight: 600;}
.log-info { border-left-color: var(--primary); }
.log-success { border-left-color: var(--success); color: var(--success);}
.log-warn { border-left-color: var(--warning); color: var(--warning);}

/* =======================================================
   MODUL BERSIHKAN RUANG / CLEANER 
======================================================= */
.page-cleaner { display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; }
.page-cleaner::before { content: ''; position: fixed; top: -20%; left: -10%; width: 70vw; height: 70vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }
.page-cleaner::after { content: ''; position: fixed; bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

.cl-card-container { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); width: 90%; max-width: 420px; border-radius: 32px; border: 1px solid var(--border); padding: 48px 32px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.05); text-align: center; transition: all 0.4s ease; position: relative; overflow: hidden; }
[data-theme="dark"] .cl-card-container { background: rgba(30, 41, 59, 0.8); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.cl-card-container::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); }

.cl-icon-wrapper { width: 88px; height: 88px; background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.2) 100%); color: #0ea5e9; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 32px; box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.2), inset 0 2px 4px rgba(255,255,255,0.1); position: relative; 
    animation: floatIcon 3s ease-in-out infinite; 
    will-change: transform; 
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.cl-title { font-size: 26px; font-weight: 800; margin-bottom: 12px; color: var(--text-main); letter-spacing: -0.5px; }
.cl-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 40px; line-height: 1.6; font-weight: 500;}

.cl-btn-group { display: flex; gap: 16px; }
.cl-btn { padding: 18px; border-radius: 20px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; flex: 1; border: none; display: flex; justify-content: center; align-items: center; gap: 8px; position: relative; overflow: hidden; }
.cl-btn-cancel { background: var(--bg); color: var(--text-muted); border: 1px solid transparent;}
.cl-btn-cancel:hover { background: var(--surface); border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.05); color: var(--text-main);}
.cl-btn-primary { background: var(--text-main); color: var(--surface); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); width: 100%;}
.cl-btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 15px 25px -5px rgba(0,0,0,0.2); }
.cl-btn-primary:active { transform: translateY(1px); }

.cl-progress-area { display: none; flex-direction: column; align-items: center; padding: 20px 0; }
.cl-loader-container { position: relative; width: 80px; height: 80px; margin-bottom: 32px; }
.cl-loader-outer { position: absolute; width: 100%; height: 100%; border: 4px solid rgba(79, 70, 229, 0.1); border-top: 4px solid var(--primary); border-radius: 50%; 
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; 
}
.cl-loader-inner { position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 3px solid rgba(14, 165, 233, 0.1); border-bottom: 3px solid #0ea5e9; border-radius: 50%; 
    animation: spin-reverse 0.8s linear infinite; 
}
.cl-status-title { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 8px; letter-spacing: -0.3px;}
.cl-status-sub { font-size: 14px; color: var(--text-muted); font-weight: 500; background: var(--bg); padding: 6px 16px; border-radius: 50px; border: 1px solid var(--border);}

.cl-success-icon { width: 88px; height: 88px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%); color: var(--success); border-radius: 50%; display: none; justify-content: center; align-items: center; margin: 0 auto 32px; box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.2), inset 0 2px 4px rgba(255,255,255,0.1); animation: pop-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; }
.cl-success-icon::after { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--success); opacity: 0; animation: ripple 1.5s ease-out 0.6s infinite; }
.cl-success-title { font-size: 26px; font-weight: 800; margin-bottom: 12px; color: var(--success); }

@keyframes pop-in { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

@media (max-width: 480px) { .cl-card-container { padding: 40px 24px; border-radius: 28px;} .cl-title, .cl-success-title { font-size: 24px; } .cl-btn { padding: 16px; font-size: 15px; border-radius: 16px;} .cl-desc { font-size: 14px; } }

/* =======================================================
   MODUL VERIFIKASI SUARA / MIC 
======================================================= */
.page-voice { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: var(--bg); padding: 20px; }
.page-voice::before { content: ''; position: fixed; top: -10%; left: 30%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; filter: blur(40px); }

.voice-card { background: var(--surface); padding: 48px 40px; border-radius: 32px; text-align: center; width: 100%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.05); border: 1px solid var(--border); transition: all 0.3s ease; position: relative; overflow: hidden; }

.voice-icon-box { display: flex; justify-content: center; align-items: center; width: 80px; height: 80px; background: rgba(79, 70, 229, 0.1); color: var(--primary); border-radius: 50%; margin: 0 auto 24px; transition: all 0.3s ease; box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.2); }
.voice-icon-box.recording { 
    background: var(--primary); color: white; 
    animation: pulse-ring-voice 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite; 
}
@keyframes pulse-ring-voice { 0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(79, 70, 229, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); } }

.voice-icon-box.state-success { background: rgba(16, 185, 129, 0.1); color: var(--success); box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.2); transform: scale(1.1);}
.voice-icon-box.state-error { background: rgba(239, 68, 68, 0.1); color: var(--danger); box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.2); animation: shake 0.4s;}

.voice-title { font-size: 24px; font-weight: 800; margin: 0 0 12px 0; letter-spacing: -0.5px; color: var(--text-main); }
.voice-log { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-bottom: 32px; font-weight: 500; }

.voice-btn { background: var(--primary); color: white; border: none; padding: 18px; border-radius: 20px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; transition: all 0.3s ease; box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3); }
.voice-btn:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.4); }
.voice-btn:active:not(:disabled) { transform: translateY(1px); }
.voice-btn:disabled { background: var(--border); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

.voice-btn-back { background: transparent; color: var(--text-muted); border: 1px solid var(--border); margin-top: 12px; box-shadow: none; }
.voice-btn-back:hover { background: var(--bg); color: var(--text-main); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: transparent;}

@media (max-width: 480px) { .voice-card { padding: 40px 24px; border-radius: 28px; } .voice-title { font-size: 22px; } .voice-log { font-size: 14px; } .voice-btn { padding: 16px; font-size: 15px; border-radius: 16px; } }
