/* ==========================================================================
   CHRONOCONNECT CORE DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-app: radial-gradient(circle at 50% 50%, #111827 0%, #030712 100%);
    --bg-clock-outer: linear-gradient(145deg, #1f2937, #111827);
    --bg-clock-face: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #4b5563;
    
    /* Neon accents */
    --color-cyan: #06b6d4;
    --color-cyan-glow: rgba(6, 182, 212, 0.4);
    --color-magenta: #ec4899;
    --color-magenta-glow: rgba(236, 72, 153, 0.4);
    --color-indigo: #6366f1;
    --color-indigo-glow: rgba(99, 102, 241, 0.25);
    
    /* Glassmorphism elements */
    --glass-bg: rgba(17, 24, 39, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);
    
    /* Transition defaults */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Base resets & scrollbar customization */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-app);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   APP CONTAINER LAYOUT
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: transparent;
    position: relative;
}

/* ==========================================================================
   MAIN WORKSPACE (CLOCK)
   ========================================================================== */
.clock-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.clock-display-card {
    position: relative;
    width: min(580px, 85vw);
    height: min(580px, 85vw);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Outer glowing clock ring */
.clock-outer-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-clock-outer);
    padding: 18px; /* space between outer ring and face */
    box-shadow: 
        inset 0 4px 10px rgba(255, 255, 255, 0.05),
        inset 0 -4px 10px rgba(0, 0, 0, 0.6),
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 50px var(--color-indigo-glow);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.clock-outer-ring::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 40%, rgba(0,0,0,0.4));
    z-index: 1;
    pointer-events: none;
}

/* Clock Face */
.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-clock-face);
    position: relative;
    box-shadow: 
        inset 0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 -10px 30px rgba(255, 255, 255, 0.02);
    overflow: visible; /* Let custom hands or arrows overlap if needed */
    user-select: none;
    z-index: 2;
}

/* Ticks around clock dial */
.ticks-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
}

.tick {
    position: absolute;
    width: 2px;
    height: 6px;
    background: var(--color-text-muted);
    left: 50%;
    transform-origin: 50% 250px; /* calculated relative to 500px clock dimension */
    opacity: 0.3;
}
.tick.five-min {
    width: 3px;
    height: 10px;
    background: var(--color-text-secondary);
    opacity: 0.6;
}
.tick.active-tick {
    opacity: 0.9;
    background: var(--color-cyan);
    box-shadow: 0 0 6px var(--color-cyan);
}

/* Custom Dial Number Labels */
.labels-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
}

.dial-label {
    position: absolute;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: var(--transition-smooth);
    user-select: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    background: transparent;
    z-index: 10;
}
.dial-label.active-label {
    color: var(--color-cyan);
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow: 0 0 10px var(--color-cyan-glow), 0 2px 4px rgba(0,0,0,0.5);
}
.dial-label.yellow-label {
    color: #fbbf24;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.25), 0 2px 4px rgba(0,0,0,0.5);
}
.dial-label.yellow-label.active-label {
    color: #fef08a;
}

/* SVG overlay for arrows */
.clock-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none; /* Let clicks pass through to drag hand */
}

/* SVG path animations */
.arrow-path {
    stroke-linecap: round;
    transition: stroke 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
}

