@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&display=swap');

/* ==========================================================================
   ATALOQ.COM - CORE STYLESHEET
   UI/UX: Dark Mode, Glassmorphism, Neon Accents, DM Sans Font
   ========================================================================== */

:root {
    --bg-dark: #0a0a0f;
    --panel-glass: rgba(20, 20, 25, 0.6);
    --neon-teal: #00f0ff;
    --neon-cobalt: #0047ff;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border-glass: rgba(255, 255, 255, 0.08);
}

/* Global Font & Reset (Aman untuk Dashicons WordPress) */
body.ataloq-app {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Memaksa font DM Sans HANYA di dalam area workspace kita */
.app-header *, .app-workspace * {
    font-family: 'DM Sans', sans-serif !important;
}

/* Glassmorphism Utility */
.glassmorphism {
    background: var(--panel-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 1. Header Area */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-glass);
}

.brand h1 {
    margin: 0;
    font-size: 26px;
    color: #ffffff;
    letter-spacing: 1px;
}

.text-neon-teal {
    color: var(--neon-teal);
    text-shadow: 0 0 10px var(--neon-teal);
}

.badge-freemium {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-teal);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--neon-teal);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* 2. Workspace Area (Split Screen) */
.app-workspace {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 70px);
    box-sizing: border-box;
}

/* Left: Editors */
.editors-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #121218;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    overflow: hidden;
}

.editor-header {
    background: #1a1a24;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-glass);
}

.code-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--neon-teal);
    padding: 15px;
    font-size: 14px;
    resize: none;
    outline: none;
}

/* Right: Preview & Action */
.preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-glass);
}

.preview-header {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
}

/* Wrapper untuk Canvas Preview agar rasionya terjaga */
.render-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    background: #050508;
    border-radius: 8px;
    overflow: hidden;
    border: 1px dashed var(--border-glass);
}

.render-box {
    background: #ffffff;
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    width: 100%;
    aspect-ratio: 16 / 9; /* Default Rasio Awal */
    max-height: 100%;
    transition: all 0.3s ease;
}

.system-msg {
    color: #999999;
    font-style: italic;
}

/* 3. Export Settings Panel */
.export-settings {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.setting-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.neon-select {
    width: 100%;
    background: #121218;
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neon-select:focus, .neon-select:hover {
    border-color: var(--neon-teal);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

/* Buttons & Alerts */
.action-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary-neon {
    width: 100%;
    padding: 15px;
    background: transparent;
    color: var(--neon-teal);
    border: 2px solid var(--neon-teal);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary-neon:hover {
    background: var(--neon-teal);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* Efek saat tombol disable (sedang merekam) */
.btn-primary-neon:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    background: transparent;
}

.hidden {
    display: none !important;
}

/* Recording Animation */
.system-alert.recording {
    background: rgba(255, 0, 60, 0.1);
    color: #ff003c;
    border: 1px solid #ff003c;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    animation: pulseRecord 1.5s infinite;
}

@keyframes pulseRecord {
    0% { box-shadow: 0 0 5px rgba(255, 0, 60, 0.2); }
    50% { box-shadow: 0 0 15px rgba(255, 0, 60, 0.6); }
    100% { box-shadow: 0 0 5px rgba(255, 0, 60, 0.2); }
}