/* Start/Reset and Running Controls Layout */
.start-reset-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.start-reset-container .button-wrapper {
    flex: 1;
    min-width: 0;
}

.start-reset-container #startBtn {
    flex: 1;
    margin-top: 0;
    min-width: 0;
}

.start-reset-container .running-controls {
    flex: 1;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.start-reset-container .running-controls button {
    flex: 1;
    margin-top: 0;
}

/* Reset Button */
.start-reset-container .reset-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(221, 132, 72, 0.15);
    border: 1px solid rgba(221, 132, 72, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(221, 132, 72, 0.2);
}

.start-reset-container .reset-btn:hover {
    background: rgba(221, 132, 72, 0.25);
    border-color: rgba(221, 132, 72, 0.5);
    box-shadow: 0 6px 24px rgba(221, 132, 72, 0.4);
    transform: translateY(-2px);
}

.start-reset-container .reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(221, 132, 72, 0.3);
}

.start-reset-container .reset-btn svg {
    width: 24px;
    height: 24px;
    color: #ffa366;
    flex-shrink: 0;
}

/* Primary Buttons */
button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #dd8448 0%, #c96d3a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(221, 132, 72, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, #ffa366 0%, #dd8448 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(221, 132, 72, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(221, 132, 72, 0.4);
}

/* Running Controls Container */
.running-controls {
    display: flex;
    gap: 12px;
}

.running-controls button {
    flex: 1;
}

/* Specific Buttons */
#startBtn,
#stopBtn,
#pauseBtn {
    margin-top: 0;
}

#pauseBtn {
    background: linear-gradient(135deg, #dd8448 0%, #c96d3a 100%);
}

#pauseBtn:hover {
    background: linear-gradient(135deg, #ffa366 0%, #dd8448 100%);
}

#stopBtn {
    background: linear-gradient(135deg, #c94848 0%, #a63a3a 100%);
}

#stopBtn:hover {
    background: linear-gradient(135deg, #ff6666 0%, #c94848 100%);
}

/* Button Wrapper Tooltip Container */
.button-wrapper {
    position: relative;
    width: 100%;
}

/* Mode Switch Controls */
.mode-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: 44px;
    padding: 0 16px;
    background: rgba(221, 132, 72, 0.2);
    border: 1px solid rgba(221, 132, 72, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mode-switch button:hover {
    background: rgba(221, 132, 72, 0.3);
    border-color: rgba(221, 132, 72, 0.5);
    box-shadow: 0 4px 16px rgba(221, 132, 72, 0.3);
}

.mode-switch button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Pill Button Styles */
.pill-button {
    display: inline-block;
    position: relative;
    padding: 3px 4px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    color: #a0a0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 0;
}

.pill-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(221, 132, 72, 0.2);
}

.pill-button-input {
    display: none;
    visibility: hidden;
}

.pill-button-highlight {
    transform: translate(0, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 50%;
    left: 4px;
    height: 28px;
    background: linear-gradient(135deg, #dd8448 0%, #c96d3a 100%);
    border-radius: 22px;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(221, 132, 72, 0.4);
}

.pill-button-selection {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding: 0.5em 1em;
    cursor: pointer;
    z-index: 2;
    font-weight: 600;
    user-select: none;
    -webkit-user-select: none;
}

.pill-button-selection_active {
    color: #ffffff;
}

/* Interval/Input Controls */
.interval-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.interval-control label {
    font-size: 13px;
    font-weight: 600;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.interval-control input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    transition: all 0.2s ease;
}

.interval-control input[type="number"]:focus {
    outline: none;
    border-color: rgba(221, 132, 72, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(221, 132, 72, 0.1);
}

.interval-control input[type="number"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Inputs & Selects (shared) */
.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

select,
input {
    padding: 10px 2px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 42px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    transition: all 0.2s ease;
}

select:focus,
input:focus {
    outline: none;
    border-color: rgba(221, 132, 72, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(221, 132, 72, 0.1);
}

select option {
    background: #1a1a2e;
    color: #e0e0e0;
}

select {
    flex: 1;
    margin-right: 5px;
}

input {
    flex: 1;
}

/* Explanation Toggle Button */
#explanationToggle {
    width: 100%;
    margin-top: 32px;
    margin-bottom: auto;
    border-radius: 0 0 24px 24px;
    background: rgba(30, 30, 50, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}