/* ========================================= */
/* BASE & GLOBAL STYLES                      */
/* ========================================= */

body {
    margin: 0;
    padding: 0;
    /* Overall page padding for small screens, accounting for global bar */
    font-family: 'Courier New', Courier, monospace;
    background-color: #00ffae;
    /* Default Light Theme Background */
    color: #000;
    box-sizing: border-box;
    /* Crucial for responsive sizing */
}

.app-title {
    /* For the main "TimerFreak: Timers..." paragraph */
    margin-top: .5rem;
    padding: 0 0.5rem;
    /* Matches body's side padding */
}

/* ========================================= */
/* DARK THEME OVERRIDES                      */
/* ========================================= */

body.dark-theme {
    background-color: #333;
    color: #fff;
}

body.dark-theme .bar-container {
    background-color: #555;
    
}
body.dark-theme .bar-container {
background: #4f4f4f linear-gradient(#494949, #474747 20%, #494949 80%, #4f4f4f);
}


body.dark-theme .btn-solid-3d[data-disabled="true"],
body.dark-theme .btn-solid-3d.disabled-link {
    background: #444;
    color: #777;
    border-color: #666;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #555, 0 0 0 1px #444, 0 3px 0 1px #444, 0 10px 20px rgba(0, 0, 0, 0);
    text-shadow: none;
}

body.dark-theme .btn-solid-3d[data-disabled="true"]:active,
body.dark-theme .btn-solid-3d.disabled-link:active {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 1px 20px rgba(0, 0, 0, 0), 0 2px 0 #555, 0 0 0 1px #444, 0 2px 0 1px #444, 0 10px 20px rgba(0, 0, 0, 0);
}

body.dark-theme #text-bottom hr {
    border-top-color: #444;
}

/* ========================================= */
/* GENERAL LAYOUT & UTILITIES                */
/* ========================================= */

.flex-container {
    display: flex;
    flex-wrap: wrap;
    /* Allows main sections to wrap */
    align-content: center;
    justify-content: center;
}

.flex-container-internal {
    background-color: inherit;
    /* Inherit from body or parent for theme consistency */
    box-sizing: border-box;
    /* Generic for flex items, specific padding handled by subclasses */
}

/* For the main content blocks (Create New Timer & Most Used Sequences) */
.flex-container-main-content {
    background-color: white;
    width: 100%;
    /* Default to full width for mobile */
    max-width: 480px;
    /* Optional: limit width on larger mobile devices for readability */
    margin: 0 auto 1rem auto;
    /* Center block, add margin below */
    padding: 1rem;
    padding-top: 0;
    min-width: unset;
}

/* Honeypot field - must be hidden */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* ========================================= */
/* FORM: CREATE NEW TIMER                    */
/* ========================================= */

.timer-form {
    overflow: hidden;
    /* For animation */
    transition: all 0.3s ease-out;
    /* For animation */
    margin-bottom: 1rem;
    border: 0px solid #ccc;
    /* Default border */
}

/* Animation for new timers (applies when `addTimer` is pressed) */
.timer-form.new-timer-form {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    border: none;
}

/* Animation for deleting timers */
.timer-form.deleting {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0 !important;
    border: none !important;
}

.timer-form label {
    font-size: 1rem;
}

/* Specific flex container inside each timer-form for digits and textarea/table */
.timer-form>.flex-container {
    flex-direction: row;
    /* Force horizontal layout ALWAYS for these two internal divs */
    flex-wrap: nowrap;
    /* CRITICAL: Prevent wrapping to a new line */
    align-items: flex-start;
    /* Align content at the top */
    gap: 1em;
    /* Space between the digit group and the textarea/table group */
    width: 100%;
    /* Ensure the flex container itself fills available width */
}

/* First child of `.timer-form > .flex-container` (the digits section) */
.timer-form>.flex-container>.flex-container-internal:first-child {
    flex-shrink: 0;
    /* Prevent from shrinking */
    flex-grow: 0;
    /* Prevent from growing */
    width: fit-content;
    /* Content determines width */
    margin-left: 0 !important;
    /* Override potential inherited/inline margin */
    padding: 0;
    /* Remove internal padding from this container */
}

