:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(139, 92, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #4f46e5;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: #8b5cf6;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 100px) scale(1.2); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

header h1 span {
    color: var(--primary);
    text-shadow: 0 0 20px var(--accent-glow);
}

header p {
    color: var(--text-dim);
    margin-top: 8px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--accent-glow);
}

.tab-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tab-pane.hidden {
    display: none;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    padding-left: 4px;
}

input, textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

textarea {
    height: 150px;
    resize: none;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary.loading .btn-text {
    opacity: 0;
}

.loader-ring {
    display: none;
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

.btn-primary.loading .loader-ring {
    display: block;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* Status & Progress */
.status-box {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.progress-wrapper {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6);
    transition: width 0.3s ease-out;
}

.console-log {
    background: #020617;
    border-radius: 12px;
    padding: 16px;
    height: 200px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-entry {
    border-left: 2px solid var(--text-dim);
    padding-left: 10px;
}

.log-info { border-color: var(--primary); }
.log-success { border-color: #10b981; color: #10b981; }
.log-error { border-color: #ef4444; color: #f87171; }

.hidden { display: none; }

/* Link Sorter Results */
.sorter-results {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.result-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.result-url {
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-family: monospace;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--accent-glow);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.copy-success {
    color: #10b981 !important;
    border-color: #10b981 !important;
}

footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- INJECTOR STYLING --- */
.info-banner {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}

.info-banner h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.info-banner p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.step-guide {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.step-guide ol {
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-guide strong {
    color: var(--primary);
}

.injector-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.injector-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.injector-card:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.injector-card h4 {
    font-size: 1.1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.injector-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.injector-card textarea {
    width: 100%;
    height: 180px; /* Lebarkan kotak kode */
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 11px;
    color: #a78bfa;
    line-height: 1.6;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.injector-card .btn-primary {
    align-self: flex-start;
    padding: 10px 24px;
    font-size: 0.9rem;
}
