        :root {
            --bg: #121212;
            --surface: #1e1e1e;
            --primary: #4caf50;
            --primary-dark: #388e3c;
            --text: #ffffff;
            --text-muted: #aaaaaa;
            --border: #333333;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: system-ui, -apple-system, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            -webkit-tap-highlight-color: transparent;
        }

        /* Flex wrapper to allow the timer to grow and fill empty space */
        #app {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            padding-bottom: 90px; /* Clearance for the fixed footer */
        }

        header {
            padding: 1rem;
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
        }

        h1 {
            font-size: 1.25rem;
        }

        button {
            cursor: pointer;
            border: none;
            border-radius: 4px;
            font-weight: bold;
            outline: none;
        }

        .btn-settings {
            background: transparent;
            color: var(--primary);
            font-size: 1rem;
            padding: 0.5rem 1rem;
            border: 1px solid var(--primary);
            border-radius: 8px;
        }

        .settings-panel {
            display: none;
            padding: 1rem;
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }

        .settings-panel.open {
            display: block;
        }

        .setting-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
            align-items: center;
        }

        .setting-row:last-child {
            margin-bottom: 0;
        }

        .setting-row label {
            font-size: 1rem;
        }

        .setting-row input {
            width: 100px;
            padding: 0.75rem;
            background: var(--bg);
            border: 1px solid var(--border);
            color: var(--text);
            text-align: right;
            border-radius: 4px;
            font-size: 1rem;
        }

        .plant-list {
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            flex-shrink: 0;
        }

        .plant-card {
            background: var(--surface);
            padding: 1.25rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .plant-card-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .btn-icon {
            background: transparent;
            color: var(--primary);
            width: 44px;
            height: 44px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid var(--border);
            border-radius: 8px;
        }

        .btn-icon:active {
            background: var(--border);
        }

        .plant-info {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .plant-name {
            font-size: 1.25rem;
            font-weight: bold;
        }

        .plant-time {
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .counter-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .btn-count {
            background: var(--primary);
            color: #fff;
            width: 44px;
            height: 44px;
            font-size: 1.5rem;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 8px;
            user-select: none;
        }

        .btn-count:active {
            background: var(--primary-dark);
        }

        .count-display {
            font-size: 1.25rem;
            width: 32px;
            text-align: center;
            font-weight: bold;
        }
        
        /* Master Timer Section - Updated to fill space */
        .timer-container {
            background: var(--surface);
            margin: 0 1rem 1rem 1rem;
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 200px;
        }

        .timer-display {
            font-size: clamp(4rem, 18vw, 7rem); /* Dynamically scales but won't get too small or too massive */
            font-weight: bold;
            margin-bottom: 1.5rem;
            font-variant-numeric: tabular-nums;
            color: var(--primary);
            line-height: 1;
        }

        .timer-controls {
            display: flex;
            justify-content: center;
            gap: 1rem;
            width: 100%;
        }

        .btn-timer {
            background: var(--bg);
            border: 1px solid var(--border);
            color: var(--text);
            padding: 1rem 2.5rem;
            font-size: 1.25rem;
            border-radius: 8px;
            flex-grow: 1;
            max-width: 160px;
        }

        .btn-timer.primary {
            background: var(--primary);
            color: #000;
            border-color: var(--primary);
        }

        .btn-timer:active {
            opacity: 0.8;
        }

        .footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--primary);
            color: #000;
            padding: 1.25rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 1.5rem;
            font-weight: bold;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
            z-index: 10;
        }