:root {
    --bg-main: #0b0c15;
    --bg-card: #151820;
    --bg-input: #0f1115;
    --accent: #5b68f6;
    --accent-hover: #4853c4;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border: #27272a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --scroll-thumb: #3f3f46;
}

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

body { background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; line-height: 1.6; }

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background: rgba(11, 12, 21, 0.8);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; }
.logo-icon { width: 35px; height: 35px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; }
.menu-btn { background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; padding: 5px; }

.sidebar-overlay { 
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; 
    opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar { 
    position: fixed; top: 0; right: 0; width: 280px; height: 100vh; 
    background: var(--bg-card); border-left: 1px solid var(--border); 
    z-index: 100; transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; 
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
}
.sidebar.active { transform: translateX(0); }

.sidebar-header { padding: 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.close-sidebar-btn { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; transition: 0.2s; }
.close-sidebar-btn:hover { color: var(--text-main); transform: rotate(90deg); }

.sidebar-links { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.sidebar-link { text-decoration: none; color: var(--text-muted); padding: 12px 15px; border-radius: 8px; display: flex; align-items: center; gap: 15px; transition: 0.2s; font-weight: 500; }
.sidebar-link:hover, .sidebar-link.active { background: var(--bg-input); color: white; border-left: 3px solid var(--accent); }
.sidebar-link i { width: 20px; text-align: center; }
.divider { height: 1px; background: var(--border); margin: 15px 0; }
.sidebar-subtitle { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; padding-left: 15px; font-weight: 700; }
.sidebar-footer { padding: 20px; text-align: center; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); background: var(--bg-input); }

.main-container { max-width: 800px; margin: 0 auto; padding: 20px; }

.hero-section { text-align: center; margin: 20px 0 30px; }
.hero-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; background: linear-gradient(to right, #fff, #9ca3af); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 20px; }

.tool-container { background: var(--bg-card); padding: 20px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }

.mode-switcher { display: flex; justify-content: center; gap: 10px; margin-bottom: 15px; background: var(--bg-input); padding: 5px; border-radius: 50px; width: fit-content; margin-left: auto; margin-right: auto; border: 1px solid var(--border); }
.mode-btn { background: transparent; border: none; color: var(--text-muted); padding: 8px 20px; border-radius: 50px; cursor: pointer; font-weight: 600; transition: 0.3s; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.mode-btn.active { background: var(--accent); color: white; box-shadow: 0 2px 10px rgba(91, 104, 246, 0.3); }
.mode-btn:hover:not(.active) { color: white; }

textarea { width: 100%; height: 120px; background: var(--bg-input); border: 1px solid var(--border); color: white; padding: 15px; border-radius: 10px; resize: none; outline: none; font-size: 1rem; transition: 0.2s; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 104, 246, 0.2); }

.controls-wrapper { margin-top: 20px; display: flex; flex-direction: column; gap: 15px; }

.toggle-container { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; width: fit-content; margin: 0 auto; transition: 0.3s; }
.toggle-container.hidden { display: none !important; }
.toggle-container input { display: none; }
.toggle-slider { width: 44px; height: 24px; background-color: var(--bg-input); border: 1px solid var(--border); border-radius: 34px; position: relative; transition: .3s; }
.toggle-slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 2px; bottom: 2px; background-color: var(--text-muted); border-radius: 50%; transition: .3s; }
.toggle-container input:checked + .toggle-slider { background-color: var(--accent); border-color: var(--accent); }
.toggle-container input:checked + .toggle-slider:before { transform: translateX(20px); background-color: white; }
.toggle-label { font-size: 0.95rem; color: var(--text-main); font-weight: 500; }

/* Feature A: Dropdown Styling */
.status-dropdown { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); padding: 14px; border-radius: 10px; font-size: 1rem; cursor: pointer; outline: none; transition: 0.2s; appearance: none; background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'); background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 12px auto; }
.status-dropdown:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 104, 246, 0.2); }

