@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

/* GLOBALLY DISABLE SCROLLBARS */
* { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar { display: none !important; }

:root { --bg: #000; --card: #121212; --accent: #0a84ff; --text: #fff; --sub: #8e8e93; --green: #30d158; --red: #ff453a; --border: rgba(255,255,255,0.08); }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 20px; overflow: hidden; }

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.header h1 { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -1px; }
.status { font-size: 10px; font-weight: 800; display: flex; align-items: center; color: var(--sub); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; }
.dot.online { background: var(--green); box-shadow: 0 0 10px var(--green); }

.nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(10,10,10,0.8); backdrop-filter: blur(20px); display: flex; padding: 15px 5px 35px; border-top: 1px solid var(--border); z-index: 50;}
.nav-item { color: var(--sub); font-size: 10px; font-weight: 800; text-align: center; flex: 1; cursor: pointer;}
.nav-item i { display: block; margin: 0 auto 5px; width: 20px; height: 20px; }
.nav-item.active { color: var(--accent); }

.page { display: none; height: calc(100vh - 180px); overflow-y: auto; padding-bottom: 50px; }
.active-page { display: block; }

.card { background: var(--card); border-radius: 24px; padding: 20px; margin-bottom: 15px; border: 1px solid var(--border); }
.card-title { font-weight: 800; font-size: 11px; color: var(--sub); text-transform: uppercase; margin-bottom: 15px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.tile { background: var(--card); border-radius: 22px; padding: 15px; border: 1px solid var(--border); color: #fff; text-align: left; aspect-ratio: 1/1.1; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; outline: none; transition: 0.2s;}
.tile i { color: var(--accent); }
.tile.on { background: #fff; color: #000; border-color: #fff;}
.tile.on i { color: #000; }
.label { font-weight: 800; font-size: 13px; }

input[type=range] { -webkit-appearance: none; width: 100%; height: 40px; background: #1c1c1e; border-radius: 12px; margin: 5px 0; overflow: hidden; outline: none;}
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 0; box-shadow: -400px 0 0 400px var(--thumb-color, var(--accent)); }

.device-scroll { display: flex; overflow-x: auto; gap: 8px; margin-bottom: 15px; padding-bottom: 5px; scrollbar-width: none;}
.device-scroll::-webkit-scrollbar { display: none; }
.device-pill { background: #1c1c1e; padding: 8px 16px; border-radius: 15px; font-weight: 800; font-size: 11px; color: var(--sub); white-space: nowrap; border: 1px solid var(--border); cursor:pointer;}
.device-pill.active { background: #fff; color: #000; }

.inp { background: #1c1c1e; color: #fff; border: 1px solid var(--border); padding: 10px; border-radius: 12px; font-family: inherit; font-weight: 800; outline:none; }
.add-btn { background: var(--accent); border: none; color: #fff; padding: 10px 15px; border-radius: 12px; font-weight: 800; cursor:pointer; outline:none;}
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.btn-stop { background: var(--red); color: #fff; width: 100%; padding: 20px; border-radius: 20px; font-weight: 800; border: none; margin-bottom: 15px; display: none; cursor:pointer;}

.mode-btn { flex: 1; background: #333; color: var(--sub); font-size: 10px; padding: 12px 0;}
.mode-btn.active { background: var(--accent); color: #fff; }

/* Expanded Timeline (4x longer = 5760px) + Gap at the bottom to center scroll */
.v-wrapper { position: relative; height: 100%; overflow-y: auto; padding: 40px 0 50vh 0; }
.v-container { position: relative; height: 2880px; }
.v-track { position: absolute; left: 10px; width: 40px; height: 100%; border-radius: 20px; border: 2px solid var(--border); }
.v-time-labels { position: absolute; left: 65px; width: 100px; height: 100%; }
.v-time-label { position: absolute; color: var(--sub); font-size: 11px; font-weight: 800; transform: translateY(-50%); }
.fab-add { position: absolute; bottom: 90px; left: 20px; right: 20px; height: 50px; background: var(--accent); border: none; border-radius: 15px; color: #fff; font-weight: 800; cursor:pointer; z-index: 10;}

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; z-index: 100; }
.modal-content { background: var(--card); width: 85%; padding: 25px; border-radius: 25px; border: 1px solid var(--border); }

/* Stricter drag prevention (No Ghost Allowed Cursor) */
.v-node { 
    position: absolute; left: 50%; width: 55px; height: 30px; background: #fff; border-radius: 15px; 
    transform: translate(-50%, -50%); border: 3px solid var(--card); 
    user-select: none; -webkit-user-drag: none; touch-action: none; cursor: pointer;
}
.v-node[data-dragged="true"] { opacity: 0.8; cursor: grabbing; }