.arrow-path.active {
    filter: url(#glow);
    animation: arrow-flow 1.5s linear infinite;
}

@keyframes arrow-flow {
    0% {
        stroke-dashoffset: 24;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Hands configuration */
.minute-hand-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 6;
    pointer-events: none; /* Make container click-through */
    transition: transform 0.05s linear; /* Smooth micro-step updates */
}

/* The actual visual hand line */
.minute-hand {
    position: absolute;
    width: 4px;
    height: 44%;
    background: linear-gradient(to top, rgba(236, 72, 153, 0.4), var(--color-magenta) 70%, #ffffff 100%);
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    transform-origin: bottom center;
    box-shadow: 
        0 0 10px var(--color-magenta-glow),
        0 0 25px var(--color-magenta-glow);
}

/* Invisible grab area for manual rotation */
.minute-hand-grab-handle {
    position: absolute;
    width: 32px;
    height: 48%;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    cursor: grab;
    pointer-events: auto; /* Active handle */
    z-index: 8;
}

.minute-hand-grab-handle:active {
    cursor: grabbing;
}

/* Center pivot visual cap */
.clock-pivot {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #1e293b;
    border: 3px solid #334155;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
    pointer-events: none;
}
.clock-pivot-inner {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px #ffffff;
}

/* Floating HUD badge for status */
.floating-status {
    margin-top: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    transition: var(--transition-smooth);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-secondary);
    position: relative;
}
.status-indicator.live {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-green 2s infinite;
}
.status-indicator.sim {
    background: #eab308;
    box-shadow: 0 0 8px #eab308;
    animation: pulse-yellow 1.5s infinite;
}
.status-indicator.manual {
    background: var(--color-magenta);
    box-shadow: 0 0 8px var(--color-magenta);
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes pulse-yellow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.status-divider {
    color: var(--color-text-muted);
}

.status-time {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Upcoming Status Card HUD */
.upcoming-status-card {
    margin-top: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 0.8rem 1.4rem;
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    min-width: 280px;
    transition: var(--transition-smooth);
}

.upcoming-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-cyan);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.upcoming-badge i {
    animation: rotate-hourglass 4s linear infinite;
}

@keyframes rotate-hourglass {
    0%, 90% { transform: rotate(0deg); }
    100% { transform: rotate(180deg); }
}

.upcoming-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.upcoming-node-row, .incoming-paths-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upcoming-node-row .label-text, .incoming-paths-row .label-text {
    color: var(--color-text-secondary);
}

.upcoming-node-val {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-cyan);
    text-shadow: 0 0 6px var(--color-cyan-glow);
}

.upcoming-node-val.yellow-type {
    color: #fbbf24;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.incoming-nodes-list {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Pulsing highlight for next node */
.dial-label.upcoming-label {
    animation: label-pulse 2s infinite ease-in-out;
}

.dial-label.upcoming-label.yellow-label {
    animation: label-pulse-yellow 2s infinite ease-in-out;
}

@keyframes label-pulse {
    0%, 100% { text-shadow: 0 0 4px rgba(6, 182, 212, 0.2), 0 2px 4px rgba(0,0,0,0.5); transform: translate(-50%, -50%) scale(1); }
    50% { text-shadow: 0 0 12px var(--color-cyan), 0 2px 4px rgba(0,0,0,0.5); transform: translate(-50%, -50%) scale(1.15); color: #ffffff; }
}

@keyframes label-pulse-yellow {
    0%, 100% { text-shadow: 0 0 4px rgba(251, 191, 36, 0.25), 0 2px 4px rgba(0,0,0,0.5); transform: translate(-50%, -50%) scale(1); }
    50% { text-shadow: 0 0 15px #fbbf24, 0 2px 4px rgba(0,0,0,0.5); transform: translate(-50%, -50%) scale(1.18); color: #fef08a; }
}

/* ==========================================================================
   CONFIGURATOR SIDEBAR PANEL
   ========================================================================= */
.sidebar-panel {
    width: 420px;
    height: 100vh;
    background: var(--glass-bg);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: var(--transition-smooth);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo-area h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--color-text-primary);
}

.logo-area p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.sidebar-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section styling */
.config-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1.2rem;
}

.config-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-section h3 i {
    color: var(--color-cyan);
    font-size: 0.95rem;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.section-title-row h3 {
    margin-bottom: 0;
}

.count-badge {
    background: rgba(255, 255, 255, 0.07);
    color: var(--color-text-secondary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.section-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* SECTION 1: Controllers & Buttons */
.control-row-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--color-text-secondary);
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.mode-btn i {
    font-size: 1.1rem;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.mode-btn.active {
    background: var(--color-indigo);
    border-color: var(--color-indigo);
    color: #ffffff;
    box-shadow: 0 0 15px var(--color-indigo-glow);
}

/* Form group for simulation / manual */
.manual-controls-group, .sim-controls-group {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    color: var(--color-text-secondary);
}

.time-readout, .speed-readout {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-cyan);
}

/* Custom styled ranges */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    outline: none;
    margin: 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-cyan);
    box-shadow: 0 0 6px var(--color-cyan-glow);
    cursor: pointer;
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#manualMinuteSlider::-webkit-slider-thumb {
    background: var(--color-magenta);
    box-shadow: 0 0 6px var(--color-magenta-glow);
}

.control-help-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    line-height: 1.3;
}

.btn-play-pause-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.sim-action-btn {
    background: var(--color-cyan);
    border: none;
    color: #030712;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.sim-action-btn:hover {
    opacity: 0.9;
    box-shadow: 0 0 10px var(--color-cyan-glow);
}

.sim-action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sim-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* SECTION 2: Numbers Grid (Accordion style) */
.accordion-header {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition-smooth);
}
.accordion-header:hover {
    background: rgba(255, 255, 255, 0.08);
}
.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}
.accordion-content.open {
    max-height: 400px;
    padding-top: 0.8rem;
}

