:root {
    color-scheme: light;
    --bg-popup: #ffffff;
    --bg-alt-popup: #f8fafc;
    --fg-popup: #334155;
    --fg-dim-popup: #64748b;
    --line-popup: #e2e8f0;
    --accent: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8fafc; color: #334155; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }

/* --- HEADER & NAVIGASI LAMA --- */
header { background: #ffffff; padding: 15px 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #f1f5f9; }
header h1 { margin: 0; display: flex; align-items: center; }
header img { height: auto; width: auto; max-height: 45px; max-width: 250px; object-fit: contain; }
header nav a { margin-left: 24px; text-decoration: none; color: #475569; font-weight: 600; transition: color 0.2s; }
header nav a:hover { color: #2563eb; }
header nav .btn-download { background: #10b981; color: white; padding: 8px 18px; border-radius: 20px; margin-left: 20px; transition: 0.2s; }
header nav .btn-download:hover { background: #059669; color: white; }

.menu-toggle-btn { display: none; background: none; border: none; font-size: 26px; color: #334155; cursor: pointer; padding: 5px; }
.mobile-menu { display: none; flex-direction: column; position: absolute; top: 70px; right: 20px; width: 220px; background: #ffffff; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; overflow: hidden; z-index: 101; }
.mobile-menu.show-menu { display: flex; }
.mobile-menu a { padding: 15px 20px; text-decoration: none; color: #475569; font-weight: 600; border-bottom: 1px solid #f1f5f9; }
.mobile-menu a:hover { background: #f8fafc; color: #2563eb; }
.mobile-menu .btn-download-mobile { background: #10b981; color: white; text-align: center; }

/* --- KONTEN UTAMA HALAMAN DEPAN --- */
.landing { display: flex; flex-direction: column; min-height: 100vh; }
.landing[hidden] { display: none !important; }
main.landing-content { flex-grow: 1; display: flex; flex-direction: column; align-items: center; padding: 70px 20px 50px; text-align: center; }
h1.hero-title { font-size: 40px; color: #0f172a; margin-bottom: 16px; font-weight: 800; letter-spacing: -0.5px; }
p.hero-subtitle { font-size: 18px; color: #64748b; margin-bottom: 45px; max-width: 600px; line-height: 1.6; }

/* --- KOTAK PENCARIAN HALAMAN DEPAN --- */
.search-island { display: flex; align-items: center; padding: 8px 12px; border-radius: 50px; background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 10px 25px rgba(37,99,235,0.1); width: 100%; max-width: 680px; gap: 10px; position: relative; transition: all 0.3s ease; }
.search-island:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.engine-trigger { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f1f5f9; cursor: pointer; transition: background 0.2s; flex-shrink: 0; border: 1px solid #e2e8f0; }
.engine-trigger:hover { background: #e2e8f0; }
.engine-trigger img { width: 22px; height: 22px; border-radius: 50%; }

.engine-menu { position: absolute; top: 65px; left: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 15px; background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-10px); opacity: 0; pointer-events: none; transition: 0.2s ease; z-index: 50; }
.engine-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.engine-menu div { display: flex; align-items: center; gap: 10px; padding: 8px 15px; border-radius: 10px; cursor: pointer; transition: 0.2s; color: #334155; font-size: 14px; font-weight: 500; }
.engine-menu div:hover { background: #f1f5f9; color: #2563eb; }
.engine-menu img { width: 20px; height: 20px; border-radius: 50%; }

input[type="text"] { flex-grow: 1; background: transparent; border: none; outline: none; color: #334155; font-size: 16px; padding: 10px 5px; }
input[type="text"]::placeholder { color: #94a3b8; }
.btn-submit { background: #2563eb; color: white; border: none; padding: 15px 35px; font-size: 16px; font-weight: bold; border-radius: 30px; cursor: pointer; transition: 0.2s; letter-spacing: 0.5px; }
.btn-submit:hover { background: #1d4ed8; }

/* --- PINTASAN & ARTIKEL --- */
.shortcut-wrapper { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.shortcut-label { font-size: 13px; color: #64748b; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.shortcut-container { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.shortcut-container button { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.shortcut-container button:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(37,99,235,0.15); border-color: #2563eb; }
.shortcut-container img { width: 24px; height: 24px; border-radius: 4px; }

/* --- FITUR KARTU (FEATURES GRID) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 950px;
    width: 100%;
    margin-top: 60px;
    padding: 0 10px;
}

.feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 25px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.08);
    border-color: #cbd5e1;
}

.feature-icon {
    font-size: 38px;
    margin-bottom: 15px;
    background: #f8fafc;
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
}

.feature-card h3 {
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.seo-article { margin-top: 60px; max-width: 950px; background: #ffffff; padding: 45px; border-radius: 16px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); border: 1px solid #f1f5f9; text-align: left; }
.seo-article h3 { color: #0f172a; margin-bottom: 16px; margin-top: 30px; font-size: 22px; font-weight: 700; }
.seo-article h3:first-child { margin-top: 0; }
.seo-article p, .seo-article ul { color: #475569; font-size: 16px; line-height: 1.8; margin-bottom: 18px; }
.seo-article ul { margin-left: 20px; margin-bottom: 20px; }

footer { background: #ffffff; text-align: center; padding: 30px; font-size: 14px; color: #94a3b8; border-top: 1px solid #f1f5f9; width: 100%; margin-top: auto; }
footer a { color: #64748b; text-decoration: none; margin: 0 12px; transition: color 0.2s; }
footer a:hover { color: #2563eb; }

/* --- TOOLBAR PROXY (Ditampilkan saat proxy berjalan) --- */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.toolbar[hidden] { display: none !important; }
.toolbar__left { display: flex; gap: 4px; flex-shrink: 0; }
.toolbar button { background: transparent; border: none; color: #475569; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: 0.2s; font-weight: bold; }
.toolbar button:hover { background: #f1f5f9; color: #2563eb; }
.toolbar button:disabled { opacity: 0.4; cursor: not-allowed; }

.omnibox { flex: 1; min-width: 0; }
.input-group { display: flex; flex-grow: 1; align-items: center; background: #f8fafc; border-radius: 30px; border: 1px solid #cbd5e1; padding: 2px 2px 2px 15px; }
.input-group input { width: 100%; font-size: 13px; background: transparent; border: none; outline: none; padding: 8px 0; }
.input-group button.btn-submit { background: #2563eb; color: white; border: none; padding: 6px 16px; border-radius: 30px; font-size: 12px; font-weight: bold; cursor: pointer; height: auto; width: auto; margin-left: 10px; }

/* --- KONTROL IFRAME & SCRAMJET --- */
.frames { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.frames[hidden] { display: none !important; }
.frames.active { min-height: calc(100vh - 50px); } /* 50px untuk tinggi toolbar */
.frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: none; background: #ffffff; }
.frame--active { display: block; }

p.status { position: fixed; bottom: 10px; left: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 5px 10px; border-radius: 5px; z-index: 100002; font-size: 12px; margin: 0; }
p.status[hidden] { display: none !important; }

/* --- MENU POPUP SETTINGS --- */
.menu { position: fixed; top: 55px; right: 10px; display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--bg-popup); border: 1px solid var(--line-popup); border-radius: 10px; z-index: 100003; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.menu[hidden] { display: none !important; }
.menu button { padding: 8px 15px; border: none; background: transparent; color: var(--fg-popup); cursor: pointer; text-align: left; font-weight: 500; font-size: 14px; border-radius: 5px; }
.menu button:hover { background: var(--bg-alt-popup); color: var(--accent); }

.popup { position: fixed; inset: 0; z-index: 100005; display: grid; place-items: center; padding: 18px; background: rgb(0 0 0 / 0.4); backdrop-filter: blur(4px); }
.popup[hidden] { display: none !important; }
.popup__panel { width: min(48rem, 100%); height: min(42rem, calc(100vh - 36px)); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line-popup); background: var(--bg-popup); box-shadow: 0 20px 60px rgb(0 0 0 / 0.15); border-radius: 12px; overflow: hidden; color: var(--fg-popup); }
.popup__header { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 10px 15px; border-bottom: 1px solid var(--line-popup); background: var(--bg-alt-popup); font-weight: 700; color: var(--fg-popup); }
.popup__header button { background: #ef4444; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; width: auto; height: auto; }
.popup__frame { width: 100%; height: 100%; border: 0; background: var(--bg-popup); }

@media (max-width: 640px) {
    header img { max-height: 32px; max-width: 180px; }
    header nav { display: none; }
    h1.hero-title { font-size: 30px; }
    .menu-toggle-btn { display: block; }
    .search-island { border-radius: 20px; flex-wrap: wrap; }
    .btn-submit { width: 100%; border-radius: 12px; padding: 15px; }
    .seo-article { padding: 30px 20px; margin-top: 50px; }
    
    .toolbar { padding: 4px; gap: 4px; }
    .toolbar button { width: 30px; height: 30px; font-size: 14px; }
    .input-group { padding-left: 10px; }
    .input-group input { font-size: 12px; }
    .input-group button.btn-submit { padding: 6px 12px; font-size: 11px; margin-left: 5px; }
}