/* ベーススタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #3b82f6;
    color: white;
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}
header h1 {
    font-size: 1.8rem;
}
header p {
    font-size: 1rem;
    opacity: 0.9;
}
footer {
    background-color: #f8fafc;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}
.manual-link {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin: 1rem 0;
    transition: background-color 0.3s;
}
.manual-link:hover {
    background-color: #2563eb;
}
.important-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 1rem;
    margin: 1rem auto;
    text-align: center;
    max-width: 500px;
}
/* 既存のスタイルを上書きしないよう注意 */
.container {
    margin: 0 auto;
    max-width: 500px;
}

/* ランドルト環表示エリア */
.display-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    border: 2px solid #333;
    border-radius: 8px;
    margin: 20px 0;
    padding: 10px;
    overflow: visible;
}

#displayArea {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#displayArea svg {
    width: auto;
    height: auto;
}

/* コントロール部分 */
.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ボタンスタイル */
button {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #3b82f6;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2563eb;
}

button.stop {
    background-color: #ef4444;
}

button.stop:hover {
    background-color: #dc2626;
}

/* フォーム要素 */
select, 
input[type="range"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

/* キャリブレーション画面 */
.calibration-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.calibration-header {
    width: 100%;
    text-align: center;
}

.calibration-header h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.calibration-description {
    margin-bottom: 5px;
    line-height: 1.6;
}

.landolt-display-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 100%;
    border: 2px dashed #ccc;
    margin: 10px 0;
    padding: 20px;
    overflow: visible;
}

#calibrationLandolt {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#calibrationLandolt svg {
    width: auto;
    height: auto;
}

.calibration-controls {
    width: 300px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* スライダー設定 */
.slider-container {
    width: 100%;
    margin: 15px 0;
}

#sizeSlider {
    width: 100%;
    margin: 0;
}

input[type="range"] {
    -webkit-appearance: none;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
}

/* ステータス表示 */
.status-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.remaining {
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
}

.acuity-display {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    color: #3b82f6;
}

/* ボタンコンテナ */
.button-container {
    text-align: center;
    margin-top: 15px;
}

/* サイズ表示 */
.size-display {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}