/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f0f;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

/* ============================================
   THEME SYSTEM - DEFAULT & HU TAO MODE
   ============================================ */
:root {
    /* 🌿 DEFAULT THEME (Simple/Minimal) */
    --primary: #fff;
    --secondary: #e5e5e5;
    --glow: #4ade80;
    --soft: #4ade80;
    --accent: #0a2f1f;
    --focus-ring: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-hover: rgba(0, 0, 0, 0.3);
    --button-bg: #fff;
    --button-color: #000;
    --button-hover: #e5e5e5;
}

/* 🔥 HU TAO MODE */
body.hu-tao-mode {
    --primary: #8B1A1A;
    --secondary: #5C0F0F;
    --glow: #F97316;
    --soft: #F4A6B8;
    --accent: #2a0f0f;
    --focus-ring: rgba(139, 26, 26, 0.25);
    --shadow: rgba(139, 26, 26, 0.4);
    --shadow-hover: rgba(249, 115, 22, 0.6);
    --button-bg: linear-gradient(135deg, #8B1A1A, #5C0F0F);
    --button-color: #fff;
    --button-hover: linear-gradient(135deg, #5C0F0F, #8B1A1A);
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    font-size: 14px;
}

/* ============================================
   LAYOUT & SECTIONS
   ============================================ */
.main-layout {
    display: block;
    margin-bottom: 20px;
}

.section {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   TAB SYSTEM
   ============================================ */
.tab-navigation {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #2a2a2a;
    background: #141414;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 18px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #777;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #fff;
    background: #1a1a1a;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORM INPUTS
   ============================================ */
.input-wrapper {
    margin-bottom: 16px;
}

/* URL input group with left controls */
.url-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 24px;
}

.url-input-group input[type="text"] {
    flex: 1;
    min-width: 0; /* Penting biar input bisa shrink */
    padding: 14px 18px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.url-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: #141414;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.url-input-group input[type="text"]::placeholder {
    color: #555;
}

.copy-inline-btn {
    width: 50px;
    height: 50px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-inline-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

body.hu-tao-mode .copy-inline-btn:hover {
    border-color: var(--primary);
}

.copy-inline-btn .icon {
    display: block;
}

.refresh-inline-btn {
    width: 50px;
    height: 50px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refresh-inline-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

body.hu-tao-mode .refresh-inline-btn:hover {
    border-color: var(--primary);
}

.refresh-inline-btn .icon {
    display: block;
}

.row-stepper {
    display: inline-flex;
    align-items: center;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    height: 50px;
    flex-shrink: 0;
}

.row-stepper .step-btn {
    width: 38px;
    height: 100%;
    background: #1a1a1a;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-stepper .step-btn:hover {
    background: #2a2a2a;
    color: var(--primary);
}

.hu-tao-mode .row-stepper .step-btn:hover {
    background: #2a2a2a;
    color: var(--soft);
}

.row-stepper input {
    width: 70px;
    height: 100%;
    border: none;
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    padding: 0 8px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

@media (max-width: 768px) {
    .url-input-group {
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 10px;
    }
    .row-stepper {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
    .url-input-group input[type="text"] {
        grid-column: 1 / -1;
    }
    .copy-inline-btn,
    .refresh-inline-btn {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .url-input-group {
        gap: 8px;
    }
    .row-stepper {
        height: 46px;
    }
    .row-stepper .step-btn {
        width: 36px;
        font-size: 16px;
    }
    .row-stepper input {
        width: 60px;
        font-size: 13px;
    }
    .copy-inline-btn,
    .refresh-inline-btn {
        width: 46px;
        height: 46px;
    }
}

input, textarea {
    width: 100%;
    padding: 16px 20px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #141414;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

input::placeholder, textarea::placeholder {
    color: #555;
}

textarea {
    min-height: 120px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
}

/* ============================================
   BUTTONS (THEME SUPPORT!)
   ============================================ */
.button-primary {
    width: 100%;
    padding: 18px 24px;
    background: var(--button-bg);
    color: var(--button-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    text-transform: none;
    letter-spacing: 0.3px;
}

.button-primary:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

body.hu-tao-mode .button-primary:hover {
    box-shadow: 0 0 20px var(--shadow-hover);
}

.button-primary:active {
    transform: translateY(0);
}

.button-primary.disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-primary.loading {
    background: #4a4a4a;
    color: #fff;
    cursor: wait;
    box-shadow: none;
}

.button-secondary {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.button-secondary:hover {
    background: #252525;
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

/* ============================================
   BULK ACTION BUTTONS
   ============================================ */
.bulk-action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.bulk-action-buttons .button-primary,
.bulk-action-buttons .button-secondary {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-action-buttons .button-primary {
    flex: 1;
}

.bulk-action-buttons .button-secondary {
    flex: 0 0 140px;
}

/* ============================================
   KEYWORD GRID
   ============================================ */
.keywords-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.keyword-btn {
    padding: 16px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.keyword-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
    transform: scale(1.02);
}

.keyword-btn:active {
    transform: scale(0.98);
}

.keyword-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   ALERTS & PROGRESS
   ============================================ */
.alert {
    display: none;
    background: var(--accent);
    border: 1px solid #4a1f1f;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    border-left: 4px solid var(--primary);
}

.alert.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.error {
    background: #2a0f0f;
    border-color: #4a1f1f;
    border-left-color: #ef4444;
}

.alert.warning {
    background: #2a2a0f;
    border-color: #4a4a1f;
    border-left-color: #f59e0b;
}

.progress-bar {
    display: none;
    width: 100%;
    height: 6px;
    background: #0f0f0f;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #2a2a2a;
    position: relative;
}

.progress-bar.show {
    display: block;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

body.hu-tao-mode .progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--glow));
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   FILTER BUTTONS (THEME SUPPORT)
   ============================================ */
.filter-btn {
    padding: 12px 20px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow);
}

body.hu-tao-mode .filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 12px var(--shadow);
}

.filter-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   BULK RESULTS GRID (THEME SUPPORT)
   ============================================ */
.bulk-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.bulk-result-item {
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bulk-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #2a2a2a;
    transition: all 0.3s;
}

.bulk-result-item.status-active::before {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}

body.hu-tao-mode .bulk-result-item.status-active::before {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px var(--shadow);
}

.bulk-result-item.status-inactive::before {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.bulk-result-item.status-error::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.bulk-result-item:hover {
    border-color: #3a3a3a;
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.bulk-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.bulk-result-url {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s;
}

.bulk-result-url:hover {
    color: #4ade80;
    text-decoration: underline;
}

body.hu-tao-mode .bulk-result-url:hover {
    color: var(--soft);
}

.bulk-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.bulk-status-badge.active {
    background: linear-gradient(135deg, #0a2f1f, #064e3b);
    color: #22c55e;
    border: 1px solid #16a34a;
}

body.hu-tao-mode .bulk-status-badge.active {
    background: linear-gradient(135deg, var(--accent), #3a1f1f);
    color: var(--soft);
    border: 1px solid var(--primary);
}

.bulk-status-badge.inactive {
    background: linear-gradient(135deg, #2a0f0f, #7f1d1d);
    color: #ef4444;
    border: 1px solid #dc2626;
}

.bulk-status-badge.error {
    background: linear-gradient(135deg, #2a1f0f, #78350f);
    color: #f59e0b;
    border: 1px solid #d97706;
}

.bulk-result-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.bulk-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.bulk-meta-item .label {
    color: #777;
    font-weight: 600;
}

.bulk-meta-item .value {
    color: #4ade80;
    font-weight: 600;
}

body.hu-tao-mode .bulk-meta-item .value {
    color: var(--soft);
}

/* ============================================
   HU TAO ASSISTANT
   ============================================ */
.hutao-box {
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    font-size: 14px;
    min-height: 100px;
    color: #ddd;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.hutao-box:hover {
    background: linear-gradient(135deg, #141414, #1f1f1f);
    border-color: #3a3a3a;
    transform: scale(1.01);
    box-shadow: 0 8px 24px var(--shadow);
}

body.hu-tao-mode .hutao-box:hover {
    border-color: var(--primary);
}

.hutao-box:active {
    transform: scale(0.99);
}

.hutao-emoji {
    font-size: 64px;
    margin-right: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hutao-text {
    flex: 1;
    text-align: left;
    font-size: 15px;
    line-height: 1.6;
}

.hutao-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.hutao-action-btn {
    padding: 12px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hutao-action-btn:hover {
    background: #1f1f1f;
    border-color: #3a3a3a;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow);
}

body.hu-tao-mode .hutao-action-btn:hover {
    border-color: var(--primary);
}

.hutao-action-btn .emoji {
    font-size: 24px;
}

body.hu-tao-mode .hutao-stat-item .value {
    color: var(--soft);
}

.hutao-stat-item .label {
    font-size: 11px;
    color: #777;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   RESULTS & SCAN HISTORY
   ============================================ */
.result {
    display: none;
    margin-top: 20px;
}

.result.show {
    display: block;
}

.result-header {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.danger {
    background: #2a0f0f;
    border: 1px solid #4a1f1f;
}

body.hu-tao-mode .danger {
    background: linear-gradient(135deg, var(--accent), #1f0a0a);
}

.safe {
    background: #0a2f1f;
    border: 1px solid #1a4f3f;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.stat small {
    color: #777;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat strong {
    font-size: 28px;
    display: block;
    margin-top: 8px;
    color: #4ade80;
}

body.hu-tao-mode .stat strong {
    color: var(--soft);
}

.finding {
    background: #2a0f0f;
    border: 1px solid #4a1f1f;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

body.hu-tao-mode .finding {
    background: var(--accent);
}

.finding b {
    color: #ff4444;
}

.snippet {
    background: #0f0f0f;
    border-left: 3px solid #ff4444;
    padding: 10px;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #aaa;
    overflow-x: auto;
}

mark {
    background: #ff4444;
    color: #fff;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Scan History Styles */
.scan-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.scan-history-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.stat-card.safe-stat {
    border-left: 3px solid #22c55e;
}

body.hu-tao-mode .stat-card.safe-stat {
    border-left: 3px solid var(--primary);
}

.stat-card.danger-stat {
    border-left: 3px solid #ef4444;
}

.stat-card.total-stat {
    border-left: 3px solid #f59e0b;
}

body.hu-tao-mode .stat-card.danger-stat {
    border-left: 3px solid var(--primary);
}

.stat-card.total-stat {
    border-left: 3px solid #f59e0b;
}

.stat-icon {
    font-size: 32px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-item {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #2a2a2a;
    transition: all 0.3s;
}

.history-item.safe::before {
    background: linear-gradient(180deg, #22c55e, #16a34a);
}

body.hu-tao-mode .history-item.safe::before {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.history-item.danger::before {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

body.hu-tao-mode .history-item.danger::before {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
}

.history-item:hover {
    border-color: #3a3a3a;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}

.history-url {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
    line-height: 1.4;
}

.history-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.history-status.safe {
    background: linear-gradient(135deg, #0a2f1f, #064e3b);
    color: #22c55e;
    border: 1px solid #16a34a;
}

body.hu-tao-mode .history-status.safe {
    background: linear-gradient(135deg, var(--accent), #3a1f1f);
    color: var(--soft);
    border: 1px solid var(--primary);
}

.history-status.danger {
    background: linear-gradient(135deg, #2a0f0f, #7f1d1d);
    color: #ef4444;
    border: 1px solid #dc2626;
}

body.hu-tao-mode .history-status.danger {
    background: linear-gradient(135deg, var(--accent), #3a1f1f);
    color: var(--soft);
    border: 1px solid var(--primary);
}

.history-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.history-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #aaa;
}

.history-meta-item .icon {
    font-size: 14px;
    opacity: 0.8;
}

.history-meta-item .value {
    color: #fff;
    font-weight: 600;
}

.history-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #2a0f0f, #3a1f1f);
    border: 1px solid #4a1f1f;
    border-radius: 8px;
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 600;
}

body.hu-tao-mode .keyword-tag {
    background: linear-gradient(135deg, var(--accent), #4a1f1f);
    border-color: var(--primary);
    color: var(--soft);
}

.history-actions {
    display: flex;
    gap: 8px;
}

.history-action-btn {
    flex: 1;
    padding: 10px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.history-action-btn:hover {
    background: #1f1f1f;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.history-action-btn:active {
    transform: translateY(0);
}

/* ============================================
   HISTORY ACTION BUTTONS - IMPROVED
   ============================================ */
.history-actions {
    display: flex;
    gap: 8px;
}

.history-action-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.history-action-btn:hover {
    background: linear-gradient(135deg, #1f1f1f, #2a2a2a);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.history-action-btn:active {
    transform: translateY(0);
}

.history-action-btn.delete-btn:hover {
    background: linear-gradient(135deg, #2a0f0f, #3a1f1f);
    border-color: #ef4444;
    color: #ef4444;
}

body.hu-tao-mode .history-action-btn.delete-btn:hover {
    background: linear-gradient(135deg, var(--accent), #3a1f1f);
    border-color: var(--primary);
    color: var(--soft);
}

.history-action-btn.save-btn {
    background: linear-gradient(135deg, #0a2f1f, #064e3b);
    border-color: #16a34a;
    color: #22c55e;
}

body.hu-tao-mode .history-action-btn.save-btn {
    background: linear-gradient(135deg, var(--accent), #1a4f3f);
    border-color: var(--primary);
    color: var(--soft);
}

.history-action-btn.save-btn:hover {
    background: linear-gradient(135deg, #064e3b, #0a2f1f);
    box-shadow: 0 4px 12px var(--shadow);
}

body.hu-tao-mode .history-action-btn.save-btn:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.history-action-btn.cancel-btn:hover {
    background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
    border-color: #555;
}

/* ============================================
   THEME TOGGLE SWITCH - SAKLAR STYLE 🎨
   ============================================ */
.theme-toggle-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid #2a2a2a;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

.theme-toggle-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0,0,0,0.6);
}

body.hu-tao-mode .theme-toggle-container {
    background: linear-gradient(135deg, var(--accent), #1a0a0a);
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--shadow);
}

body.hu-tao-mode .theme-toggle-container:hover {
    box-shadow: 0 6px 30px var(--shadow-hover);
}

.theme-label {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    transition: color 0.3s;
    user-select: none;
}

.theme-label.active {
    color: #fff;
}

body.hu-tao-mode .theme-label.active {
    color: var(--soft);
}

/* SAKLAR SWITCH */
.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #0f0f0f;
    border: 2px solid #2a2a2a;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.theme-switch:hover {
    border-color: #3a3a3a;
}

body.hu-tao-mode .theme-switch {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--glow);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 15px var(--shadow);
}

/* KNOB (TOMBOL GESER) */
.theme-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fff, #e5e5e5);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

body.hu-tao-mode .theme-knob {
    left: 32px;
    background: linear-gradient(135deg, var(--soft), #fff);
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.theme-knob::before {
    content: '🌿';
    transition: all 0.3s;
}

body.hu-tao-mode .theme-knob::before {
    content: '👻';
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .theme-toggle-container {
        top: 16px;
        right: 16px;
        padding: 10px 16px;
        gap: 10px;
    }
    
    .theme-label {
        font-size: 11px;
    }
    
    .theme-switch {
        width: 50px;
        height: 26px;
    }
    
    .theme-knob {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    body.hu-tao-mode .theme-knob {
        left: 26px;
    }
}

/* ============================================
   FILTER SECTION
   ============================================ */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.empty-state .emoji {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .title {
    font-size: 18px;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
}

.empty-state .description {
    font-size: 14px;
    color: #666;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .section {
        padding: 16px;
    }

    .tab-btn {
        padding: 14px 16px;
        font-size: 13px;
    }

    .keywords-grid {
        grid-template-columns: 1fr;
    }

    .bulk-results-grid {
        grid-template-columns: 1fr;
    }

    .scan-history-list {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .hutao-box {
        flex-direction: column;
        text-align: center;
    }

    .hutao-emoji {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .hutao-text {
        text-align: center;
    }

    .hutao-actions {
        grid-template-columns: 1fr;
    }

    .bulk-action-buttons {
        flex-direction: column;
    }

    .bulk-action-buttons .button-secondary {
        flex: 1;
    }

    .theme-toggle-container {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
    }

    .theme-icon {
        font-size: 24px;
    }
}

/* ============================================
   SCROLLBAR STYLING (THEME SUPPORT)
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 10px;
    border: 2px solid #0f0f0f;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

body.hu-tao-mode::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

body.hu-tao-mode::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.05) 50%, 
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============================================
   TOOLTIP (OPTIONAL ENHANCEMENT)
   ============================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .theme-toggle-container,
    .button-primary,
    .button-secondary,
    .tab-navigation {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
