:root {
    /* Dark Theme (Default) */
    --bg-primary: #0c0708;
    --bg-secondary: #151011;
    --bg-elevated: #1c1516;
    --text-primary: #ede8e8;
    --text-secondary: #ff0015;
    --accent-primary: #ff2b3d;
    --accent-secondary: #a80014;
    --accent-soft: rgba(255, 43, 61, 0.12);
    --border-color: #2e2224;
    --input-bg: #120d0e;
    --shadow-color: rgba(255, 43, 61, 0.18);
    --neon-glow: 0 0 12px rgba(255, 43, 61, 0.35);
    --ambient: radial-gradient(500px 900px at 0% 50%, rgba(255, 43, 61, 0.30), transparent 70%),
               radial-gradient(500px 900px at 100% 50%, rgba(255, 43, 61, 0.30), transparent 70%),
               radial-gradient(700px 500px at 0% 0%, rgba(255, 43, 61, 0.18), transparent 65%),
               radial-gradient(700px 500px at 100% 0%, rgba(255, 43, 61, 0.18), transparent 65%),
               radial-gradient(700px 500px at 0% 100%, rgba(168, 0, 20, 0.18), transparent 65%),
               radial-gradient(700px 500px at 100% 100%, rgba(168, 0, 20, 0.18), transparent 65%);
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] {
    --bg-primary: #f7f4f4;
    --bg-secondary: #ffffff;
    --bg-elevated: #fdfafa;
    --text-primary: #24191b;
    --text-secondary: #6d6062;
    --accent-primary: #d40018;
    --accent-secondary: #8f0010;
    --accent-soft: rgba(212, 0, 24, 0.08);
    --border-color: #ead9db;
    --input-bg: #ffffff;
    --shadow-color: rgba(212, 0, 24, 0.12);
    --neon-glow: 0 0 12px rgba(212, 0, 24, 0.22);
    --ambient: radial-gradient(500px 900px at 0% 50%, rgba(212, 0, 24, 0.18), transparent 70%),
               radial-gradient(500px 900px at 100% 50%, rgba(212, 0, 24, 0.18), transparent 70%),
               radial-gradient(700px 500px at 0% 0%, rgba(212, 0, 24, 0.10), transparent 65%),
               radial-gradient(700px 500px at 100% 0%, rgba(212, 0, 24, 0.10), transparent 65%),
               radial-gradient(700px 500px at 0% 100%, rgba(212, 0, 24, 0.10), transparent 65%),
               radial-gradient(700px 500px at 100% 100%, rgba(212, 0, 24, 0.10), transparent 65%);
    --card-shadow: 0 20px 50px rgba(90, 0, 10, 0.10);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-primary);
    background-image: var(--ambient);
    background-attachment: fixed;
    color: var(--text-primary);
    padding: 40px 20px 60px;
    min-height: 100vh;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 38px;
    right: 38px;
    z-index: 1000;
}

.theme-toggle-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, color 0.3s;
}

.theme-toggle-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.theme-toggle-btn:hover {
    transform: scale(1.15);
    color: var(--accent-primary);
}

[data-theme="dark"] .light-icon {
    display: none;
}

[data-theme="light"] .dark-icon {
    display: none;
}

.container {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    background-color: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    /* Garis merah vertikal di sisi kiri & kanan kartu */
    background-image:
        linear-gradient(180deg, transparent, var(--accent-primary) 25%, var(--accent-secondary) 75%, transparent),
        linear-gradient(180deg, transparent, var(--accent-primary) 25%, var(--accent-secondary) 75%, transparent);
    background-size: 2px 100%, 2px 100%;
    background-position: left top, right top;
    background-repeat: no-repeat;
    padding: 40px;
    border-radius: 18px;
    box-shadow: var(--card-shadow), 0 0 0 1px var(--border-color), 0 0 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Garis merah tipis di sisi atas & bawah kartu */
.container::before,
.container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
}