.quick-select-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--color-cyan);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    transition: var(--transition-fast);
}
.text-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 6px var(--color-cyan-glow);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px;
    border-radius: 8px;
}

.num-grid-btn {
    aspect-ratio: 1;
    border-radius: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.num-grid-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.num-grid-btn.active {
    background: var(--color-cyan);
    color: #030712;
    font-weight: 800;
    box-shadow: 0 0 8px var(--color-cyan-glow);
}

/* SECTION 3: Connection lines (arrows list) */
.add-connection-form {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.input-pair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.input-pair label {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.input-pair input {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    padding: 0.4rem;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
}
.input-pair input:focus {
    border-color: var(--color-cyan);
    outline: none;
    box-shadow: 0 0 5px var(--color-cyan-glow);
}

.arrow-between-inputs {
    align-self: center;
    padding-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.add-btn {
    background: var(--color-cyan);
    border: none;
    color: #030712;
    border-radius: 6px;
    font-weight: 700;
    height: 33px;
    padding: 0 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition-fast);
}
.add-btn:hover {
    opacity: 0.9;
    box-shadow: 0 0 8px var(--color-cyan-glow);
}

.arrows-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.arrows-list {
    list-style: none;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.arrow-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-fast);
}
.arrow-item:last-child {
    margin-bottom: 0;
}
.arrow-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.arrow-item-conn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.arrow-item-conn span.num {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-text-primary);
}

.arrow-item-conn span.active-node {
    color: var(--color-cyan);
    text-shadow: 0 0 8px var(--color-cyan-glow);
    font-weight: 700;
}

.arrow-item-conn i {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.arrow-item-conn.item-active span.num {
    background: var(--color-cyan-glow);
    border: 1px solid var(--color-cyan);
}

.delete-arrow-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}
.delete-arrow-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* SECTION 4: Styling details */
.setting-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1rem;
}
.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.setting-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--color-cyan);
}

.color-pickers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.color-picker-item {
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.color-picker-item label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
    text-align: center;
}

.color-picker-wrapper {
    position: relative;
    width: 40px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-picker-wrapper input[type="color"] {
    position: absolute;
    top: -5px; left: -5px;
    width: 50px; height: 38px;
    border: none;
    cursor: pointer;
    background: transparent;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.footer-reset-btn {
    background: transparent;
    border: 1px dashed rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    width: 100%;
    justify-content: center;
}
.footer-reset-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.attribution {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }
    
    .clock-workspace {
        padding: 3rem 1.5rem;
        height: 620px;
        min-height: auto;
        flex: none;
    }
    
    .sidebar-panel {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-scroll-content {
        overflow-y: visible;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .clock-workspace {
        padding: 1.5rem 1rem;
        height: 480px;
    }
    .clock-display-card {
        width: min(350px, 92vw);
        height: min(350px, 92vw);
    }
    .clock-outer-ring {
        padding: 10px;
    }
    .dial-label {
        font-size: 0.9rem;
    }
    .dial-label.active-label {
        font-size: 1rem;
    }
    .tick {
        transform-origin: 50% 150px; /* Adjust transform-origin center mapping for smaller sizes if static, but app.js will dynamically size positions! */
    }
}
