:root {
    --accent: #a3ff33;
    --accent-dark: #8edb2b;
    --bg-dark: #050a08;
    --card-bg: #0d1411;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-wrapper {
    padding: 60px 20px;
    background-color: var(--bg-dark);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.text-accent { color: var(--accent); }

.tool-subtitle {
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Mode Switcher */
.mode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.mode-switch {
    background: #141c18;
    padding: 6px;
    border-radius: 100px;
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-color);
}

.mode-btn {
    padding: 10px 24px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.mode-btn.active {
    background: var(--accent);
    color: #000;
    box-shadow: 0 4px 12px rgba(163, 255, 51, 0.2);
}

/* Workspace Card */
.workspace-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    min-height: 480px; /* Tinggi minimum box */
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
}

/* States - KUNCI UTAMA CENTERING */
.state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Pusatkan secara vertikal */
    flex-grow: 1; /* Mengisi seluruh ruang kosong dalam card */
    width: 100%;
    text-align: center;
}

.state.active { 
    display: flex; 
    animation: fadeIn 0.5s ease; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dropzone Center */
.dropzone {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.dropzone:hover {
    border-color: var(--accent);
    background: rgba(163, 255, 51, 0.02);
}

/* Preview Area */
.preview-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 30px 0;
    width: 100%;
}

.preview-item {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #1a231f;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* Loader Center */
.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ai-loader-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.ai-loader {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(163, 255, 51, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Results */
.result-scroll-area {
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.result-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-box img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary-neon {
    background: var(--accent);
    color: #000;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-outline {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 14px 32px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    cursor: pointer;
}

/* Privacy Text */
.tool-footer-info {
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .workspace-card { padding: 24px; min-height: 400px; }
    .result-row { flex-direction: column; gap: 20px; }
    .button-group { flex-direction: column; width: 100%; }
    .btn-primary-neon, .btn-outline { width: 100%; justify-content: center; }
}