.container::before {
    top: 0;
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

.container::after {
    bottom: 0;
    opacity: 0.6;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}

/* Siku merah di empat sudut halaman */
.corner {
    position: fixed;
    width: 90px;
    height: 90px;
    border-color: var(--accent-primary);
    border-style: solid;
    border-width: 0;
    opacity: 0.55;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 0 8px var(--shadow-color));
}

.corner-tl {
    top: 18px;
    left: 18px;
    border-top-width: 2px;
    border-left-width: 2px;
    border-top-left-radius: 14px;
}

.corner-tr {
    top: 18px;
    right: 18px;
    border-top-width: 2px;
    border-right-width: 2px;
    border-top-right-radius: 14px;
}

.corner-bl {
    bottom: 18px;
    left: 18px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-bottom-left-radius: 14px;
}

.corner-br {
    bottom: 18px;
    right: 18px;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-bottom-right-radius: 14px;
}

@media (max-width: 700px) {
    .corner {
        width: 46px;
        height: 46px;
        opacity: 0.4;
    }
}

/* Brand / Logo */
.brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 38px;
    padding-bottom: 28px;
}

/* Pemisah gradasi merah di bawah brand */
.brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Cincin gradasi berputar di sekeliling logo */
.brand-logo-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.brand-logo-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, var(--accent-primary) 90deg, transparent 200deg, var(--accent-secondary) 300deg, transparent 360deg);
    animation: spin 6s linear infinite;
    opacity: 0.85;
}

.brand-logo-wrap::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-secondary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.brand-logo {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--bg-primary);
    padding: 8px;
    box-shadow: 0 0 30px var(--shadow-color);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}

.brand-logo-wrap:hover .brand-logo {
    transform: scale(1.06);
    box-shadow: 0 0 50px var(--shadow-color);
}

.brand h1 {
    margin-bottom: 0;
}

