body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.title-with-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

h1 {
    text-align: center;
    color: #00ff00;
    margin: 0;
}

.help-icon-container {
    position: relative;
    display: inline-block;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 1.1em;
    color: #00ff00;
    cursor: help;
    transition: all 0.3s ease;
    line-height: 1;
}

.help-icon::before {
    content: 'ⓘ';
}

.help-icon:hover {
    background-color: #00ff00;
    color: #000000;
}

.help-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background-color: #2378a2;
    color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    line-height: 1.4;
    border: 1px solid #00ff00;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.help-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 5px 5px 5px;
    border-style: solid;
    border-color: transparent transparent #00ff00 transparent;
}

.help-tooltip p {
    margin: 6px 0;
}

.help-tooltip ul {
    margin: 6px 0;
    padding-left: 20px;
}

.help-tooltip li {
    margin: 4px 0;
}

.help-icon-container:hover .help-tooltip {
    visibility: visible;
    opacity: 1;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 40px;  /* コントロールグループ間の間隔を広げる */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #333;
    color: #00ff00;
    border: 1px solid #00ff00;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #00ff00;
    color: #000;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 5px;  /* 要素間の間隔を詰める */
}

input[type="range"] {
    width: 120px;  /* スケールバーを少し長く */
    margin: 0 5px;  /* スケールバーの両端の余白を調整 */
}

/* ラベルの右余白を詰める */
.control-group label {
    margin-right: 0;
    white-space: nowrap;
}

.capture-controls {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
}

.capture-controls button {
    margin: 0 10px;
}

.capture-preview {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.capture-preview.visible {
    display: block;
}

.capture-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

canvas {
    width: 100%;
    height: 500px; /* 目盛り表示のためにさらにスペースを確保 */
    background-color: #000;
    border: 1px solid #00ff00;
    margin-bottom: 20px;
    padding-bottom: 30px; /* 目盛り表示用の余白 */
}

.control-group label {
    color: #00ff00;
    min-width: 120px;
}

#timeScale {
    accent-color: #00ff00;
}

#amplitudeScale {
    accent-color: #00ff00;
}

.scale-value {
    color: #00ff00;
    margin-left: 5px;   /* スケールバーとの間隔を詰める */
    min-width: 70px;    /* 値の表示幅を調整 */
    display: inline-block;
    white-space: nowrap;
}