* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #1a1a1a;
    color: #ffffff;
}

header {
    background-color: #2c3e50;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 24px;
    margin: 0;
    color: #3498db;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.legal-btn {
    padding: 4px 12px;
    font-size: 12px;
    background-color: #7f8c8d;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.legal-btn:hover {
    background-color: #95a5a6;
}

.legal-btn.active {
    background-color: #e74c3c;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-size: 14px;
    color: #ecf0f1;
}

.control-group input,
.control-group select {
    padding: 6px 10px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 14px;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: #2980b9;
}

button:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

#status-message {
    font-size: 14px;
    color: #e74c3c;
    margin-left: 10px;
}

#status-message.success {
    color: #2ecc71;
}

#status-message.loading {
    color: #f39c12;
}

/* Station lookup styling */
.station-lookup {
    display: flex;
    align-items: center;
    gap: 4px;
}

.station-lookup input {
    width: 120px;
    text-transform: uppercase;
    padding: 6px 10px;
    border: 1px solid #34495e;
    border-radius: 4px;
    background-color: #34495e;
    color: #ecf0f1;
    font-size: 14px;
}

.station-lookup input:focus {
    outline: none;
    border-color: #3498db;
}

.station-lookup input::placeholder {
    text-transform: none;
    color: #7f8c8d;
    font-size: 12px;
}

#station-lookup-btn {
    padding: 6px 12px;
    font-size: 13px;
    background-color: #27ae60;
}

#station-lookup-btn:hover:not(:disabled) {
    background-color: #219a52;
}

#main-content {
    display: flex;
    height: 60vh;
    overflow: hidden;
}

#map-container {
    flex: 1;
    position: relative;
    background-color: #34495e;
}

#map {
    width: 100%;
    height: 100%;
}

#legend {
    background-color: #34495e;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

#legend h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #3498db;
}

#legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

#legend-toggle {
    font-size: 14px;
    color: #3498db;
}

#legend-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

#legend h4 {
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #3498db;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.legend-labels {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
}

.sky-cover-legend {
    margin-top: 10px;
}

.sky-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.sky-items > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

#control-panel {
    width: 320px;
    background-color: #2c3e50;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #34495e;
}

#control-panel h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #3498db;
}

#control-panel h3 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #3498db;
}

#station-info {
    background-color: #34495e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

#retrocast-section {
    background-color: #2c3e50;
    padding: 20px;
    width: 100%;
    border-top: 2px solid #34495e;
}

#retrocast-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #3498db;
    text-align: center;
}

#retrocast-loading {
    color: #f39c12;
    font-size: 14px;
    padding: 10px;
    text-align: center;
}

#retrocast-charts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-container {
    background-color: #34495e;
    padding: 15px;
    border-radius: 6px;
    width: 100%;
}

.chart-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ecf0f1;
    text-align: left;
}

.chart-canvas {
    width: 100%;
    height: 150px;
}

#station-info p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
}

#station-info .station-name {
    font-size: 16px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 10px;
}

#station-info .metar-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background-color: #2c3e50;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    word-wrap: break-word;
}

#data-summary {
    background-color: #34495e;
    padding: 15px;
    border-radius: 6px;
}

#summary-content {
    font-size: 13px;
}

#summary-content p {
    margin-bottom: 8px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #2c3e50;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: bold;
    color: #ecf0f1;
}

.data-value {
    color: #3498db;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.leaflet-popup-content {
    font-size: 13px;
    line-height: 1.6;
}

.leaflet-popup-tip {
    background-color: #2c3e50;
}

/* Custom station marker */
.station-marker {
    background: transparent;
    border: none;
}

/* Scrollbar styling */
#control-panel::-webkit-scrollbar {
    width: 8px;
}

#control-panel::-webkit-scrollbar-track {
    background: #34495e;
}

#control-panel::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

#control-panel::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Dropdown Menu Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    padding: 8px 16px;
    background: #34495e;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-btn:hover {
    background: #3d566e;
}

.dropdown-btn.active {
    background: #3498db;
    color: #1a1a1a;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: #2c3e50;
    border: 1px solid #3498db;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    margin-top: 4px;
    padding: 6px 0;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #34495e;
}

.dropdown-item input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #3498db;
    cursor: pointer;
}

/* Overlay Dropdown Styles */
.overlay-dropdown {
    min-width: 220px;
    padding: 0;
}

.overlay-item {
    border-bottom: 1px solid #34495e;
}

.overlay-item:last-child {
    border-bottom: none;
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}

.overlay-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
}

.overlay-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #3498db;
    cursor: pointer;
}