/* Ensure timer digits are left-aligned inside their flexible container */
.timer-digits {
    display: flex;
    /* Inherited but good to be explicit here */
    justify-content: flex-start;
    /* Align digits left */
    font-family: monospace;
    font-size: 1.5em;
    margin: 0;
    /* Clear lingering margins */
}

.digit-group {
    display: flex;
    flex-direction: column;
    /* Stack buttons vertically */
    align-items: center;
    /* Center input and labels horizontally */
    text-align: center;
    margin: 0;
    /* Clear internal group margins */
}

.input-label-row {
    display: flex;
    align-items: center;
    margin: 0;
}

.digit-button {
    width: 1.2em;
    height: 1em;
    line-height: .8em;
    font-size: 1.5em;
    padding: 0;
    margin: 0;
    border: none;
    background-color: #f0f0f0;
    cursor: pointer;
    display: block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.digit-button:active {
    background-color: #ddd;
}

.digit-input {
    width: 2em;
    height: 1.5em;
    font-size: 1.3em;
    font-family: monospace;
    text-align: center;
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
}

/* Hide arrows from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    width: 1.5em;
    /* Specific width to manage visual size */
}

/* Second child of `.timer-form > .flex-container` (the textarea/table section) */
.timer-form>.flex-container>.flex-container-internal:last-child {
    flex-grow: 1;
    /* Allows this container to take all remaining space */
    min-width: 0;
    /* Allows it to shrink if needed (prevents overflow on small screens) */
    padding: 0;
    /* Remove internal padding from this container */
}

textarea[name="timer_name[]"] {
    width: 100%;
    /* Fill 100% of its parent's (flex-grow:1) width */
    max-width: 100%;
    /* Ensures it doesn't break out of bounds */
    min-height: 2em;
    /* Maintains a reasonable height */
    height: auto;
    /* Allows natural height based on content */
    resize: vertical;
    /* User can only resize vertically */
    box-sizing: border-box;
    /* Includes padding and border in width */
    margin-bottom: 1em;
    /* Add space below textarea */
    padding: .5em;
    /* Consistent padding inside input */
    border: 1px solid #ccc;
    border-radius: 3px;
    /* Slight adjustment from original */
    font-size: .9em;
    /* Slight adjustment from original */
    font-family: 'Courier New', Courier, monospace;
}

.timer-form>.flex-container>.flex-container-internal:last-child table {
    width: 100%;
    /* Make the table take full width */
    border-collapse: collapse;
    /* Cleaner table rendering */
}

input[type="text"][name="sequence_name"] {
    /* Main sequence name input */
    width: 100%;
    /* Make it fill its parent */
    box-sizing: border-box;
    /* Include padding and border in the width */
    margin-top: 1rem;
    padding: .5em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

.validation-message {
background-color: #f8ffb7;
color: red;
margin-top: .5rem;
padding: .5rem;

}

/* ========================================= */
/* BUTTONS & CONTROLS                        */
/* ========================================= */

.btn-solid-3d {
    border: 1px solid #0f988e;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    padding: 0 1em;
    text-align: center;
    display: inline-block;
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 3px;
    outline: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    top: -3px;
    /* Simulates depth */
    transform: translateY(0px);
    position: relative;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #0f988e, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    background: #15ccbe;
    color: white;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
    transition: 25ms all;
    box-sizing: border-box;
    vertical-align: middle;
    text-decoration: none;
}


.btn-solid-3d:active {
    transform: translateY(3px);
    /* Simulates press down */
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #0f988e, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

/* Disabled button state */
.btn-solid-3d[data-disabled="true"],
.btn-solid-3d.disabled-link {
    cursor: default;
    background: #eee;
    color: #bbb;
    border-color: #bbb;
    text-shadow: 0 1px 0 white;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 1), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #bbb, 0 0 0 1px white, 0 3px 0 1px white, 0 10px 20px rgba(0, 0, 0, 0);
    top: -3px;
    transition: none;
    pointer-events: none;
    /* Disable interaction entirely */
}

.btn-solid-3d[data-disabled="true"]:active,
.btn-solid-3d.disabled-link:active {
    transform: translateY(0px);
    /* Stays put when "pressed" while disabled */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 1), inset 0 1px 20px rgba(0, 0, 0, 0), 0 2px 0 #bbb, 0 0 0 1px white, 0 2px 0 1px white, 0 10px 20px rgba(0, 0, 0, 0);
}

