/* --------------------------------------------------------------
   AJENG MEDIA TOOLS — tema publik
   Gaya visual mengikuti buananet.com: dasar gelap, kartu abu,
   aksen oranye #f60, tipografi Roboto, lebar konten terkunci.
   -------------------------------------------------------------- */

:root {
    --bg: #292929;
    --panel: #404040;
    --panel-2: #2c2c2c;
    --panel-3: #222;
    --panel-4: #1f1f1f;
    --terminal: #121212;
    --line: #424242;
    --accent: #f60;
    --accent-soft: #ff9533;
    --text: #fff;
    --text-2: #e0e0e0;
    --muted: #b0b0b0;
    --link: #eee;
    --blue: #6495ed;
    --teal: #80cbc4;
    --danger: #ef5350;
    --success: #22c55e;
    --radius: 5px;
    --shadow: 0 6px 20px rgba(0, 0, 0, .5);
    --nav-bg: #ffffff;
    --nav-text: #31363a;
    --font: Roboto, "Helvetica Neue", Arial, sans-serif;
    --wrap-max: 940px;
    --btn-radius: 5px;
    --card-cols: 2;
    --card-cols-t: 2;
    --card-cols-m: 1;
    --hero-min: 0px;
}

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text-2);
    font: 400 16px/1.7 var(--font);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

/* ---------- A11y & touch ---------- */

.skip-link {
    position: absolute;
    top: 0;
    left: 8px;
    z-index: 100;
    padding: 12px 16px;
    min-height: 44px;
    font-weight: 700;
    color: #1b1b1b;
    background: var(--accent);
    border-radius: var(--radius);
    transform: translateY(-120%);
    transition: transform .2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(8px);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a {
    color: var(--link);
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease-in;
}

a:hover {
    color: var(--accent);
}

pre,
code,
kbd {
    font-family: "Roboto Mono", "Courier New", Courier, monospace;
}

/* ---------- Rangka halaman ---------- */

#wrap {
    max-width: var(--wrap-max);
    min-width: 200px;
    margin: 0 auto;
    padding: 0 8px 24px;
}

.preview-banner {
    margin: 8px 0 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: #1b1b1b;
    background: var(--accent);
    border-radius: var(--radius);
}

.site-chrome.is-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
}

.hero {
    min-height: var(--hero-min);
}

.hero.is-center {
    text-align: center;
}

.logo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 10px;
    padding: 22px 25px;
    color: var(--text);
    background: linear-gradient(90deg, #1b1b1b 0%, #313131 100%);
    border-left: 6px solid var(--accent);
    border-right: 6px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.logo-mark img {
    height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.logo-name {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.2;
}

.logo-tag {
    display: block;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
}

.site-nav {
    margin: 0 auto 10px;
    padding: 4px 10px;
    background: var(--nav-bg);
    border: 2px solid var(--nav-bg);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav li.spacer {
    margin-left: auto;
}

.site-nav a,
.site-nav button {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    margin: 5px 0;
    font: 700 15px/1.4 inherit;
    color: var(--nav-text);
    background: none;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}

.site-nav a:hover,
.site-nav button:hover {
    background: var(--bg);
    color: #fff;
}

.site-nav .is-accent {
    color: var(--accent);
}

.site-nav .user {
    padding: 8px 6px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.content {
    margin: 0 auto 20px;
    padding: 20px 30px 30px;
    background: var(--panel);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    line-height: 1.7;
}

/* ---------- Tipografi ---------- */

h1 {
    margin: 0 0 10px;
    padding: 12px 16px;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -.5px;
    line-height: 1.2;
    color: var(--text);
    background: linear-gradient(90deg, rgba(13, 1, 61, 1) 0%, rgba(26, 25, 25, 1) 100%);
    border-radius: var(--radius);
}

h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--teal);
}

h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.lead {
    margin: 0 0 14px;
    font-size: 15px;
    color: var(--text-2);
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.category-meta {
    margin: 8px 0 16px;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
}

/* ---------- Blok bagian ---------- */

.section {
    margin-bottom: 26px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--panel-3);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius) var(--radius) 0 0;
}

.section-head h2,
.section-head h2 a {
    color: var(--blue);
}

.section-head h2 a:hover {
    color: var(--accent);
}

.section-head .link-all {
    font-size: 13px;
    color: var(--muted);
}

.section-body {
    padding: 12px;
    background: var(--panel-3);
    border-radius: 0 0 var(--radius) var(--radius);
}

.section-head + .section-body {
    border-top: 1px solid #333;
}

/* ---------- Daftar tool ---------- */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(var(--card-cols, 2), minmax(0, 1fr));
    gap: 10px;
}

.tool-grid.cols-3 {
    grid-template-columns: repeat(var(--card-cols, 3), minmax(0, 1fr));
}

.tool-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text);
    background: linear-gradient(90deg, rgba(51, 51, 51, 1) 38%, rgba(85, 85, 85, 1) 100%);
    border-left: 2px solid var(--accent);
    border-radius: 0 4px 4px 0;
    font-size: 14px;
}

.tool-card:hover {
    color: var(--text);
    border-left-color: var(--accent-soft);
    filter: brightness(1.12);
}

.tool-card .name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.tool-card .desc {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: #cfcfcf;
}

.tool-card .tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #1b1b1b;
    background: var(--accent);
    border-radius: 3px;
}

.tool-card .tool-cat,
.tool-card .tool-usage {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}

