/* =============================================
   Bahasa Lorem Generator — styles.css
   Dark mode with Red-White Indonesia palette
   ============================================= */

:root {
    --bg: #1a0a0a;
    --surface: #2a1010;
    --surface-2: #341515;
    --border: #4a1f1f;
    --text: #dfe6e9;
    --muted: #8e8e8e;
    --red: #e74c3c;
    --red-h: #c0392b;
    --white: #ffffff;
    --accent: #fdcb6e;
    --green: #55efc4;
    --radius: 8px;
    --radius-sm: 5px;
    --hdr-h: 52px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}

/* ── Header ── */
.header {
    height: var(--hdr-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-flag {
    font-size: 1.6rem;
}

.logo-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--red);
}

.logo-sub {
    font-size: 0.68rem;
    color: var(--muted);
}

/* ── Layout ── */
.layout {
    display: flex;
    height: calc(100vh - var(--hdr-h));
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sect {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sect-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.type-tabs {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.type-tabs.mini {
    flex-direction: row;
}

.type-tab {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-family: inherit;
    font-size: 0.76rem;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.18s;
}

.type-tab.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 600;
}

.type-tab:hover:not(.active) {
    border-color: var(--red);
    color: var(--text);
}

.type-tabs.mini .type-tab {
    flex: 1;
    text-align: center;
    padding: 5px 4px;
}

.number-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.num-btn {
    width: 28px;
    height: 28px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.num-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.num-input {
    width: 52px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 4px;
    outline: none;
}

.num-input:focus {
    border-color: var(--red);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    cursor: pointer;
}

.check-row input {
    accent-color: var(--red);
    cursor: pointer;
}

.btn-generate {
    margin-top: 4px;
    background: var(--red);
    border: none;
    border-radius: var(--radius);
    padding: 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.18s;
}

.btn-generate:hover {
    background: var(--red-h);
}

.export-row {
    display: flex;
    gap: 8px;
}

.btn-export {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px;
    font-family: inherit;
    font-size: 0.74rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s;
}

.btn-export:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Output ── */
.output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.output-header {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    gap: 10px;
}

.output-meta {
    flex: 1;
    font-size: 0.72rem;
    color: var(--muted);
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s;
}

.btn-copy:hover {
    border-color: var(--red);
    color: var(--red);
}

.output-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.output-placeholder span {
    font-size: 2.5rem;
}

.output-text {
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
}

.output-text p {
    margin-bottom: 1em;
}

.output-text h2 {
    color: var(--red);
    margin-bottom: 0.5em;
    font-size: 1rem;
}

.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.output-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.card-value {
    font-size: 0.82rem;
    color: var(--text);
}

.card-value.accent {
    color: var(--accent);
}

.code-output {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    background: #0d0304;
    border-radius: var(--radius);
    padding: 14px;
    overflow-x: auto;
    color: var(--green);
    line-height: 1.6;
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.78rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}