* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #00ff88;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px dashed #00ff88;
    margin-bottom: 30px;
}

h1 {
    font-size: 2em;
    text-shadow: 0 0 20px #00ff88;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    }

    to {
        text-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88, 0 0 60px #00ff88;
    }
}

.status {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff4444;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.status-icon {
    font-size: 3em;
    /*animation: blink 1s infinite;*/
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

.morse-display {
    background: #0a0a0a;
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    min-height: 80px;
    font-size: 1.8em;
    letter-spacing: 5px;
    word-break: break-all;
    text-align: center;
}

.text-display {
    background: #0a0a0a;
    border: 2px solid #ffaa00;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    min-height: 50px;
    color: #ffaa00;
    text-align: center;
    font-size: 1.3em;
}

.morse-key {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff4444 0%, #aa0000 100%);
    border: 6px solid #ffaa00;
    margin: 25px auto;
    cursor: pointer;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    color: white;
    text-shadow: 0 0 10px #000;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.morse-key:active,
.morse-key.pressed {
    background: radial-gradient(circle, #00ff88 0%, #00aa55 100%);
    box-shadow: 0 0 80px #00ff88;
    transform: scale(0.92);
}

.messages {
    background: #0a0a0a;
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    max-height: 350px;
    overflow-y: auto;
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.message-time {
    font-size: 0.8em;
    color: #888;
}

.message-morse {
    font-size: 1.2em;
    letter-spacing: 3px;
    margin: 5px 0;
}

.message-text {
    color: #ffaa00;
}

.morse-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 5px;
    margin: 20px 0;
    font-size: 0.85em;
}

.morse-char {
    background: rgba(0, 255, 136, 0.1);
    padding: 5px;
    text-align: center;
    border-radius: 5px;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.controls button {
    padding: 12px 20px;
    font-size: 1em;
    background: linear-gradient(45deg, #00ff88, #00aa55);
    border: none;
    border-radius: 10px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #00ff88;
}

.controls button.danger {
    background: linear-gradient(45deg, #ff6666, #cc3333);
}

.controls button.primary {
    background: linear-gradient(45deg, #ffaa00, #ff8800);
    padding: 15px 40px;
    font-size: 1.2em;
}

.sound-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff88;
    transition: all 0.3s;
    user-select: none;
}

.sound-indicator:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: scale(1.1);
}

.sound-indicator.muted {
    border-color: #ff4444;
    opacity: 0.7;
}

footer {
    text-align: center;
    padding: 30px 0;
    border-top: 2px dashed #00ff88;
    margin-top: 30px;
    color: #888;
}

.help-toggle {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px 0;
    text-align: center;
}

.help-content {
    display: none;
    padding: 15px;
}

.help-content.show {
    display: block;
}

.timing-info {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid #ffaa00;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-size: 0.9em;
}

.timing-info .wpm {
    font-size: 1.5em;
    color: #ffaa00;
    margin: 10px 0;
}

.timing-info input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    height: 10px;
    background: linear-gradient(to right, #00ff88, #ffaa00);
    border-radius: 5px;
    outline: none;
}

.timing-info input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.timing-info input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 8px;
}

.current-char {
    display: inline-block;
    background: #00ff88;
    color: #000;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
}

.pending {
    color: #888;
    font-style: italic;
}

.basilisk-time-text {
    /* 背景を黒にして文字を目立たせる */
    background-color: #000;

    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
    /* 太いフォント */
    font-size: 3em;
    font-weight: bold;
    color: #ff0000;
    /* 文字色：赤 */

    /* --- 縁取り文字の設定 --- */
    -webkit-text-stroke: 3px #ffcc00;
    /* 縁取りの太さ：3px、色：黄色 */
    /* text-stroke: 3px #ffcc00; */

    /* --- 影の設定 (さらに縁を強調) --- */
    text-shadow:
        3px 3px 0 #000,
        -3px -3px 0 #000,
        -3px 3px 0 #000,
        3px -3px 0 #000,
        5px 5px 10px rgba(0, 0, 0, 0.5);

    /* --- 文字間隔 --- */
    letter-spacing: 0.1em;

    /* パフォーマンス向上 */
    display: inline-block;
}