/* Button size modifiers */
.btn-fixed-width {
    min-width: 100px;
    padding: 0 5px;
}

.btn-solid-3d.emoji-btn {
    padding: 0;
    width: 30px;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-solid-3d.btn-small {
    height: 25px;
    line-height: 25px;
    font-size: 12px;
    padding: 0 0.8em;
    margin-right: 0.5em;
}

/* Preview / Delete buttons (Specific icon-like buttons) */
.preview-sound-btn,
.delete-timer-btn {
    background: transparent;
    border: none;
    text-decoration: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    /* For better emoji alignment */
    cursor: pointer;
    vertical-align: middle;
}

.preview-sound-btn {
    color: inherit;
}

/* Keep original color */
.delete-timer-btn {
    color: rgb(231, 95, 95);
    /* Specific red for delete */
    font-weight: bold;
    float: right;
    /* Stays to the right */
    display: none;
    /* Controlled by JS, as original code does */
    transition: opacity 0.3s ease;
}

/* Color Input Styling */
input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    /* Remove default browser margin */
    cursor: pointer;
    vertical-align: middle;
    /* Align better with other form elements */
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 1px solid #ccc;
    border-radius: 3px;
}

input[type="color"]::-moz-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-moz-color-swatch {
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Control section styles (on timer.html usually) */
#controls {
    padding: 1em 0.5rem;
    /* Consistent side padding with body */
}

#controls a,
#controls input[type="number"] {
    margin: 0.25rem 0;
    /* Vertically stack but horizontally clear */
}

/* Specific styles for loop count input buttons */
#loopCountGroup {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px;
    vertical-align: middle;
}

#loopCountGroup .digit-button {
    height: 1.5em;
    line-height: 1.5em;
    font-size: 1em;
    width: 1.5em;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loopCountGroup input {
    height: 1.5em;
    font-size: 1em;
    vertical-align: middle;
    border: none;
    text-align: center;
    width: 60px;
    background-color: transparent;
}


