* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: white;
    font-family: Roboto, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overscroll-behavior-y: contain;
}

#teleprompter {
    flex: 1;
    width: 100vw;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

#editableText {
    width: 100%;
    height: 100%;
    outline: none;
    border: none;
    background: none;
    color: white;
    font-size: 24px;
    line-height: 1.5;
    letter-spacing: 0px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
    padding-bottom: 100px; 
}

.mirrored {
    transform: scaleX(-1);
}

#controls {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #1d201b;
    box-shadow: 0 0px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

#controls.hidden {
    transform: translateY(100%);
}

/* STANDARDIZED BUTTON SYSTEM */
.button, .dropdown {
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: auto;
}

.button:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
}

.button.active {
    background: linear-gradient(to right, #9b9225, #807922);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(1px);
}

/* Icon-only buttons - circular */
.button-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    flex-shrink: 0;
}

/* Special larger play button */
#playButton {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    padding: 0;
}

#playButton .play-icon {
    font-size: 28px;
}

/* Font controls header - consistent with other buttons */
.font-controls-header {
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    height: 40px;
}

.font-controls-header:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-1px);
}

/* File menu toggle - compact design */
.file-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    margin-bottom: 8px;
    height: 40px;
    min-width: auto;
    width: auto;
}

.file-menu-toggle:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.file-menu-toggle .dropdown-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

/* Marker menu toggle - consistent sizing */
.marker-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    height: 40px;
    min-width: auto;
    width: auto;
}

.marker-menu-toggle:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.marker-menu-toggle .dropdown-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

/* Dialog buttons - consistent with main buttons */
.dialog-buttons .button {
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dialog-buttons .button:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-1px);
}

/* Control icons - standardized circular buttons */
.control-icon {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.control-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* Toggle button consistency */
#toggleButton {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid white;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    /* No hover animations */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .button, .dropdown {
        padding: 8px 12px;
        font-size: 14px;
        height: 36px;
    }
    
    .file-menu-toggle {
        padding: 8px 10px;
        height: 36px;
        font-size: 14px;
    }
    
    .marker-menu-toggle {
        padding: 8px 10px;
        height: 36px;
        font-size: 14px;
        min-width: auto;
    }
    
    .font-controls-header {
        padding: 8px 12px;
        font-size: 14px;
        height: 36px;
    }
    
    .control-icon, #toggleButton {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
        font-size: 18px;
    }
    
    #playButton {
        width: 44px;
        height: 44px;
    }
}

.curve-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.curve-preset {
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.curve-preset:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.curve-preset.active {
    background: linear-gradient(to right, #9b9225, #807922);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(1px);
}

.curve-preset.active:hover {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.controls-header {
    position: absolute;
    top: -40px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 101;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.control-icons {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 50;
    display: flex;
    gap: 10px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Linked status indicator (top-right) */
.linked-indicator {
    position: relative; /* inline inside controls bar */
    z-index: 2001;
    display: none;
}

.linked-indicator .button {
    background: linear-gradient(to right, #2a2d28, #3a3d38);
    color: #ffcc00;
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 140px;
}

.linked-indicator.open .linked-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.linked-menu {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 8px;
    background: rgba(29, 32, 27, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 114, 21, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    min-width: 240px;
}

.linked-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.linked-menu-item:hover {
    background: rgba(123, 114, 21, 0.2);
}

/* Toggle button positioning and flip animation */
#toggleButton {
    position: absolute;
    bottom: 10px;
    left: 30%;
    transform: translate(-100%, 0);
}

#toggleButton.flipped {
    transform: translate(-100%, 0) rotate(180deg);
}

/* Font size input styling moved to slider section */

.dropdown {
    width: 180px;
}

.dropdown:hover {
    opacity: 0.8;
}

.material-icons {
    font-size: 36px;
    color: white;
}

.read-marker {
    display: block;
    font-weight: bold;
    color: #ffcc00;
    margin: 10px 0;
    padding: 5px;
    border-radius: 5px;
    background-color: rgba(123, 114, 21, 0.3);
}

#countdownOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#countdownDisplay {
    font-size: 120px;
    color: #ffcc00;
    font-weight: bold;
}

#lineIndicator {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 204, 0, 0);
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 768px) {
    .slider {
        width: 120px;
    }
    
    #speedSlider {
        width: 240px;
    }
    
/* Mobile button styles moved to standardized button system above */
    
    #controls {
        padding: 10px;
        gap: 8px;
    }
}

#autosaveNotification {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(123, 114, 21, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

#autosaveNotification.visible {
    opacity: 1;
}