.tool-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.tool-card .tool-cta {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.output-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.output-card {
    padding: 10px 12px;
    background: var(--panel-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.output-value {
    font-weight: 700;
    word-break: break-word;
}

.membership-cta {
    margin: 18px 0 8px;
}

/* ---------- Badge ---------- */

.badge {
    display: inline-block;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-2);
    background: var(--panel-4);
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    white-space: nowrap;
}

.badge-free {
    color: #0f2b0f;
    background: #9ccc65;
    border-color: #9ccc65;
}

.badge-member {
    color: #0d1b2a;
    background: var(--blue);
    border-color: var(--blue);
}

.badge-pro {
    color: #241000;
    background: var(--accent);
    border-color: var(--accent);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
}

/* ---------- Panel & form ---------- */

.panel {
    padding: 15px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.panel + .panel {
    margin-top: 14px;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.field {
    margin-bottom: 12px;
}

.field label,
.field-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #999;
}

.field .req {
    color: var(--accent);
}

.field .help {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    font: 400 14px/1.5 inherit;
    color: var(--text);
    background: var(--panel-4);
    border: 1px solid #333;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s ease-in, box-shadow .2s ease-in;
}

input::placeholder,
textarea::placeholder {
    color: #8d8d8d;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 122, 0, .15);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
}

input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    box-shadow: none;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
    text-transform: none;
    letter-spacing: 0;
}

.check input {
    width: auto;
}

/* ---------- Tombol ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 9px 18px;
    font: 700 14px/1.4 inherit;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--btn-radius, var(--radius));
    cursor: pointer;
    transition: all .2s ease-in;
}

.btn:hover {
    color: var(--bg);
    background: #ccc;
    border-color: #ccc;
}

.btn-ghost {
    color: var(--text-2);
    background: var(--panel-3);
    border-color: #3a3a3a;
}

.btn-ghost:hover {
    color: #fff;
    background: #333;
    border-color: var(--accent);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* ---------- Pencarian ---------- */

.search-bar {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 15px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.search-bar input {
    flex: 1 1 auto;
}

/* ---------- Terminal / hasil ---------- */

.terminal textarea,
textarea.terminal {
    min-height: 320px;
    padding: 12px;
    font-family: "Roboto Mono", "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #ffb74d;
    background: var(--terminal);
    border: 1px solid #333;
    resize: vertical;
}

/* ---------- Notifikasi ---------- */

.alert {
    margin: 0 0 14px;
    padding: 10px 14px;
    font-size: 14px;
    background: var(--panel-2);
    border-left: 4px solid var(--accent);
    border-radius: 0 4px 4px 0;
    color: var(--text-2);
}

.alert-success {
    border-left-color: var(--success);
}

.alert-error {
    border-left-color: var(--danger);
    color: #ffcdd2;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

/* ---------- Isi teks panjang ---------- */

.prose p {
    margin: 0 0 10px;
}

.prose :last-child {
    margin-bottom: 0;
}

.feature-list {
    margin: 12px 0 0;
    padding-left: 18px;
}

.feature-list li {
    margin-bottom: 4px;
    font-size: 14px;
}

.price {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    background: var(--panel-3);
    border-radius: var(--radius);
}

.center {
    text-align: center;
}

.narrow {
    max-width: 460px;
    margin: 0 auto;
}

.divider {
    margin: 18px 0 14px;
    border: 0;
    border-top: 1px solid #4a4a4a;
}

/* ---------- Disclaimer & footer ---------- */

.disclaimer {
    margin: 0 0 16px;
    padding: 15px;
    font-size: 13px;
    color: var(--text-2);
    background: var(--panel-2);
    border-left: 6px solid var(--accent);
    border-right: 6px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.disclaimer span {
    margin-right: 6px;
    padding-right: 6px;
    font-weight: 700;
    color: var(--accent);
}

.tool-page-disclaimer {
    margin-bottom: 16px;
}

.tool-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.favorite-form {
    margin: 0;
}

.badge-muted {
    background: var(--panel-2);
    color: var(--muted);
}

.usage-step-list {
    margin: 0;
    padding-left: 1.2rem;
}

.usage-step-list li {
    margin-bottom: 8px;
}

.form-actions-sticky {
    position: sticky;
    bottom: 0;
    padding: 12px 0 4px;
    background: linear-gradient(transparent, var(--panel) 24%);
}

.preset-row {
    margin-bottom: 12px;
}

.history-row {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.history-row:last-child {
    border-bottom: 0;
}

.history-snippet {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 0;
    white-space: pre-wrap;
}

.is-hidden {
    display: none;
}

.footer {
    font-size: 13px;
    color: var(--muted);
}

.footer a {
    color: var(--accent);
}

/* ---------- Responsif ---------- */

@media screen and (max-width: 900px) {
    .tool-grid,
    .tool-grid.cols-3 {
        grid-template-columns: repeat(var(--card-cols-t, 2), minmax(0, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .content {
        padding: 15px;
    }

    h1 {
        font-size: 1.7rem;
    }

    .logo {
        justify-content: center;
        text-align: center;
        padding: 18px;
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .tool-grid,
    .tool-grid.cols-3 {
        grid-template-columns: repeat(var(--card-cols-m, 1), minmax(0, 1fr));
    }

    .site-nav ul {
        justify-content: center;
    }

    .site-nav li.spacer {
        margin-left: 0;
    }
}

@media screen and (max-width: 500px) {
    h1 {
        font-size: 1.45rem;
    }

    .logo-name {
        font-size: 21px;
    }

    .search-bar {
        flex-direction: column;
    }
}

/* ---------- Guides ---------- */

.guide-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.guide-card h2 {
    margin: 6px 0 8px;
    font-size: 1.15rem;
}

.guide-body {
    margin-top: 16px;
    line-height: 1.6;
}
