.saecanet-body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}
.saecanet-container {
/*    max-width: 1200px;*/
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.saecanet-main-title {
    color: #333;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
}
.saecanet-app-description {
    text-align: left;
    font-size: 0.95em;
    color: #555;
    margin-bottom: 25px;
    padding: 0 15px;
    line-height: 1.7;
}
.saecanet-br {
    display: block;
    margin-bottom: 0.5em;
}
.saecanet-section-title { 
    color: #555;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}
.saecanet-tab-content .saecanet-section-title:first-child {
    margin-top: 10px;
}
.saecanet-tab-container {
    position: relative;
}
.saecanet-tab-buttons {
    display: flex;
    flex-wrap: wrap; 
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}
.saecanet-tab-button {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1em;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
    white-space: nowrap;
}
.saecanet-tab-button.saecanet-active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}
.saecanet-tab-button:hover:not(.saecanet-active):not(:disabled) {
    color: #0056b3;
}
.saecanet-tab-button:disabled {
    color: #aaa;
    cursor: not-allowed;
}
.saecanet-tab-content {
    display: none;
    padding: 10px 0;
}
.saecanet-tab-content.saecanet-active {
    display: block;
}
.saecanet-file-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.saecanet-file-selection-header .saecanet-section-title { 
    margin-bottom: 0; 
    border-bottom: none; 
}
button.saecanet-reset-button {
    display: inline-flex; 
    align-items: center;  
    gap: 5px; 
    padding: 8px 15px;
    font-size: 0.9em;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    background-color: #dc3545; 
}
button.saecanet-reset-button:hover {
    background-color: #c82333; 
}
.saecanet-file-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.saecanet-file-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    margin-bottom: 0; 
}
.saecanet-file-label:hover {
    background-color: #0056b3;
}
.saecanet-file-input {
    display: none;
}
button.saecanet-main-button {
    flex-grow: 1; 
    max-width: 250px; 
    padding: 10px 20px; 
    font-size: 1em; 
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
button.saecanet-main-button:hover {
    background-color: #0056b3;
}
button.saecanet-main-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
.saecanet-file-info-display .saecanet-info-text, 
.saecanet-header-info-display .saecanet-info-text {
    margin: 8px 0;
    font-size: 0.95em;
}
.saecanet-filename-display, 
.saecanet-header-value {
    font-weight: bold;
    color: #007bff;
}
.saecanet-file-preview {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 20px;
}
.saecanet-stats-grid .saecanet-stats-title, 
.saecanet-duration-energy-grid .saecanet-duration-energy-title, 
.saecanet-fourier-grid .saecanet-fourier-title,
.saecanet-analysis-method-content .saecanet-method-subtitle {
    color: #444;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}
.saecanet-analysis-method-content .saecanet-method-subtitle {
    color: #0056b3;
    font-size: 1.15em;
}
.saecanet-stats-grid .saecanet-stats-block, 
.saecanet-duration-energy-grid .saecanet-duration-energy-block, 
.saecanet-fourier-component-section {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e7e7e7;
}
.saecanet-fourier-component-section .saecanet-spectrum-plot-area {
    background-color: #fff; 
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.saecanet-analysis-method-content {
    padding: 10px;
}
.saecanet-method-item {
    margin-bottom: 25px; 
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd; 
}
.saecanet-method-item:last-child {
    border-bottom: none; 
    margin-bottom: 0;
}
.saecanet-method-description { 
    font-size: 0.95em;
    line-height: 1.7;
    color: #444;
}
.saecanet-code-block { 
    background-color: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: #c7254e; 
}
.saecanet-stats-grid .saecanet-stats-item, 
.saecanet-duration-energy-grid .saecanet-duration-energy-item, 
.saecanet-fourier-grid .saecanet-fourier-result {
    margin: 7px 0;
    font-size: 0.9em;
}
.saecanet-stats-grid .saecanet-stats-value, 
.saecanet-duration-energy-grid .saecanet-duration-energy-value,
.saecanet-fourier-grid .saecanet-fourier-value,
.saecanet-component-name-placeholder {
    font-weight: bold;
    color: #007bff;
}
.saecanet-unit-placeholder { 
    font-weight: normal;
    color: #555;
}
.saecanet-stats-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr; 
}
.saecanet-duration-energy-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
.saecanet-duration-energy-grid .saecanet-duration-energy-subtitle {
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #333;
}
.saecanet-fourier-grid {
    display: block; 
}
.saecanet-fourier-component-section {
    margin-bottom: 20px;
}
.saecanet-fourier-component-section > .saecanet-fourier-title { 
    margin-bottom: 15px; 
}
.saecanet-fourier-component-section .saecanet-spectrum-container {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 20px;
}
.saecanet-fourier-component-section .saecanet-spectrum-subtitle {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1em;
    color: #333;
}
.saecanet-spectrum-plot-area .saecanet-spectrum-image,
.saecanet-spectrum-plot-area .saecanet-spectrum-canvas {
    width: 100% !important;
    height: 220px !important;
    margin-bottom: 5px;
    object-fit: contain;
    border: 1px solid #eee;
}
.saecanet-fourier-grid .saecanet-fourier-result {
    margin: 3px 0;
    font-size: 0.85em;
}
@media (min-width: 600px) { 
    .saecanet-stats-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    .saecanet-fourier-component-section .saecanet-spectrum-container {
        grid-template-columns: repeat(2, 1fr); 
    }
}
@media (min-width: 992px) { 
    .saecanet-stats-grid {
        grid-template-columns: repeat(4, 1fr); 
    }
    .saecanet-duration-energy-grid {
        grid-template-columns: repeat(3, 1fr); 
    }
}
.saecanet-charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}
.saecanet-chart-wrapper {
    flex: 1 1 300px;
    min-width: 300px;
    height: 350px;
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.saecanet-chart-wrapper .saecanet-chart-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 1px solid #eee;
}
@media (max-width: 991px) { 
    .saecanet-chart-wrapper { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 679px) { 
    .saecanet-chart-wrapper { flex: 1 1 100%; }
}
.saecanet-loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 1000; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
}
.saecanet-loading-overlay .saecanet-loading-text {
    margin-top: 15px; font-size: 1.2em; color: #007bff; font-weight: bold;
}
.saecanet-loading-spinner {
    border: 6px solid #f3f3f3; border-top: 6px solid #007bff;
    border-radius: 50%; width: 50px; height: 50px;
    animation: saecanet-spin 1s linear infinite;
}
@keyframes saecanet-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}