.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1d201b;
    border: 2px solid #7b7215;
    border-radius: 10px;
    padding: 20px;
    min-width: 300px;
    max-width: 80%;
    z-index: 1000;
    display: none;
}

.dialog h2 {
    color: #ffcc00;
    margin-top: 0;
}

#savedScriptsList {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
}

.saved-script-item {
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    background-color: #2a2d28;
    display: flex;
    justify-content: space-between;
}

.saved-script-item:hover {
    background-color: #3a3d38;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.dialog-buttons .button {
    min-width: 120px;
    flex-shrink: 0;
    white-space: nowrap;
    /* Enhanced button styling applied from standardized button system above */
    background: linear-gradient(to right, #7b7215, #605912);
    color: black;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dialog-buttons .button:hover {
    background: linear-gradient(to right, #9b9225, #807922);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.shortcuts-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.shortcuts-list li {
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.key {
    background-color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    font-family: monospace;
}

.curve-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

#curveCanvas {
    background-color: #2a2d28;
    border: 1px solid #7b7215;
    border-radius: 5px;
    margin: 10px 0;
}

.curve-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.curve-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.curve-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.curve-controls input {
    background: #1d201b;
    color: white;
    border: 1px solid #7b7215;
    border-radius: 5px;
    text-align: center;
    padding: 5px;
    width: 60px;
}

.control-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 90%;
    max-height: 600px;
    background-color: #1d201b;
    border: 2px solid #7b7215;
    border-radius: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: auto;
}

.control-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #2a2d28;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: move;
}

.control-window-title {
    margin: 0;
    color: #ffcc00;
    font-size: 18px;
}

.control-window-buttons {
    display: flex;
    gap: 10px;
}

.control-window-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.control-window-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

/* Font Controls Group Styles */
.font-controls-group {
    position: relative;
    background: rgba(40, 44, 36, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

/* Font controls header styles moved to standardized button system above */

.font-controls-header .expand-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.font-controls-group.expanded .expand-icon {
    transform: rotate(180deg);
}

.font-controls-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(29, 32, 27, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 114, 21, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    margin-bottom: 8px;
    min-width: 280px;
    max-width: 400px;
    padding: 20px;
    box-sizing: border-box;
}

.font-controls-group.expanded .font-controls-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.font-controls-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

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

/* Responsive adjustments for font controls */
@media (max-width: 768px) {
    .font-controls-row {
        gap: 10px;
    }
    
    .font-controls-header {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .font-controls-group.expanded .font-controls-content {
        padding: 15px;
    }
}

/* File Management Dropdown Styles */
.file-menu-dropdown {
    position: relative;
    display: inline-block;
}

/* File menu toggle styles moved to standardized button system above */

.file-menu-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.file-menu-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(29, 32, 27, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 114, 21, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    margin-bottom: 8px;
    min-width: 200px;
}

.file-menu-dropdown.open .file-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.file-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    justify-content: flex-start;
}

.file-menu-item:first-child {
    border-radius: 15px 15px 0 0;
}

.file-menu-item:last-child {
    border-radius: 0 0 15px 15px;
}

.file-menu-item:hover {
    background: rgba(123, 114, 21, 0.2);
    transform: none;
    box-shadow: none;
}

.file-menu-item:active {
    background: rgba(123, 114, 21, 0.3);
}

.file-menu-item .material-symbols-outlined {
    font-size: 22px;
    color: #7b7215;
}

.file-menu-item span:last-child {
    font-weight: 500;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 16px;
}

/* Responsive adjustments for file menu */
@media (max-width: 768px) {
    .file-menu-toggle {
        min-width: 100px;
        padding: 12px 18px;
        font-size: 16px;
    }
    
    .file-menu-content {
        min-width: 200px;
    }
    
    .file-menu-item {
        padding: 15px 18px;
        font-size: 16px;
    }
    
    .file-menu-item .material-symbols-outlined {
        font-size: 20px;
    }
}

/* Marker Jump Dropdown Styles */
.marker-menu-dropdown {
    position: relative;
    display: inline-block;
}

/* Marker menu toggle styles moved to standardized button system above */

.marker-menu-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.marker-menu-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(29, 32, 27, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(123, 114, 21, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    margin-bottom: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.marker-menu-dropdown.open .marker-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.marker-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #ffcc00;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    border-radius: 0;
    box-shadow: none;
    justify-content: flex-start;
}

.marker-menu-item:first-child {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.marker-menu-item:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.marker-menu-item:hover {
    background: rgba(123, 114, 21, 0.2);
    color: white;
    transform: none;
    box-shadow: none;
}

.marker-menu-item:active {
    background: rgba(123, 114, 21, 0.4);
}

.marker-menu-item .material-symbols-outlined {
    font-size: 20px;
    color: #7b7215;
}

.marker-menu-item span:last-child {
    flex: 1;
    font-weight: 500;
}

.marker-menu-item[data-value=""] {
    color: #888;
    cursor: default;
}

.marker-menu-item[data-value=""]:hover {
    background: transparent;
    color: #888;
}

@media (max-width: 768px) {
    .marker-menu-toggle {
        min-width: 120px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .marker-menu-content {
        min-width: 180px;
    }
    
    .marker-menu-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .marker-menu-item .material-symbols-outlined {
        font-size: 18px;
    }
}

/* Marker Creation Dialog Modern Layout */
#markerCreationDialog.dialog {
    min-width: 340px;
    max-width: 400px;
    width: 95vw;
    padding: 32px 28px 24px 28px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

#markerCreationDialog h2 {
    color: #ffcc00;
    margin: 0 0 18px 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.marker-creation-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 0;
}

.marker-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#markerNameInput {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1.5px solid #7b7215;
    background: #23251e;
    color: #fff;
    margin-top: 2px;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 18px;
    padding: 8px 0 4px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    min-height: 48px;
    width: 100%;
    justify-items: center;
}

.marker-preview {
    margin-top: 8px;
    margin-bottom: 0;
}

.preview-text {
    margin-top: 4px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    min-height: 32px;
    display: inline-block;
    background: #ffcc00;
    color: #222;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#markerCreationDialog .dialog-buttons {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

#markerCreationDialog .dialog-buttons .button {
    width: 100%;
    min-width: 0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 0;
    margin: 0;
    background: linear-gradient(to right, #ffcc00, #bfa800);
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#markerCreationDialog .dialog-buttons .button:hover {
    background: linear-gradient(to right, #ffe066, #bfa800);
    color: #111;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

@media (max-width: 500px) {
    #markerCreationDialog.dialog {
        min-width: 0;
        max-width: 98vw;
        padding: 16px 6vw 16px 6vw;
    }
    .color-picker-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Copyright Footer */
.copyright-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 8px 15px;
    background: rgba(29, 32, 27, 0.9);
    border-top-left-radius: 10px;
    border: 1px solid rgba(123, 114, 21, 0.3);
    z-index: 10;
    pointer-events: none;
}

.copyright-footer p {
    margin: 0;
    color: rgba(123, 114, 21, 0.8);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .copyright-footer {
        padding: 6px 12px;
    }
    
    .copyright-footer p {
        font-size: 11px;
    }
}

.marker-input-group label {
    color: #ffcc00;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    background-clip: padding-box;
    display: inline-block;
}

.color-option:hover {
    border-color: #ffcc00;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transform: scale(1.08);
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #ffcc00, 0 2px 8px rgba(0,0,0,0.18);
    position: relative;
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #222;
    font-weight: bold;
    font-size: 20px;
    pointer-events: none;
}

/* Support for Window Controls Overlay */
@supports (display-mode: window-controls-overlay) {
    /* Make the title bar area draggable - vendor prefixes required for PWA functionality */
    .control-icons {
        -webkit-app-region: drag; /* Webkit/Chrome specific */
        app-region: drag; /* Standard property */
        position: fixed;
        left: env(titlebar-area-x, 0);
        top: env(titlebar-area-y, 0);
        width: env(titlebar-area-width, 100%);
        height: env(titlebar-area-height, 30px);
        display: flex;
        align-items: center;
        padding-left: 15px;
    }

    /* Ensure buttons in the title bar are clickable - vendor prefixes required */
    .control-icon {
        -webkit-app-region: no-drag; /* Webkit/Chrome specific */
        app-region: no-drag; /* Standard property */
    }

    /* Make linked indicator fully clickable in overlay mode */
    .linked-indicator, .linked-indicator * {
        -webkit-app-region: no-drag;
        app-region: no-drag;
    }

    /* Add padding to the top of the main content to avoid overlap */
    #teleprompter {
        padding-top: calc(env(titlebar-area-height, 30px) + 20px);
    }
}

/* === Mobile-Friendly Dropdown Overrides === */
/* Mobile overrides moved to standardized button system above */

/* === SLIDER STYLING === */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 8px;
    border-radius: 12px;
    background: linear-gradient(to right, #2a2d28, #3a3d38);
    border: 2px solid #7b7215;
    outline: none;
    opacity: 0.9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.slider:hover {
    opacity: 1;
    border-color: #9b9225;
    box-shadow: 0 2px 8px rgba(123, 114, 21, 0.3);
}

.slider:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.3);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #ffcc00, #bfa800);
    border: 2px solid #7b7215;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: linear-gradient(to bottom, #ffe066, #d4c200);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #ffcc00, #bfa800);
    border: 2px solid #7b7215;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    background: linear-gradient(to bottom, #ffe066, #d4c200);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.slider::-moz-range-track {
    height: 8px;
    border-radius: 12px;
    background: linear-gradient(to right, #2a2d28, #3a3d38);
    border: 2px solid #7b7215;
}

.slider-label {
    color: #ffcc00;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 5px;
    display: block;
}

/* Speed slider - larger for prominence */
#speedSlider {
    width: 300px;
    height: 10px;
}

#speedSlider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
}

#speedSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
}

/* Font size input consistency */
#fontSizeInput {
    background: linear-gradient(to right, #2a2d28, #3a3d38);
    color: #ffcc00;
    border: 2px solid #7b7215;
    border-radius: 12px;
    text-align: center;
    padding: 8px 12px;
    width: 80px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#fontSizeInput:hover {
    border-color: #9b9225;
    box-shadow: 0 2px 8px rgba(123, 114, 21, 0.3);
}

#fontSizeInput:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.3);
    outline: none;
}

@media (max-width: 768px) {
    .slider {
        width: 150px;
        height: 6px;
    }
    
    #speedSlider {
        width: 220px;
        height: 8px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    #speedSlider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
    
    #speedSlider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
    
    #fontSizeInput {
        width: 60px;
        padding: 6px 8px;
        font-size: 12px;
    }

    /* Dialog buttons mobile responsive styles */
    .dialog-buttons {
        gap: 12px;
        margin-top: 16px;
        flex-direction: column;
    }

    .dialog-buttons .button {
        min-width: 0;
        width: 100%;
        padding: 10px 16px;
        font-size: 15px;
        height: 36px;
    }

    #markerCreationDialog .dialog-buttons .button {
        height: 42px;
        font-size: 1rem;
        padding: 12px 0;
    }
}