.overlay-settings-btn {
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.overlay-settings-btn:hover {
    background: #3498db;
    color: #1a1a1a;
}

.overlay-settings-btn.active {
    background: #3498db;
    color: #1a1a1a;
}

.overlay-settings {
    background: #34495e;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overlay-settings.hidden {
    display: none;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #bdc3c7;
}

.setting-row span:first-child {
    min-width: 50px;
}

.setting-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #2c3e50;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

.setting-row input[type="color"] {
    width: 28px;
    height: 20px;
    padding: 0;
    border: 1px solid #3498db;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}

.setting-value {
    min-width: 35px;
    text-align: right;
    color: #2ecc71;
}

/* Setting checkbox style */
.setting-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    color: #bdc3c7;
}

.setting-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #3498db;
}

/* Grid labels on map */
.grid-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Options Dropdown Styles */
.options-dropdown {
    min-width: 180px;
    padding: 8px 12px;
}

.options-item {
    margin-bottom: 8px;
}

.options-item:last-child {
    margin-bottom: 0;
}

.options-item .setting-row span {
    min-width: 80px;
}

.options-item input[type="number"] {
    width: 70px;
    padding: 4px 8px;
    background: #34495e;
    border: 1px solid #3498db;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 0.85rem;
    text-align: center;
}

.options-item input[type="number"]:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
}

.options-divider {
    border-top: 1px solid #34495e;
    padding-top: 8px;
    margin-top: 4px;
}

.options-btn {
    width: 100%;
    padding: 8px 12px;
    background: #34495e;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.options-btn:hover {
    background: #3498db;
    color: #1a1a1a;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #2c3e50;
    border: 1px solid #3498db;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
}

.modal-header h3 {
    color: #3498db;
    font-size: 1.1rem;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Marker Add Section */
.marker-add-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #34495e;
}

.marker-add-section h4,
.marker-list-section h4 {
    color: #3498db;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.marker-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.marker-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-input-group label {
    font-size: 0.8rem;
    color: #888;
}

.marker-input-group input[type="number"],
.marker-input-group input[type="text"] {
    padding: 8px 10px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 0.9rem;
}

.marker-input-group input[type="number"]:focus,
.marker-input-group input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

.marker-input-group input[type="color"] {
    width: 100%;
    height: 32px;
    padding: 2px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    cursor: pointer;
}

.marker-input-group input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #34495e;
    border-radius: 3px;
    cursor: pointer;
}

.marker-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

.marker-input-group span#markerSizeValue {
    min-width: 24px;
    text-align: center;
    color: #2ecc71;
    font-size: 0.85rem;
}

.marker-input-row .marker-input-group:has(input[type="range"]) {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.marker-input-row .marker-input-group:has(input[type="range"]) label {
    min-width: 35px;
}

.primary-btn {
    width: 100%;
    padding: 10px;
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: #2980b9;
}

/* Marker List Section */
.marker-list-section h4 span {
    color: #2ecc71;
    font-weight: normal;
}

.marker-list-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.small-btn {
    padding: 6px 12px;
    background: #34495e;
    border: 1px solid #2c3e50;
    color: #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.small-btn:hover {
    background: #2c3e50;
    color: #fff;
}

.small-btn.danger {
    border-color: #e74c3c;
    color: #e74c3c;
}

.small-btn.danger:hover {
    background: #e74c3c;
    color: #fff;
}

.marker-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #34495e;
    border-radius: 6px;
    background: #1a1a1a;
}

.marker-list .placeholder {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

.marker-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #34495e;
    transition: background 0.15s;
}

.marker-list-item:last-child {
    border-bottom: none;
}

.marker-list-item:hover {
    background: #2c3e50;
}

.marker-item-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.marker-item-info {
    flex: 1;
    min-width: 0;
}

.marker-item-label {
    display: block;
    font-size: 0.9rem;
    color: #ecf0f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marker-item-coords {
    display: block;
    font-size: 0.75rem;
    color: #888;
}

.marker-item-actions {
    display: flex;
    gap: 4px;
}

.marker-action-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #34495e;
    border: 1px solid #2c3e50;
    color: #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.marker-action-btn:hover {
    background: #2c3e50;
    color: #fff;
}

.marker-action-btn.goto:hover {
    border-color: #3498db;
    color: #3498db;
}

.marker-action-btn.toggle.hidden-marker {
    opacity: 0.5;
}

.marker-action-btn.delete:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Responsive design */
@media (max-width: 1024px) {
    #control-panel {
        width: 280px;
    }

    header h1 {
        font-size: 20px;
    }

    .controls {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    #main-content {
        flex-direction: column;
    }

    #control-panel {
        width: 100%;
        height: 200px;
        border-left: none;
        border-top: 1px solid #34495e;
    }

    #legend {
        max-width: 200px;
        font-size: 11px;
    }
}

/* Legal Modal Styles */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.legal-modal.hidden {
    display: none !important;
}

