/* ===== RESET & VARIABLES ===== */
:root {
    --bg: #0b0b12;
    --bg-card: #13131e;
    --bg-elevated: #1a1a2a;
    --border: #28283a;
    --border-hover: #3a3a52;
    --text: #e8e8f0;
    --text-secondary: #8a8aaa;
    --text-muted: #5a5a72;
    --accent: #f5b400;
    --accent-dim: rgba(245, 180, 0, 0.12);
    --success: #4ade80;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.25s ease;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --font: 'Segoe UI', system-ui, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* ===== HEADER ===== */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.header .logo-icon {
    width: 32px;
    height: 32px;
    stroke: var(--accent);
}
.header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #f5b400, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header .version {
    font-size: 11px;
    color: #5a5a72;
    background: #1a1a2a;
    padding: 2px 12px;
    border-radius: 20px;
    border: 1px solid #2a2a44;
}
.header .header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.subtitle {
    color: #7a7a92;
    font-size: 13px;
    margin-bottom: 22px;
    padding-left: 2px;
}

/* ===== TOMBOL KEMBALI ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-back:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--border-hover);
}
.btn-back i {
    width: 18px;
    height: 18px;
}

/* ===== CARD ===== */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.input-row {
    display: flex;
    gap: 12px;
}
.input-row input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color var(--transition);
}
.input-row input:focus {
    border-color: var(--accent);
}
.input-row input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    min-height: 48px;
    min-width: 120px;
}
.btn-primary {
    background: linear-gradient(135deg, #f5b400, #d49a00);
    color: #0b0b12;
}
.btn-primary:hover:not(:disabled) {
    background: #ffcc00;
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(245, 180, 0, 0.25);
}
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}
.btn-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ===== LOADING ===== */
.loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 0;
    color: var(--text-secondary);
}
.loading.show {
    display: flex;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ERROR ===== */
.error {
    display: none;
    padding: 14px 18px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 14px;
    margin-top: 12px;
}
.error.show {
    display: block;
}

/* ===== RESULT ===== */
.result {
    display: none;
    margin-top: 20px;
}
.result.show {
    display: block;
}

.summary {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}
.summary .ip-addr {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}
.summary .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.summary .chip {
    padding: 4px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.summary .chip.accent {
    border-color: var(--accent);
    color: var(--accent);
}
.summary .map-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.summary .map-link:hover {
    text-decoration: underline;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title i {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.field {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.field-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.field-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .container {
        padding: 18px 14px;
    }
    .input-row {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        min-width: unset;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 20px;
    }
    .header .header-actions {
        margin-left: 0;
        width: 100%;
    }
    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}