.btn-primary { background: var(--accent); color: white; border: none; padding: 14px; border-radius: 10px; font-weight: 600; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s; font-size: 1rem; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.status-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; min-height: 40px; }
.toast { background: var(--bg-card); padding: 8px 16px; border-radius: 50px; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 8px; transition: 0.3s; }
.toast.hidden { opacity: 0; visibility: hidden; }
.btn-text { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: 0.2s; margin-left: auto; }
.btn-text:hover { color: var(--accent); }

.results-section { animation: fadeIn 0.5s; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 0 5px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.badge { background: var(--bg-card); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; border: 1px solid var(--border); color: var(--accent); font-weight: 600; }
.btn-clear { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error); color: var(--error); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.btn-clear:hover { background: var(--error); color: white; }

.scroll-box-wrapper { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; height: 450px; overflow: hidden; position: relative; }
.anime-scroll-list { height: 100%; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.anime-scroll-list::-webkit-scrollbar { width: 6px; }
.anime-scroll-list::-webkit-scrollbar-track { background: var(--bg-input); }
.anime-scroll-list::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; }

.empty-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); opacity: 0.5; text-align: center; }
.empty-placeholder i { font-size: 3rem; margin-bottom: 15px; color: var(--text-muted); }
.empty-placeholder p { font-size: 1rem; font-weight: 600; }

.anime-card { background: var(--bg-card); padding: 12px; border-radius: 10px; display: flex; gap: 15px; align-items: center; border: 1px solid var(--border); animation: slideIn 0.3s ease; flex-shrink: 0; transition: border-color 0.2s; }
.anime-card:hover { border-color: var(--accent); }
.anime-card img { width: 50px; height: 75px; object-fit: cover; border-radius: 6px; }
.card-info { flex-grow: 1; min-width: 0; }
.card-title { font-size: 1rem; font-weight: 600; color: white; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; margin-bottom: 4px; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.card-tag { background: var(--bg-input); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; border: 1px solid var(--border); }

.card-actions { display: flex; gap: 8px; }
.card-actions button { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.card-actions button:hover { background: var(--accent); color: white; border-color: var(--accent); }
.card-actions .btn-del:hover { background: var(--error); border-color: var(--error); }

.guide-section { margin-top: 60px; display: flex; flex-direction: column; gap: 20px; }
.section-title { font-size: 1.5rem; margin-bottom: 10px; color: white; justify-content: center; display: flex; }
.guide-card { background: var(--bg-card); padding: 25px; border-radius: 16px; border: 1px solid var(--border); display: flex; gap: 20px; align-items: flex-start; transition: transform 0.2s; }
.guide-card.hidden { display: none !important; }
.guide-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.step-number { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; flex-shrink: 0; opacity: 0.8; }
.guide-content h3 { font-size: 1.1rem; margin-bottom: 10px; color: white; }
.guide-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 10px; }
.code-block { background: #000; padding: 10px; border-radius: 6px; font-family: monospace; font-size: 0.9rem; color: var(--warning); border: 1px solid var(--border); margin: 10px 0; }
.feature-list { list-style: none; padding-left: 0; }
.feature-list li { margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.feature-list i { width: 20px; text-align: center; margin-right: 8px; }
.guide-content a { color: var(--accent); text-decoration: none; font-weight: 600; }
.guide-content a:hover { text-decoration: underline; }

footer { text-align: center; margin-top: 50px; padding: 30px; border-top: 1px solid var(--border); color: var(--text-muted); }
footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer-note { font-size: 0.8rem; opacity: 0.6; margin-top: 5px; }

.hidden { display: none; }
.btn-success { background: var(--success); color: white; border: none; padding: 14px; width: 100%; border-radius: 10px; font-weight: bold; cursor: pointer; display: flex; justify-content: center; gap: 8px; font-size: 1rem; margin-top: 20px; }
.btn-success:hover { background: #059669; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 200; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-card); width: 90%; max-width: 450px; border-radius: 16px; border: 1px solid var(--border); padding-bottom: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.switch-list { max-height: 60vh; overflow-y: auto; padding: 10px; }
.switch-item { display: flex; gap: 15px; padding: 12px; cursor: pointer; border-radius: 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.switch-item:hover { background: var(--bg-input); }
.switch-item img { width: 45px; height: 65px; object-fit: cover; border-radius: 4px; }

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