/* --- shared.css --- */ /* Passwortfeld Toggle (zentral für alle Seiten) */ .password-toggle { position: relative; display: flex; align-items: center; gap: 0; } .password-toggle input { padding-right: 50px; flex: 1; } .password-toggle button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; transition: color 0.2s; } .password-toggle button:active { color: var(--accent); } /* Passwortfeld Toggle */ .password-toggle { display: flex; align-items: center; gap: 6px; } .password-toggle input[type="password"], .password-toggle input[type="text"] { flex: 1; } .password-toggle button { background: none; border: none; font-size: 1.2em; cursor: pointer; color: var(--text-muted); padding: 0 6px; transition: color 0.2s; } .password-toggle button:active { color: var(--accent); } /* Shared CSS - Base styles for all pages */ /* CSS Variables - Dark Mode (default) */ :root { --bg-color: #1a1a2e; --card-bg: #16213e; --accent: #0f3460; --text: #eaeaea; --text-muted: #190c0c; --success: #00d26a; --error: #ff6b6b; --border: #2a2a4a; --input-bg: #1a1a2e; --shadow: rgba(0, 0, 0, 0.3); --primary: #c41e3a; } /* CSS Variables - Light Mode */ [data-theme="light"] { --bg-color: #faf8f5; --card-bg: #ffffff; --accent: #fef2f2; --text: #1a1a2e; --text-muted: #6b7280; --success: #c41e3a; --error: #dc2626; --border: #e5d9d0; --input-bg: #ffffff; --shadow: rgba(196, 30, 58, 0.1); --primary: #c41e3a; } /* Reset */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-color); color: var(--text); min-height: 100vh; transition: background 0.3s, color 0.3s; } /* Typography */ h1 { font-size: 1.5rem; color: var(--text); } h2 { font-size: 1.1rem; margin-bottom: 15px; color: var(--text); display: flex; align-items: center; gap: 10px; } h2::before { content: ''; display: inline-block; width: 4px; height: 20px; background: var(--success); border-radius: 2px; } /* Card */ .card { background: var(--card-bg); border-radius: 12px; padding: 16px; margin-bottom: 16px; border: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow); } /* Form Elements */ .form-group { margin-bottom: 12px; } label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.85rem; } input[type="text"], input[type="password"], select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); font-size: 16px; transition: border-color 0.2s; } input:focus, select:focus { outline: none; border-color: var(--success); } /* Buttons */ .btn { padding: 12px 20px; border: none; border-radius: 8px; font-size: 0.95rem; cursor: pointer; transition: transform 0.1s, opacity 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; touch-action: manipulation; } .btn:hover { opacity: 0.9; } .btn:active { transform: scale(0.98); } .btn-primary { background: var(--success); color: #fff; } [data-theme="light"] .btn-primary { background: var(--primary); color: #fff; } [data-theme="light"] .btn-primary:hover { background: #a31830; } .btn-secondary { background: var(--accent); color: var(--text); } .btn-group { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; } .btn-group .btn { flex: 1; min-width: 120px; } /* Status Messages */ .status { padding: 10px 14px; border-radius: 8px; margin-top: 12px; display: none; font-size: 0.9rem; } .status.success { display: block; background: rgba(0, 210, 106, 0.15); border: 1px solid var(--success); color: var(--success); } .status.error { display: block; background: rgba(255, 107, 107, 0.15); border: 1px solid var(--error); color: var(--error); } .status.info { display: block; background: rgba(15, 52, 96, 0.5); border: 1px solid var(--accent); color: var(--text); } /* Theme Toggle */ .theme-toggle { display: flex; align-items: center; gap: 8px; background: var(--card-bg); padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; } .theme-toggle:hover { border-color: var(--success); } .theme-toggle-icon { font-size: 1.2rem; transition: transform 0.3s; } .theme-toggle-label { font-size: 0.85rem; color: var(--text-muted); } /* Language Toggle */ .lang-toggle { display: flex; align-items: center; gap: 6px; background: var(--card-bg); padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; font-size: 0.85rem; color: var(--text-muted); } .lang-toggle:hover { border-color: var(--success); } .lang-flag { font-size: 1.1rem; } /* Header Controls */ .header-controls { display: flex; align-items: center; gap: 8px; } .captive-header { position: absolute; top: 12px; right: 12px; } [data-theme="light"] .header h1 { color: var(--primary); } /* Loading Spinner */ .loading { display: none; text-align: center; padding: 30px; color: var(--text-muted); } .loading.active { display: block; } .spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--success); border-radius: 50%; margin: 0 auto 12px; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Safe area for notched phones */ @supports (padding: max(0px)) { body { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); } } /* --- index.css --- */ /* Control CSS - Main application specific styles */ /* Base styles are in shared.css */ body { padding: 12px; } .container { max-width: 900px; margin: 0 auto; } /* Header */ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; } .form-group { margin-bottom: 12px; } /* Schema Editor */ .schema-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; } .schema-controls .form-group { margin-bottom: 0; flex: 1; min-width: 150px; } .schema-controls .btn { flex: 0 0 auto; } .time-grid { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; } .time-row { display: grid; grid-template-columns: 55px 40px repeat(6, 1fr); gap: 6px; align-items: center; padding: 8px; background: var(--bg-color); border-radius: 8px; border: 1px solid var(--border); } .time-label { font-weight: 600; color: var(--text); font-size: 0.85rem; } .color-preview { width: 100%; height: 32px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; transition: transform 0.1s; min-width: 32px; } .color-preview:hover { transform: scale(1.05); } .value-input { width: 100%; padding: 8px 4px; text-align: center; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 14px; min-width: 0; } .value-input:focus { outline: none; border-color: var(--success); } /* Hide number input spinners on mobile for cleaner look */ .value-input::-webkit-outer-spin-button, .value-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .value-input[type=number] { -moz-appearance: textfield; appearance: textfield; } .value-header { display: grid; grid-template-columns: 55px 40px repeat(6, 1fr); gap: 6px; padding: 8px; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; } .value-header span { text-align: center; } .value-header span:first-child { text-align: left; } /* Color Picker Modal */ .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); z-index: 100; align-items: center; justify-content: center; padding: 16px; } .modal-overlay.active { display: flex; } .modal { background: var(--card-bg); border-radius: 16px; padding: 20px; width: 100%; max-width: 350px; border: 1px solid var(--border); max-height: 90vh; overflow-y: auto; } .modal h3 { margin-bottom: 20px; text-align: center; font-size: 1.1rem; } .color-picker-container { display: flex; flex-direction: column; gap: 16px; } .color-slider { display: flex; align-items: center; gap: 12px; } .color-slider label { width: 24px; margin: 0; font-weight: bold; font-size: 1rem; } .color-slider input[type="range"] { flex: 1; height: 28px; -webkit-appearance: none; appearance: none; border-radius: 14px; padding: 10px 0; background: transparent; } .color-slider input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; } .color-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--text); cursor: pointer; margin-top: -10px; box-shadow: 0 2px 6px var(--shadow); } #rangeR::-webkit-slider-runnable-track { background: linear-gradient(to right, #000, #f00); } #rangeG::-webkit-slider-runnable-track { background: linear-gradient(to right, #000, #0f0); } #rangeB::-webkit-slider-runnable-track { background: linear-gradient(to right, #000, #00f); } .color-slider .value { width: 40px; text-align: right; font-family: monospace; font-size: 0.95rem; } .preview-large { width: 100%; height: 60px; border-radius: 12px; border: 2px solid var(--border); margin: 8px 0; } .modal-buttons { display: flex; gap: 10px; margin-top: 16px; } .modal-buttons .btn { flex: 1; } /* Scrollbar Styling */ .time-grid::-webkit-scrollbar { width: 6px; } .time-grid::-webkit-scrollbar-track { background: transparent; } .time-grid::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; } /* Loading Spinner */ .loading { display: none; text-align: center; padding: 30px; color: var(--text-muted); } .loading.active { display: block; } .spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--success); border-radius: 50%; margin: 0 auto 12px; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Tabs */ .tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--bg-color); padding: 4px; border-radius: 10px; border: 1px solid var(--border); } .tab { flex: 1; padding: 12px 20px; background: transparent; border: none; border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 0.95rem; font-weight: 500; transition: background 0.2s, color 0.2s; white-space: nowrap; min-height: 44px; touch-action: manipulation; } .tab:hover { background: var(--accent); } .tab.active { background: var(--card-bg); color: var(--text); box-shadow: 0 2px 4px var(--shadow); } [data-theme="light"] .tab.active { background: var(--primary); color: #fff; } .tab-content { display: none; } .tab-content.active { display: block; } /* Sub-Tabs */ .sub-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--bg-color); padding: 4px; border-radius: 10px; border: 1px solid var(--border); } .sub-tab { flex: 1; padding: 10px 16px; background: transparent; border: none; border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; transition: background 0.2s, color 0.2s; white-space: nowrap; min-height: 40px; touch-action: manipulation; } .sub-tab:hover { background: var(--accent); } .sub-tab.active { background: var(--card-bg); color: var(--text); box-shadow: 0 2px 4px var(--shadow); } [data-theme="light"] .sub-tab.active { background: var(--primary); color: #fff; } .sub-tab-content { display: none; } .sub-tab-content.active { display: block; } /* Connection Info */ #connection-info p { margin: 8px 0; font-size: 0.95rem; } /* Control Sections */ .control-section { padding: 16px 0; border-bottom: 1px solid var(--border); } .control-section:first-child { padding-top: 0; } .control-section:last-child { border-bottom: none; padding-bottom: 0; } .control-section h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; } /* Control Panel - Light Toggle */ .control-group { margin-bottom: 0; } .toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; } .toggle-label { font-size: 1.1rem; font-weight: 600; color: var(--text); } .toggle-switch { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 30px; border: 2px solid var(--border); background: var(--bg-color); cursor: pointer; transition: all 0.3s ease; min-width: 120px; justify-content: center; } .toggle-switch:hover { border-color: var(--success); } .toggle-switch.active { background: var(--success); border-color: var(--success); } .toggle-switch.active .toggle-state { color: #fff; } .toggle-switch.active .toggle-icon { filter: brightness(1.2); } .toggle-state { font-weight: 700; font-size: 0.95rem; color: var(--text-muted); transition: color 0.3s; } .toggle-icon { font-size: 1.4rem; transition: filter 0.3s; } /* Mode Selector */ .mode-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; } .mode-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg-color); cursor: pointer; transition: all 0.2s ease; } .mode-btn:hover { border-color: var(--success); transform: translateY(-2px); } .mode-btn.active { background: var(--success); border-color: var(--success); } .mode-btn.active .mode-name { color: #fff; } .mode-icon { font-size: 1.8rem; } .mode-name { font-size: 0.9rem; font-weight: 600; color: var(--text); transition: color 0.2s; } /* Simulation Options */ .simulation-options { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease; margin-top: 0; } .simulation-options.visible { max-height: 100px; opacity: 1; margin-top: 16px; } /* Status Display */ .status-display { display: grid; gap: 12px; } .status-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); display: none; } .status-item.visible { display: flex; } .status-item:last-child { border-bottom: none; } .status-label { color: var(--text-muted); font-size: 0.9rem; } .status-value { font-weight: 600; color: var(--text); } .current-color-preview { width: 60px; height: 30px; border-radius: 6px; border: 2px solid var(--border); background: rgb(255, 240, 220); } /* Card Description */ .card-description { color: var(--text-muted); font-size: 0.9rem; margin-top: -10px; margin-bottom: 16px; } /* Device List */ .device-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; } .device-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg-color); border: 1px solid var(--border); border-radius: 10px; gap: 12px; } .device-item.unpaired { border-left: 3px solid var(--success); } .device-item.paired { border-left: 3px solid var(--accent); } .device-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; } .device-icon { font-size: 1.5rem; flex-shrink: 0; } .device-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .device-name { font-weight: 600; color: var(--text); font-size: 0.95rem; } .device-name-input { font-weight: 600; color: var(--text); font-size: 0.95rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; width: 100%; min-width: 0; } .device-name-input:focus { outline: none; border-color: var(--success); } .device-id { font-size: 0.75rem; color: var(--text-muted); font-family: monospace; } /* Small Button */ .btn-small { padding: 8px 12px; font-size: 0.85rem; min-height: 36px; } .btn-danger:hover { background: var(--error); color: #fff; } /* Empty State */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; text-align: center; color: var(--text-muted); } .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.6; } .empty-state p { margin: 0; font-size: 0.95rem; } .empty-hint { font-size: 0.85rem !important; margin-top: 8px !important; opacity: 0.7; } /* Mobile Responsive */ @media (max-width: 600px) { body { padding: 8px; } .header { flex-direction: column; align-items: stretch; text-align: center; } .header h1 { order: 1; } .theme-toggle { order: 2; justify-content: center; } .card { padding: 14px; border-radius: 10px; } h2 { font-size: 1rem; } .tabs { justify-content: stretch; } .tab { flex: 1; text-align: center; padding: 12px 10px; font-size: 0.9rem; } /* Sub-tabs mobile */ .sub-tabs { padding: 3px; } .sub-tab { padding: 8px 12px; font-size: 0.85rem; min-height: 36px; } /* Device list mobile */ .device-item { flex-wrap: wrap; gap: 10px; } .device-info { width: 100%; } .device-item .btn { width: 100%; } .device-name-input { font-size: 16px; /* Prevents zoom on iOS */ } /* Mode selector mobile */ .mode-selector { grid-template-columns: repeat(3, 1fr); gap: 8px; } .mode-btn { padding: 12px 8px; } .mode-icon { font-size: 1.5rem; } .mode-name { font-size: 0.8rem; } .toggle-switch { min-width: 100px; padding: 10px 16px; } .btn-group { flex-direction: column; } .btn-group .btn { width: 100%; } .schema-controls { flex-direction: column; align-items: stretch; } .schema-controls .form-group { min-width: 100%; } .schema-controls .btn { width: 100%; } /* Simplified grid for mobile */ .time-row { grid-template-columns: 50px 36px repeat(3, 1fr); gap: 4px; padding: 6px; } .value-header { grid-template-columns: 50px 36px repeat(3, 1fr); gap: 4px; font-size: 0.65rem; } /* Hide V1, V2, V3 on mobile for simplicity */ .time-row input:nth-child(n+6), .value-header span:nth-child(n+6) { display: none; } .value-input { padding: 6px 2px; font-size: 13px; } .time-label { font-size: 0.8rem; } .color-preview { height: 28px; } } /* Extra small screens */ @media (max-width: 380px) { .header h1 { font-size: 1.2rem; } .tab { padding: 10px 8px; font-size: 0.85rem; } } /* Landscape mobile */ @media (max-height: 500px) and (orientation: landscape) { .time-grid { max-height: 50vh; } .modal { max-height: 95vh; padding: 16px; } } /* Safe area for notched phones */ @supports (padding: max(0px)) { body { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); } } /* Scene Styles */ .scenes-config-list { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; } .scene-config-item { display: flex; justify-content: space-between; align-items: center; background: var(--input-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; transition: border-color 0.2s; } .scene-config-item:hover { border-color: var(--success); } .scene-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; } .scene-icon { font-size: 1.5rem; flex-shrink: 0; } .scene-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .scene-name { font-weight: 500; color: var(--text); } .scene-actions-text { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .scene-buttons { display: flex; gap: 6px; flex-shrink: 0; } /* Scenes on control page */ .scenes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; } .scene-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 12px; background: var(--input-bg); border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: all 0.2s; min-height: 80px; } .scene-btn:hover { border-color: var(--success); background: var(--accent); } .scene-btn:active { transform: scale(0.95); } .scene-btn-icon { font-size: 1.8rem; } .scene-btn-name { font-size: 0.85rem; color: var(--text); text-align: center; } /* Devices on control page */ .devices-control-grid { display: flex; /* --- captive.css --- */ @media (max-width: 600px) { .header { flex-direction: row; align-items: flex-start; text-align: left; } .header h1 { flex: 1 1 100%; text-align: center; order: 2; margin-top: 8px; } .header-controls { order: 1; flex: 1 1 auto; justify-content: flex-start; display: flex; gap: 8px; } } /* Captive Portal CSS - WiFi setup specific styles */ /* Base styles are in shared.css */ body { padding: 12px; } .container { max-width: 900px; margin: 0 auto; width: 100%; } /* Header */ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; } .header h1 { font-size: 1.5rem; margin: 0; } .header p { color: var(--text-muted); font-size: 0.9rem; } /* Theme Toggle - Absolute positioned */ /* Handled by .captive-header in shared.css */ /* Card - Larger padding for captive */ .card { border-radius: 16px; padding: 24px; box-shadow: 0 4px 20px var(--shadow); } #connect-btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; box-shadow: none; background-color: #888 !important; } } /* Form Group - More spacing */ .form-group { margin-bottom: 16px; } label { margin-bottom: 8px; font-weight: 500; } /* Inputs - Thicker border for captive */ input[type="text"], input[type="password"], select { padding: 14px 16px; border-width: 2px; border-radius: 10px; } /* Buttons - Full width for captive */ .btn { width: 100%; padding: 14px 20px; border-radius: 10px; font-size: 1rem; font-weight: 600; min-height: 50px; } .btn-secondary { margin-top: 10px; } .btn-group { flex-direction: column; gap: 10px; margin-top: 20px; } /* Status - Centered text */ .status { text-align: center; border-radius: 10px; padding: 12px 16px; } /* Divider */ .divider { display: flex; align-items: center; margin: 20px 0; color: var(--text-muted); font-size: 0.85rem; } .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); } .divider span { padding: 0 12px; } /* Network List */ .network-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; } .network-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s; } .network-item:last-child { border-bottom: none; } .network-item:hover { background: var(--accent); } .network-item.selected { background: var(--accent); border-left: 3px solid var(--success); } .network-name { font-weight: 500; display: flex; align-items: center; gap: 8px; } .network-signal { color: var(--text-muted); font-size: 0.85rem; } .signal-icon { font-size: 1.1rem; } /* Info Box */ .info-box { background: var(--accent); border-radius: 10px; padding: 12px 16px; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); } .info-box strong { color: var(--text); } /* Spinner - Smaller for captive */ .spinner { width: 30px; height: 30px; } .loading { padding: 20px; }