/* ====== SAMPLE SIMULATION STYLES ====== */
/* General Body Styling */
body {
    font-family: 'Inter', sans-serif, system-ui;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    font-size: 15px;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Styles for the H1 Title Block --- */
h1 {
    /* Consistent width with .container and format with .section */
    max-width: 1400px;
    margin: 20px auto 30px; /* Top, horizontal, bottom margin */
    padding: 25px; /* Match .section padding */
    background: white; /* Match .section background */
    border-radius: 10px; /* Match .section border-radius */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Match .section box-shadow */
    border-bottom: none; /* Replaces the original border */
    
    /* Retained from original h1 for internal layout */
    color: #333;
    font-size: 1.7em;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.h1-title-group {
    flex-shrink: 0;
}

.h1-title {
     display: block;
}

.h1-copyright {
    font-size: 0.5em;
    font-weight: normal;
    color: #555;
    margin-top: 5px;
}
.h1-copyright a {
    color: #0056b3;
    text-decoration: none;
}
.h1-copyright a:hover {
    text-decoration: underline;
}

.h1-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 0.6em; /* Reduced from 0.7em for smaller text */
    text-align: center;
    align-items: flex-start;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-label {
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.info-content a, .info-content span {
    color: #0056b3;
    text-decoration: none;
    font-size: 1.1em;
}
.info-content a:hover {
    color: #007bff;
}
.h1-info a i {
    font-size: 2em;
    transition: transform 0.2s ease-in-out;
}
.h1-info a:hover i {
    transform: scale(1.1);
}

/* ====== LASER SIMULATION STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.8em;
}

h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.main-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
}

.pulse-count {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 20px;
}

.pulses-scroll-container {
    position: relative;
    margin: 0 -25px;
    padding: 0 25px;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 15px;
}

.pulses-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.pulses-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 0 25px;
}

.pulses-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.pulses-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#pulses-container {
    display: flex;
    gap: 20px;
    width: max-content;
    min-width: 100%;
    padding-bottom: 5px;
}

.pulse-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-width: 320px;
    max-width: 320px;
    position: relative;
    flex-shrink: 0;
}

.remove-pulse-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-pulse-btn:hover {
    background: #c82333;
}

.wavelength-section {
    transition: opacity 0.3s;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.import-section {
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.import-settings {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.import-settings .form-group {
    margin-bottom: 10px;
}

.info-text {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-left: 5px;
}

.file-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    font-weight: 500;
}

.import-note {
    margin-top: 10px;
    padding: 8px;
    background: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    font-size: 13px;
}

.settings-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.settings-box label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
}

.settings-box input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 10px;
}

.axis-settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.axis-settings h3 {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #495057;
}

.axis-control {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.manual-range {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.manual-range label {
    display: flex;
    align-items: center;
    font-weight: normal;
    font-size: 14px;
}

.manual-range input {
    width: 100px;
    margin-left: 5px;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.manual-range .unit {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.info {
    display: block;
    margin-top: 10px;
    color: #6c757d;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-success {
    background: #28a745;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #218838;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#plots-container {
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#plots-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: crosshair; /* Aiming shape for coordinate viewing */
}

.placeholder, .loading {
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
    font-weight: 500;
}

/* Firefox scrollbar styling */
.pulses-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .pulses-scroll-container {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .pulses-scroll-container::-webkit-scrollbar-track {
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 15px;
    }
    
    .pulse-panel {
        min-width: 280px;
        max-width: 280px;
    }
    
    /* Removed redundant flex-wrap from here as it is now in the base style */
    
    .manual-range input {
        width: 80px;
    }
    
    .radio-group {
        font-size: 14px;
    }
    
    h1 {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .h1-info {
        width: 100%;
        justify-content: space-between;
    }
}