/* --- BUTTON COLOR PALETTE --- */
.btn-default {
    border-color: #0f988e;
    background: #15ccbe;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #0f988e, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-default:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #0f988e, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

.btn-darkgreen {
    border-color: #27ae60;
    background: #2ecc71;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #27ae60, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-darkgreen:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #27ae60, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

.btn-orange {
    border-color: #d35400;
    background: #e67e22;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #d35400, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-orange:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #d35400, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

.btn-red {
    border-color: #A00000;
    background: #E00000;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #A00000, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-red:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #A00000, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

.btn-blue {
    border-color: #2980b9;
    background: #3498db;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #2980b9, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-blue:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #2980b9, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}

.btn-gray {
    border-color: #7f8c8d;
    background: #95a5a6;
    box-shadow: inset 0 30px 30px -15px rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .3), inset 0 1px 20px rgba(0, 0, 0, 0), 0 3px 0 #7f8c8d, 0 3px 2px rgba(0, 0, 0, .2), 0 5px 10px rgba(0, 0, 0, .1), 0 10px 20px rgba(0, 0, 0, .1);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}

.btn-gray:active {
    box-shadow: inset 0 16px 2px -15px rgba(0, 0, 0, 0), inset 0 0 0 1px rgba(255, 255, 255, .15), inset 0 1px 20px rgba(0, 0, 0, .1), 0 0 0 #7f8c8d, 0 0 0 2px rgba(255, 255, 255, .5), 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
}


/* ========================================= */
/* TIMER DISPLAY (ON timer.html)             */
/* ========================================= */

.bar-container {
    background: #ddd linear-gradient(#d6d6d6, #dddddd 20%, #dddddd 80%,#d6d6d6);
    margin-bottom: 0.5rem;
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(192, 192, 192, 0.5);
    border-bottom: 1px solid rgba(192, 192, 192, 0.5);
}

.bar {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    transition: width 0.05s linear;
    z-index: 1;
}

.overlay,
.timer-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Allows clicks to pass through */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.overlay-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 3px;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px #000000;
    box-shadow: 0px 4px 0px #0000001d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.timer-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.timer-countdown {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.timer-info {
    color: #888;
    font-size: 0.9rem;
    text-shadow: none;
}

.timer-info-name {
    font-weight: normal;
    margin-bottom: 0.1rem;
}

.timer-info-duration {
    font-size: 0.8rem;
}

/* ========================================= */
/* GLOBAL ELEMENTS & UTILITIES               */
/* ========================================= */

#globalBarContainer {
    background-color: black;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    z-index: 1000;
}

.global-bar {
    background-color: yellow;
    height: 100%;
    width: 0%;
    transition: width 0.05s linear;
}

#sequenceName {
    margin: 0;
    margin-top: 1rem;
    margin-left: 0.5rem;
    /* Consistent with overall body padding */
    padding: 0;
}

#totalDurationDisplay {
    margin-top: 1em;
    margin-bottom: 1em;
    font-weight: bold;
    color: #333;
}

/* ========================================= */
/* MOST USED SEQUENCES                       */
/* ========================================= */

.most-used-sequences ul {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.most-used-sequences ul li {
    display: block;
    list-style-type: none;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.most-used-sequences .view-sequence-link {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

.most-used-sequences .view-sequence-link:hover {
    text-decoration: underline;
}

/* ========================================= */
/* FOOTER & ABOUT PAGE                       */
/* ========================================= */

#footer {
    width: 100%;
    clear: both;
    text-align: center;
    /* Side padding applied via body, so just top/bottom here */
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.about-text {
    background-color: white;
    /* Stays white for readability */
    /* Side padding applied via body/media query */
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.about-text p {
    line-height: 2em;
}

#text-bottom {
    /* Top/bottom padding from default HTML/Jinja */
    padding: 2.5rem;
    /* Remove horizontal padding here as body covers it */
}

#text-bottom p {
    line-height: 2em;
    color: gray;
}

#text-bottom a {
    font-weight: bold;
    text-decoration: underline;
}

/* ========================================= */
/* ADVANCED CONTROLS (timer.html)            */
/* ========================================= */

#advancedControls {
    padding: 0;
    /* Base padding set here, adjusted when visible */
    border: 0px solid #ccc;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.00);
    /* Nearly transparent */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.03s ease-out, opacity 0.3s ease-out, padding 0.03s ease-out;
}

#advancedControls.show {
    max-height: 500px;
    /* Sufficient height to show content */
    opacity: 1;
    padding: 0.5rem;
    /* Apply padding when shown */
}

#jumpButtons a {
    margin-top: 10px;
    /* Space between jump buttons */
}


/* ========================================= */
/* MEDIA QUERIES (Responsiveness)            */
/* ========================================= */

/* Tablet & Up (768px and up) */
@media (min-width: 768px) {
    body {
       
    }

    .app-title {
        padding: 0 1rem;
    }

    /* Main layout columns: side-by-side */
    .flex-container {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .flex-container-main-content {
        width: 48%;
        /* Roughly half width for each main block */
        margin: 0 1% 1rem 1%;
        /* Margin between blocks and at the bottom */
        min-width: 350px;
        /* Prevent blocks from becoming too narrow */
        max-width: unset;
        /* Remove previous mobile max-width limit */
    }

    #footer,
    .about-text {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #controls {
        padding: 1em 1rem;
    }
}

/* Desktop & Up (1024px and up) */
@media (min-width: 1024px) {
    .flex-container-main-content {
        max-width: 550px;
        /* Cap max width for aesthetics on very large screens */
    }
}