:root {
    --bg-dark: #121212;
    --row-odd: #1e1e1e;
    --row-even: #2a2a2a;
    --row-selected: #383838;
    --row-edit: #d4b055;
    --text-main: #ffffff;
    --text-time: #00e676;
    --time-active: #ff1744;
    --accent: #29b6f6;
    --menu-bg: #222222;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body, html { height: 100%; background-color: var(--bg-dark); color: var(--text-main); font-family: 'Segoe UI', sans-serif; overflow: hidden; }

#list-container { height: 100%; overflow-y: auto; padding-bottom: 50px; scrollbar-width: none; }
#list-container::-webkit-scrollbar { display: none; }

.swipe-container { position: relative; overflow: hidden; background-color: #000; }
.swipe-action { position: absolute; top: 0; bottom: 0; width: 100%; display: flex; align-items: center; padding: 0 30px; font-size: 1.8rem; z-index: 1; opacity: 0; transition: opacity 0.1s; }
.swipe-action.active { opacity: 1; }
.action-left { background-color: var(--row-edit); justify-content: flex-start; color: #000; left: 0; }
.action-right { background-color: var(--time-active); justify-content: flex-end; color: #fff; right: 0; }

.list-item { display: flex; flex-direction: column; justify-content: center; height: 140px; padding: 15px 30px; border-bottom: 1px solid #000; position: relative; transition: transform 0.2s, background-color 0.2s; z-index: 2; width: 100%; background-color: inherit; }
.list-item.bg-odd { background-color: var(--row-odd); }
.list-item.bg-even { background-color: var(--row-even); }
.list-item.selected { background-color: var(--row-selected); }
.list-item.editing { background-color: var(--row-edit) !important; color: #000 !important; height: 180px; z-index: 10; }
.list-item.active { border-left: 8px solid var(--time-active); padding-left: 22px; }

.item-name { font-size: 1.5rem; font-weight: bold; margin-bottom: 5px; }
.item-time { font-size: 2.5rem; font-weight: 900; color: var(--text-time); font-variant-numeric: tabular-nums; }
.list-item.active .item-time { color: var(--time-active); }

.edit-input { width: 85%; background: #fff; color: #000; border: 3px solid #000; font-size: 2rem; padding: 10px; border-radius: 8px; display: none; }
.list-item.editing .item-name { display: none; }
.list-item.editing .edit-input { display: block; }

.floating-menu-container, .main-fab-container { position: fixed; right: 20px; top: 45%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 15px; z-index: 100; transition: all 0.3s; }
.floating-menu-container { transform: translateY(-50%) translateX(150px); opacity: 0; pointer-events: none; }
.floating-menu-container.show { transform: translateY(-50%) translateX(0); opacity: 1; pointer-events: auto; }
.main-fab-container.hide { transform: translateY(-50%) scale(0); opacity: 0; }

.f-btn, .main-fab { width: 55px; height: 55px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.4rem; box-shadow: 0 4px 10px rgba(0,0,0,0.6); cursor: pointer; border: none; }
.f-btn { background-color: var(--menu-bg); color: #fff; }
#fab-menu { background-color: #555; }
#fab-add { background-color: var(--accent); }

.f-btn-save { background-color: #00e676; color: #000; border: 2px solid #00e676; }
.g-btn-close { background-color: #f44336; border: 2px solid #f44336; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; justify-content: center; align-items: center; }
.modal-overlay.show { display: flex; }
.modal-content { background: var(--menu-bg); padding: 25px; border-radius: 12px; width: 90%; max-width: 500px; max-height: 85vh; display: flex; flex-direction: column; }
.modal-content h2 { color: var(--accent); text-align: center; margin-bottom: 20px; font-size: 2.2rem; }

#help-text { overflow-y: auto; flex-grow: 1; padding-right: 10px; font-size: 1.4rem; line-height: 1.6; color: #ddd; }
#help-text p { margin-bottom: 15px; }
.highlight { color: var(--accent); width: 35px; text-align: center; display: inline-block; }
.help-ok-btn { margin-top: 20px; align-self: center; }

#qr-reader-container { display: none; position: fixed; top: 0; width: 100%; height: 100%; background: #000; z-index: 2000; flex-direction: column; justify-content: center; align-items: center; }
#qr-reader { width: 100%; max-width: 500px; }