.brand-tagline {
    color: var(--text-secondary);
    font-size: 0.78em;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 500;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.6em;
    letter-spacing: 3px;
    font-weight: 800;
    background: linear-gradient(180deg, #fff 0%, var(--accent-primary) 55%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 14px var(--shadow-color));
}

[data-theme="light"] h1 {
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 0.95em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Penanda merah kecil di depan tiap judul section */
h2::before {
    content: '';
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 8px var(--shadow-color);
}

.form-group {
    position: relative;
    margin-bottom: 18px;
    background: var(--bg-elevated);
    padding: 22px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

/* Kilau merah lembut yang muncul saat kursor di atas kartu */
.form-group::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-soft), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.form-group:hover::before {
    opacity: 1;
}

.form-group:hover {
    border-color: rgba(255, 43, 61, 0.35);
    box-shadow: 0 0 0 1px var(--accent-soft);
    transform: translateY(-2px);
}

/* Section muncul bergantian saat halaman dibuka */
.form-group,
form > button[type="submit"] {
    animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.form-group:nth-of-type(1) { animation-delay: 0.10s; }
.form-group:nth-of-type(2) { animation-delay: 0.18s; }
.form-group:nth-of-type(3) { animation-delay: 0.26s; }
.form-group:nth-of-type(4) { animation-delay: 0.34s; }
form > button[type="submit"] { animation-delay: 0.42s; }

/* Isi section harus di atas lapisan kilau */
.form-group > * {
    position: relative;
    z-index: 1;
}

/* Section dengan dropdown terbuka diangkat, biar list-nya tidak tertutup section bawahnya */
.form-group:has(.icon-select-wrapper.open) {
    z-index: 50;
}

.form-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-soft), 0 10px 30px var(--shadow-color);
}

/* Radio Buttons */
input[type="radio"] {
    accent-color: var(--accent-primary);
    margin-right: 8px;
}

label {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    margin: 0 8px 12px 0;
    padding: 7px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88em;
    transition: all 0.25s;
}

label:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

label:has(input:checked) {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
    color: var(--accent-primary);
}

/* Input Fields */
input[type="text"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Custom Select dengan Ikon SVG */
.icon-select-wrapper {
    position: relative;
}

/* Select asli disembunyikan, tetap dipakai sebagai sumber value */
.icon-select-wrapper select.icon-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    border: none;
}

.is-trigger {
    width: 100%;
    padding: 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.3s;
}

.is-trigger:hover {
    border-color: var(--accent-primary);
}

.icon-select-wrapper.open .is-trigger {
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.is-label {
    flex: 1;
}

.is-caret {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.icon-select-wrapper.open .is-caret {
    transform: rotate(180deg);
}

.is-icon {
    display: flex;
    flex-shrink: 0;
}

.is-icon svg {
    width: 18px;
    height: 18px;
}

.is-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    list-style: none;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
    display: none;
}

.icon-select-wrapper.open .is-options {
    display: block;
    animation: dropIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.is-option {
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background-color 0.15s, color 0.15s;
}

.is-option:hover {
    background: var(--accent-primary);
    color: #fff;
}

.is-option.selected {
    color: var(--accent-primary);
    font-weight: 600;
}

.is-option.selected:hover {
    color: #fff;
}

/* Warna khas per jenis status */
.is-icon.icon-storm { color: #b388ff; }
.is-icon.icon-online { color: #1db954; }
.is-icon.icon-wrench { color: #ff9800; }
.is-icon.icon-none { color: var(--text-secondary); }

.is-option:hover .is-icon { color: #fff; }

textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.7;
    font-family: 'Cairo', monospace;
}

/* Submit Button */
button[type="submit"] {
    position: relative;
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 8px 24px var(--shadow-color);
    font-family: 'Cairo', sans-serif;
    overflow: hidden;
}

/* Kilau yang menyapu saat hover */
button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

button[type="submit"]:hover:not(:disabled)::after {
    left: 120%;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-color), 0 0 24px var(--shadow-color);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    box-shadow: var(--neon-glow);
    font-family: 'Cairo', sans-serif;
}

.notification.success {
    background: linear-gradient(45deg, #1db954, #0d8a3c);
}

.notification.warning {
    background: linear-gradient(45deg, #ff9800, #e65100);
}

.notification.error {
    background: linear-gradient(45deg, #ff4444, #cc0000);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 999px;
    border: 3px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Terminal Log */
.terminal {
    margin-top: 26px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #0a0708;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
    animation: riseIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    background: #141011;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
    flex: 1;
    font-size: 0.72em;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-family: ui-monospace, 'Consolas', monospace;
    text-transform: lowercase;
}

.terminal-clear {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.68em;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all 0.25s;
}

.terminal-clear:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.terminal-body {
    height: 190px;
    overflow-y: auto;
    padding: 12px 14px;
    font-family: ui-monospace, 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.75;
}

.log-line {
    display: flex;
    gap: 10px;
    word-break: break-word;
    animation: logIn 0.2s ease-out;
}

@keyframes logIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.log-time {
    color: #5a4f50;
    flex-shrink: 0;
}

.log-msg {
    flex: 1;
}

.log-info    .log-msg { color: #9fb4c7; }
.log-success .log-msg { color: #45d97a; }
.log-warn    .log-msg { color: #ffb340; }
.log-error   .log-msg { color: #ff5f6d; }
.log-muted   .log-msg { color: #6b5f60; }

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #33272a;
    border: 2px solid #0a0708;
}

/* Hormati preferensi pengguna yang tidak suka animasi */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsif */
@media (max-width: 600px) {
    body {
        padding: 24px 14px 40px;
    }

    .container {
        padding: 26px 20px;
        border-radius: 14px;
    }

    h1 {
        font-size: 2em;
    }

    .brand-logo {
        width: 76px;
        height: 76px;
    }
} 