:root {
    --wood-texture: url('wood_texture.png');
    --metal-texture: url('metal_texture.png');
    --metal-color: #d1d1d1;
    --dark-metal: #2b2b2b;
    --led-red: #ff3333;
    --led-green: #33ff33;
    --led-amber: #ffcc00;
    --lcd-bg: #1a1a1a;
    --lcd-text: #ccff00;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #121212;
    background-image: var(--wood-texture);
    background-size: cover;
    /* Or contain if it's a small tile */
    font-family: 'Rajdhani', sans-serif;
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.hifi-rack {
    display: flex;
    flex-direction: column;
    gap: 0px;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.unit {
    position: relative;
    background: #00000066;
    padding: 4px;
    /* Bezel */
    border-radius: 2px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.unit-panel {
    background-color: var(--metal-color);
    background-image: var(--metal-texture);
    background-size: cover;
    padding: 15px;
    border: 1px solid #fff;
    border-top-color: #fff;
    border-left-color: #eee;
    border-right-color: #999;
    border-bottom-color: #666;
    display: flex;
    position: relative;
}

.unit-panel.metal-finish {
    background: linear-gradient(180deg, #e0e0e0 0%, #bdbdbd 100%);
    /* Fallback if texture missing, or overlay */
}

/* Amplifier (Header) */
.amplifier .unit-panel {
    justify-content: space-between;
    align-items: center;
    height: 120px;
}

.brand-plate h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    margin: 0;
    color: #222;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.model-no {
    font-size: 0.8rem;
    color: #444;
    letter-spacing: 1px;
    font-weight: 700;
}

.global-controls-section {
    display: flex;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 0.6rem;
    color: #333;
    font-weight: 700;
}

.btn-push {
    width: 40px;
    height: 40px;
    background: #ddd;
    border: 1px solid #999;
    border-radius: 2px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3), inset 1px 1px 1px #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s;
}

.btn-push:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
    background: #ccc;
}

.btn-push .icon {
    font-size: 1.2rem;
    color: #333;
}

.btn-red {
    background: #d32f2f;
    border-color: #b71c1c;
}

.btn-red .icon {
    color: #fff;
}

.btn-red:active {
    background: #b71c1c;
}

.power-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.led-indicator {
    width: 10px;
    height: 10px;
    background: #500;
    border-radius: 50%;
    border: 1px solid #333;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.led-indicator.on {
    background: var(--led-red);
    box-shadow: 0 0 5px var(--led-red), inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Tape Deck (Tracks) */
.tape-deck .unit-panel {
    flex-direction: column;
    gap: 15px;
    padding: 10px 20px;
}

.deck-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #999;
    padding-bottom: 10px;
}

.counter-display {
    background: #000;
    padding: 2px 8px;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-val {
    color: var(--led-amber);
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
}

.counter-display label {
    font-size: 0.4rem;
    color: #666;
}

.track-info {
    flex-grow: 1;
    background: #222;
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 2px;
}

.track-name {
    color: #fff;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.btn-eject {
    background: #444;
    color: #fff;
    border: 1px solid #222;
    font-size: 0.7rem;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
}

.unit {
    position: relative;
    background: #000;
    padding: 4px;
    /* Bezel */
    border-radius: 2px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.unit-panel {
    background-color: var(--metal-color);
    background-image: var(--metal-texture);
    background-size: cover;
    padding: 15px;
    border: 1px solid #fff;
    border-top-color: #fff;
    border-left-color: #eee;
    border-right-color: #999;
    border-bottom-color: #666;
    display: flex;
    position: relative;
}

.unit-panel.metal-finish {
    background: linear-gradient(180deg, #e0e0e0 0%, #bdbdbd 100%);
    /* Fallback if texture missing, or overlay */
}

/* Amplifier (Header) */
.amplifier .unit-panel {
    justify-content: space-between;
    align-items: center;
    height: 120px;
}

.brand-plate h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    margin: 0;
    color: #222;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

.model-no {
    font-size: 0.8rem;
    color: #444;
    letter-spacing: 1px;
    font-weight: 700;
}

.global-controls-section {
    display: flex;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 0.6rem;
    color: #333;
    font-weight: 700;
}

.btn-push {
    width: 40px;
    height: 40px;
    background: #ddd;
    border: 1px solid #999;
    border-radius: 2px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3), inset 1px 1px 1px #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s;
}

.btn-push:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
    background: #ccc;
}

.btn-push .icon {
    font-size: 1.2rem;
    color: #333;
}

.btn-red {
    background: #d32f2f;
    border-color: #b71c1c;
}

.btn-red .icon {
    color: #fff;
}

.btn-red:active {
    background: #b71c1c;
}

.power-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.led-indicator {
    width: 10px;
    height: 10px;
    background: #500;
    border-radius: 50%;
    border: 1px solid #333;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.led-indicator.on {
    background: var(--led-red);
    box-shadow: 0 0 5px var(--led-red), inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Tape Deck (Tracks) */
.tape-deck .unit-panel {
    flex-direction: column;
    gap: 15px;
    padding: 10px 20px;
}

.deck-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #999;
    padding-bottom: 10px;
}

.counter-display {
    background: #000;
    padding: 2px 8px;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-val {
    color: var(--led-amber);
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
}

.counter-display label {
    font-size: 0.4rem;
    color: #666;
}

.track-info {
    flex-grow: 1;
    background: #222;
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 2px;
}

.track-name {
    color: #fff;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.btn-eject {
    background: #444;
    color: #fff;
    border: 1px solid #222;
    font-size: 0.7rem;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
}

.btn-eject:hover {
    background: #555;
}

.deck-body {
    display: flex;
    gap: 20px;
    align-items: center;
}

.row-section {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.left-section {
    width: 230px;
}

.transport-row {
    display: flex;
    gap: 5px;
}

.btn-transport {
    flex: 1;
    height: 30px;
    background: linear-gradient(to bottom, #eee, #ccc);
    border: 1px solid #888;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
}

.btn-transport:active {
    background: #bbb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-play.playing {
    background: #a5d6a7;
    box-shadow: inset 0 0 5px #4caf50;
}

.mode-switch-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #333;
    padding: 2px;
    border-radius: 2px;
}

.mode-btn {
    background: #444;
    border: none;
    color: var(--led-green);
    font-size: 0.55rem;
    letter-spacing: 1px;
    cursor: pointer;
    text-align: center;
    padding: 0px 15px 0px 17px;
    font-family: 'Orbitron', sans-serif;
}

.mode-btn.active {
    color: var(--led-green);
    text-shadow: 0 0 2px var(--led-green);
}

.center-section {
    flex-grow: 1;
}

.vu-meter-window {
    background: #111;
    height: 40px;
    border: 2px solid #555;
    border-radius: 2px;
    position: relative;
    padding: 5px;
    box-shadow: inset 0 0 10px #000;
}

.progress-bar-container {
    width: 100%;
    height: 100%;
    background: #222;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50 60%, #ffeb3b 80%, #f44336 100%);
    opacity: 0.8;
    transition: width 0.1s linear;
}

.right-section {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.knob-wrapper {
    width: 50px;
    height: 50px;
    position: relative;
}

.knob {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #444, #111);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    cursor: ns-resize;
    border: 2px solid #666;
}

.knob-line {
    width: 2px;
    height: 40%;
    background: #fff;
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: 50% 112%;
    /* Pivot at center of knob */
}

.knob-group label {
    font-size: 0.6rem;
    color: #333;
    font-weight: 700;
}

.val-display {
    font-size: 0.6rem;
    font-family: monospace;
    color: #222;
}

/* Switch */
.switch-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 15px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border: 1px solid #999;
}

.slider:before {
    position: absolute;
    content: "";
    height: 11px;
    width: 11px;
    left: 1px;
    bottom: 1px;
    background-color: #333;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--led-green);
}

input:checked+.slider:before {
    transform: translateX(15px);
}

.switch-text {
    font-size: 0.5rem;
    font-weight: 700;
    color: #333;
}

.reverb-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 20px;
}

.separator {
    border-left: 1px solid #999;
}

.reverb-section #reverb-toggle.active {
    background: var(--led-green);
    box-shadow: 0 0 10px var(--led-green);
}

.unit-feet {
    height: 10px;
    background: #333;
}

.btn-large {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(180deg, #e0e0e0 0%, #bdbdbd 100%);
    margin: 3% auto;
    padding: 0;
    border: 4px solid #000;
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideDown 0.4s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(180deg, #333 0%, #111 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--led-amber);
    text-shadow: 0 0 10px var(--led-amber);
    letter-spacing: 3px;
}

.close-modal {
    color: #aaa;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--led-red);
    text-shadow: 0 0 10px var(--led-red);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    color: #222;
    font-family: 'Rajdhani', sans-serif;
}

.modal-body section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #999;
}

.modal-body section:last-child {
    border-bottom: none;
}

.modal-body h3 {
    font-family: 'Orbitron', sans-serif;
    color: #111;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-body p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-body strong {
    color: #000;
    font-weight: 700;
}

.modal-body ul {
    margin: 10px 0;
    padding-left: 25px;
}

.modal-body li {
    margin: 8px 0;
    line-height: 1.5;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #999;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
    border: 2px solid #999;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #222;
}

.btn-help {}

input:checked+.slider {
    background-color: var(--led-green);
}

input:checked+.slider:before {
    transform: translateX(15px);
}

.switch-text {
    font-size: 0.5rem;
    font-weight: 700;
    color: #333;
}

.reverb-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 20px;
}

.separator {
    border-left: 1px solid #999;
}

.reverb-section #reverb-toggle.active {
    background: var(--led-green);
    box-shadow: 0 0 10px var(--led-green);
}

.unit-feet {
    height: 10px;
    background: #333;
}

.btn-large {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(180deg, #e0e0e0 0%, #bdbdbd 100%);
    margin: 3% auto;
    padding: 0;
    border: 4px solid #000;
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideDown 0.4s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(180deg, #333 0%, #111 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--led-amber);
    text-shadow: 0 0 10px var(--led-amber);
    letter-spacing: 3px;
}

.close-modal {
    color: #aaa;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--led-red);
    text-shadow: 0 0 10px var(--led-red);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    color: #222;
    font-family: 'Rajdhani', sans-serif;
}

.modal-body section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #999;
}

.modal-body section:last-child {
    border-bottom: none;
}

.modal-body h3 {
    font-family: 'Orbitron', sans-serif;
    color: #111;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-body p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-body strong {
    color: #000;
    font-weight: 700;
}

.modal-body ul {
    margin: 10px 0;
    padding-left: 25px;
}

.modal-body li {
    margin: 8px 0;
    line-height: 1.5;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #999;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
    border: 2px solid #999;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #222;
}

.btn-help {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #444;
    letter-spacing: 1px;
    font-weight: 700;
    border: 0px;
    background: transparent;
}

/* Save Preset Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #111;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #666;
    border-radius: 4px;
    background: #f5f5f5;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: #000;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--led-amber);
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.form-info {
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.form-info p {
    margin: 5px 0;
}

.form-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.form-info li {
    margin: 5px 0;
    font-family: 'Rajdhani', monospace;
}

.form-info .note {
    color: #c62828;
    font-weight: 700;
    margin-top: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel,
.btn-save {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #666;
    color: #fff;
}

.btn-cancel:hover {
    background: #444;
}

.btn-save {
    background: var(--led-green);
    color: #000;
}

.btn-save:hover {
    background: #4caf50;
    box-shadow: 0 0 15px var(--led-green);
}

.btn-save:disabled {
    background: #999;
    cursor: not-allowed;
}

#save-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #444;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #666;
}

.progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--led-green), var(--led-amber));
    width: 0%;
    transition: width 0.3s ease;
}

#save-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 700;
}

#save-result.success {
    background: #c8e6c9;
    color: #1b5e20;
    border: 2px solid var(--led-green);
}

#save-result.error {
    background: #ffcdd2;
    color: #b71c1c;
    border: 2px solid var(--led-red);
}

.modal-body p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-body strong {
    color: #000;
    font-weight: 700;
}

.modal-body ul {
    margin: 10px 0;
    padding-left: 25px;
}

.modal-body li {
    margin: 8px 0;
    line-height: 1.5;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #999;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
    border: 2px solid #999;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #222;
}

.btn-help {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #444;
    letter-spacing: 1px;
    font-weight: 700;
    border: 0px;
    background: transparent;
}

/* Save Preset Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #111;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #666;
    border-radius: 4px;
    background: #f5f5f5;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    color: #000;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--led-amber);
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.form-info {
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.form-info p {
    margin: 5px 0;
}

.form-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.form-info li {
    margin: 5px 0;
    font-family: 'Rajdhani', monospace;
}

.form-info .note {
    color: #c62828;
    font-weight: 700;
    margin-top: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel,
.btn-save {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #666;
    color: #fff;
}

.btn-cancel:hover {
    background: #444;
}

.btn-save {
    background: var(--led-green);
    color: #000;
}

.btn-save:hover {
    background: #4caf50;
    box-shadow: 0 0 15px var(--led-green);
}

.btn-save:disabled {
    background: #999;
    cursor: not-allowed;
}

#save-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #444;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #666;
}

.progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--led-green), var(--led-amber));
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 700;
    color: #000;
}

#save-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 700;
}

#save-result.success {
    background: #c8e6c9;
    color: #1b5e20;
    border: 2px solid var(--led-green);
}

#save-result.error {
    background: #ffcdd2;
    color: #b71c1c;
    border: 2px solid var(--led-red);
}

/* Load Preset Styles */
#presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preset-card {
    background: #f5f5f5;
    border: 2px solid #666;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-card:hover {
    background: #fff;
    border-color: var(--led-amber);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
}

.preset-card h3 {
    margin: 0 0 10px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #111;
}

.preset-card p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #555;
}

.preset-card .preset-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

.preset-card .delete-preset {
    font-family: 'Orbitron', sans-serif;
    background: var(--led-red);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
    margin-top: 10px;
    transition: all 0.2s;
    letter-spacing: 1px;
    font-weight: 700;
}

.preset-card .delete-preset:hover {
    background: #c62828;
}

.preset-card .load-preset {
    font-family: 'Orbitron', sans-serif;
    background: var(--led-green);
    color: #000000ff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
    margin-top: 10px;
    transition: all 0.2s;
    letter-spacing: 1px;
    font-weight: 700;
}

.preset-card .load-preset:hover {
    background: #15b101ff;
}

#loading-text {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
}

.load-preset-buttons {
    display: flex;
    justify-content: space-between;
}