.legal-modal-content {
    background-color: #2c3e50;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #34495e;
}

.legal-modal-header h2 {
    color: #3498db;
    font-size: 24px;
    margin: 0;
}

.legal-close-btn {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.legal-close-btn:hover {
    color: #e74c3c;
}

.legal-modal-body {
    padding: 25px;
    overflow-y: auto;
    color: #ecf0f1;
}

.legal-section {
    margin-bottom: 30px;
}

.legal-section h3 {
    color: #3498db;
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid #34495e;
    padding-bottom: 8px;
}

.legal-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legal-section ul {
    margin-left: 25px;
    margin-bottom: 10px;
}

.legal-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-section a {
    color: #3498db;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.warning-box {
    background-color: #e67e22;
    border-left: 4px solid #d35400;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.warning-box p {
    margin: 0;
    color: #ffffff;
}

.warning-box strong {
    font-size: 16px;
}

.legal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #34495e;
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
}

/* Units Dropdown Styles */
.units-dropdown {
    min-width: 120px;
    padding: 8px 12px;
}

.units-section {
    margin-bottom: 12px;
}

.units-section:last-child {
    margin-bottom: 0;
}

.units-section + .units-section {
    padding-top: 8px;
    border-top: 1px solid #34495e;
}

.units-label {
    font-size: 12px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #34495e;
}

.units-options {
    display: flex;
    flex-direction: column;
}

.units-options .dropdown-item {
    padding: 6px 8px;
}

/* Reanalysis Header Styles */
.reanalysis-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.reanalysis-header h3 {
    margin: 0;
}

.reanalysis-days-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reanalysis-days-control label {
    font-size: 14px;
    color: #ecf0f1;
}

.reanalysis-days-control input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    background: #34495e;
    border: 1px solid #3498db;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 14px;
    text-align: center;
}

.reanalysis-days-control input[type="number"]:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(52, 152, 219, 0.4);
}

/* Loop Bar Styles - Permanent Horizontal Bar */
#loop-bar {
    background-color: #243342;
    border-bottom: 1px solid #34495e;
    padding: 8px 20px;
}

.loop-controls {
    display: flex;
    align-items: center;
}

.loop-label {
    font-size: 13px;
    font-weight: bold;
    color: #3498db;
    margin-right: 12px;
    white-space: nowrap;
}

.loop-setup {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.loop-setup.hidden {
    display: none;
}

.loop-datetime-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.loop-datetime-group label,
.loop-options-group label {
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
    white-space: nowrap;
}

.loop-datetime-group input[type="date"] {
    width: 130px;
    padding: 5px 6px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 12px;
}

.loop-datetime-group select {
    padding: 5px 4px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 12px;
    cursor: pointer;
    min-width: 45px;
}

.loop-options-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.loop-options-group select {
    padding: 5px 6px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 12px;
    cursor: pointer;
    min-width: 50px;
}

.loop-options-group input[type="number"] {
    width: 55px;
    padding: 5px 6px;
    background: #34495e;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 12px;
    text-align: center;
}

.loop-datetime-group input:focus,
.loop-datetime-group select:focus,
.loop-options-group select:focus,
.loop-options-group input:focus {
    border-color: #3498db;
    outline: none;
}

.loop-validation {
    font-size: 11px;
    color: #e74c3c;
    white-space: nowrap;
    margin: 0 8px;
}

.loop-validation.success {
    color: #2ecc71;
}

.loop-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.loop-btn.primary {
    background: #3498db;
    color: #fff;
}

.loop-btn.primary:hover:not(:disabled) {
    background: #2980b9;
}

.loop-btn.primary:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}

.loop-btn.danger {
    background: #e74c3c;
    color: #fff;
}

.loop-btn.danger:hover {
    background: #c0392b;
}

/* Loop Player Controls - Horizontal */
.loop-player {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.loop-player.hidden {
    display: none;
}

.loop-slider-container {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.loop-slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #34495e;
    border-radius: 3px;
    cursor: pointer;
}

.loop-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.loop-slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
}

.loop-slider-container input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.playback-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    background: #34495e;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.playback-btn:hover {
    background: #3498db;
    color: #fff;
}

.playback-btn.play {
    width: 36px;
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}

.playback-btn.play:hover {
    background: #219a52;
}

.playback-btn.play.playing {
    background: #e67e22;
    border-color: #e67e22;
}

.playback-btn.play.playing:hover {
    background: #d35400;
}

.loop-frame-info {
    font-size: 12px;
    color: #3498db;
    font-weight: bold;
    white-space: nowrap;
}

.loop-time-info {
    font-size: 12px;
    color: #ecf0f1;
    white-space: nowrap;
    min-width: 140px;
}

