:root {
--bg-color: #f0f4f8;
--card-bg: rgba(255, 255, 255, 0.9);
--deep-blue: #00a8ff;
--text-main: #1e293b;
--muted: #64748b;
--border-thin: 1.5px solid rgba(0, 168, 255, 0.15);
--transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
--ok: #22c55e;
}

body.dark-mode {
--bg-color: #050810;
--card-bg: rgba(15, 23, 42, 0.8);
--text-main: #f1f5f9;
--muted: #94a3b8;
--border-thin: 1.5px solid rgba(135, 206, 250, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-color); color: var(--text-main); transition: 0.5s; overflow-x: hidden; }

button, .card, .tab, .s-nav a, .icon-btn { transition: var(--transition); cursor: pointer; }
button:active, .card:active, .tab:active, .s-nav a:active, .icon-btn:active { transform: scale(0.92); }

.stagger-item { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.stagger-item.appear { opacity: 1; transform: translateY(0); }

.loader { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-color); z-index: 9999; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--deep-blue); display: inline-block; margin: 0 4px; animation: wave 1s infinite ease-in-out; }
@keyframes wave { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.sidebar {
position: fixed; left: -320px; top: 15px; bottom: 15px; width: 280px;
background: var(--card-bg); backdrop-filter: blur(25px);
border-radius: 40px; z-index: 2000; transition: var(--transition);
border: var(--border-thin); padding: 30px;
}
.sidebar.active { left: 15px; }
.close-sidebar { position: absolute; top: 20px; right: 20px; font-size: 1.2rem; color: var(--muted); border: none; background: none; }
.sidebarMask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1999; display: none; }
.sidebarMask.show { display: block; }

.s-nav a {
display: flex; align-items: center; gap: 15px; padding: 12px;
text-decoration: none; color: var(--text-main); border-radius: 20px;
margin-bottom: 8px; font-weight: 600; font-size: 0.9rem;
}
.s-nav a:hover { background: var(--deep-blue); color: white; }

.header-bubble {
display: flex; justify-content: space-between; align-items: center;
padding: 10px 18px; background: var(--card-bg); border-radius: 100px;
border: var(--border-thin); margin: 15px 15px 25px 15px;
}
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--deep-blue); color: white; display: grid; place-items: center; }

.search-wrapper { margin: 0 15px 20px 15px; position: relative; }
.search-input { width: 100%; padding: 12px 20px 12px 45px; border-radius: 30px; border: var(--border-thin); background: var(--card-bg); color: var(--text-main); outline: none; }
.search-wrapper i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 0 15px 15px 15px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 20px; border-radius: 25px; background: var(--card-bg); border: var(--border-thin); white-space: nowrap; font-size: 0.75rem; font-weight: 800; }
.tab.active { background: var(--deep-blue); color: white; }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 15px 20px 15px; }
.stat-card { background: var(--card-bg); padding: 15px; border-radius: 25px; border: var(--border-thin); text-align: center; cursor: pointer; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.stat-card:active { transform: scale(0.9) rotate(-3deg); background: rgba(0, 168, 255, 0.1); }
.stat-card .val { display: block; font-weight: 800; color: var(--deep-blue); font-size: 1.1rem; }
.stat-card .label { font-size: 0.6rem; font-weight: 800; opacity: 0.5; text-transform: uppercase; }

.container { padding: 0 15px 20px 15px; max-width: 800px; margin: auto; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media(min-width: 600px) { .grid { grid-template-columns: 1fr 1fr; } }

.card { background: var(--card-bg); border-radius: 25px; padding: 18px; border: var(--border-thin); }
.card h3 { font-size: 0.9rem; font-weight: 800; margin-bottom: 4px; }
.card p { font-size: 0.7rem; color: var(--muted); line-height: 1.3; margin-bottom: 12px; height: 2.6em; overflow: hidden; }

.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge { display: flex; align-items: center; gap: 4px; font-size: 0.6rem; font-weight: 800; color: var(--ok); }
.badge.maint { color: #ef4444; }
.btn-try { padding: 8px 15px; border-radius: 12px; background: var(--deep-blue); color: white; font-weight: 800; font-size: 0.65rem; border: none; display: flex; align-items: center; gap: 5px; }

.hint-container { background: rgba(0, 168, 255, 0.08); border: 1px dashed var(--deep-blue); border-radius: 18px; margin-bottom: 15px; display: none; overflow: hidden; }
.hint-container.show { display: block; }
.hint-scroll-wrapper { display: flex; align-items: center; padding: 10px 12px; gap: 10px; }
.hint-text { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 0.7rem; font-family: monospace; color: var(--deep-blue); scrollbar-width: none; }
.hint-btns { display: flex; gap: 5px; border-left: 1px solid rgba(0,168,255,0.2); padding-left: 10px; }
.h-btn { background: none; border: none; color: var(--text-main); font-size: 0.85rem; padding: 5px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 3000; display: none; align-items: flex-end; justify-content: center; }
.modal.show { display: flex; }
.dialog {
background: var(--bg-color); width: 100%; max-width: 500px; border-radius: 40px 40px 0 0;
padding: 30px; border: var(--border-thin); position: relative; max-height: 85vh; overflow-y: auto;
animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.param { width: 100%; padding: 12px; border-radius: 15px; border: var(--border-thin); background: var(--card-bg); color: var(--text-main); margin-bottom: 10px; outline: none; font-size: 0.85rem; }
.urlRow { display: flex; gap: 8px; margin-bottom: 10px; }
.urlRow input { flex: 1; margin-bottom: 0; }
.resBox { background: #0f172a; color: #38bdf8; padding: 15px; border-radius: 20px; margin-top: 15px; font-family: monospace; font-size: 0.75rem; overflow-x: auto; position: relative; min-height: 50px; }
.resBox pre { white-space: pre-wrap; word-wrap: break-word; margin-top: 25px; }
.copy-res { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.1); border: none; color: #38bdf8; padding: 5px 10px; border-radius: 8px; font-size: 0.7rem; cursor: pointer; z-index: 5; }
.submit-req { width: 100%; padding: 14px; border-radius: 20px; background: var(--deep-blue); color: white; font-weight: 800; border: none; }

.media-preview { width: 100%; border-radius: 15px; margin-top: 10px; border: 1px solid rgba(255,255,255,0.1); }

footer { text-align: center; padding: 15px 0 30px 0; opacity: 0.5; font-size: 0.7rem; font-weight: 800; }