/* Silent Game Plugin CSS */

.silent-game-container {
    font-family: 'Comic Sans MS', cursive, Arial, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* テーマ: 子供向け */
.silent-game-container[data-theme="kids"] {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.silent-game-container[data-theme="kids"] .silent-game-layout {
    background: white;
    border-radius: 15px;
    padding: 20px;
}

/* テーマ: シンプル */
.silent-game-container[data-theme="simple"] {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

/* レイアウト */
.silent-game-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.game-main {
    flex: 2;
    text-align: center;
}

.game-sidebar {
    flex: 1;
    min-width: 280px;
}

/* メインエリア */
.game-title {
    font-size: 36px;
    color: #ff6b6b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.game-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.challenge-display {
    font-size: 28px;
    font-weight: bold;
    color: #4ecdc4;
    background: #f0f8ff;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border: 3px dashed #4ecdc4;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-controls {
    margin: 30px 0;
}

.btn-start, .btn-new-challenge {
    padding: 20px 40px;
    margin: 10px;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.btn-new-challenge {
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
    font-size: 20px;
    padding: 15px 25px;
}

.btn-start:hover, .btn-new-challenge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.game-status {
    font-size: 20px;
    margin: 20px 0;
    min-height: 30px;
}

.game-status.success {
    color: #27ae60;
    animation: bounce 0.6s ease-in-out;
}

.game-status.danger {
    color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

.game-status.warning {
    color: #f39c12;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    80% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.score-display {
    font-size: 20px;
    color: #2d3436;
    margin: 20px 0;
    background: #dff0d8;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #27ae60;
}

.volume-indicator {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    margin: 15px 0;
    overflow: hidden;
    border: 3px solid #bdc3c7;
    position: relative;
}

.volume-bar {
    height: 100%;
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 12px;
    position: relative;
}

.volume-bar.safe {
    background: linear-gradient(to right, #27ae60, #2ecc71);
}

.volume-bar.warning {
    background: linear-gradient(to right, #f39c12, #e67e22);
}

.volume-bar.danger {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.threshold-marker {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 3px;
    background: #2c3e50;
    border-radius: 2px;
}

.threshold-marker::after {
    content: 'アウト！';
    position: absolute;
    top: -35px;
    right: -15px;
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: bold;
}

.volume-help {
    font-size: 14px;
    color: #666;
    margin: 5px 0 20px 0;
}

.waveform-canvas {
    border: 4px solid #ff6b6b;
    border-radius: 15px;
    margin: 20px 0;
    background: linear-gradient(45deg, #fff5f5, #f0f8ff);
    max-width: 100%;
    height: auto;
}

/* サイドバー */
.sidebar-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #dee2e6;
}

.message-box, .message-title, .message-content {
    /* 削除されたメッセージボックスのスタイル */
    display: none;
}

.challenge-display {
    /* 削除されたチャレンジ表示のスタイル */
    display: none;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.preset-difficulty {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-difficulty {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    color: white;
    width: 100%;
}

.btn-difficulty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-difficulty.active {
    background: linear-gradient(45deg, #fd79a8, #e84393);
}

.custom-controls {
    /* スタイルは既存のまま */
}

.slider-group {
    margin: 15px 0;
}

.slider-label {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.threshold-slider, .duration-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    -webkit-appearance: none;
}

.threshold-slider {
    background: linear-gradient(to right, #27ae60, #f39c12, #e74c3c);
}

.duration-slider {
    background: linear-gradient(to right, #ff6b6b, #4ecdc4, #a29bfe);
}

.threshold-slider:hover, .duration-slider:hover {
    opacity: 1;
}

.threshold-slider::-webkit-slider-thumb, .duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4ecdc4;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.duration-slider::-webkit-slider-thumb {
    border-color: #ff6b6b;
}

.threshold-slider::-moz-range-thumb, .duration-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #4ecdc4;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.slider-value {
    font-size: 14px;
    font-weight: bold;
    color: #4ecdc4;
    margin-top: 8px;
    text-align: center;
}

/* ヘルプセクション */
.help-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border: 2px solid #e17055;
}

.help-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-content li {
    padding: 5px 0;
    font-size: 14px;
    color: #2d3436;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .silent-game-layout {
        flex-direction: column;
    }
    
    .game-sidebar {
        min-width: auto;
        order: -1;
    }
    
    .silent-game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .challenge-display {
        font-size: 20px;
        padding: 15px;
    }
    
    .btn-start {
        font-size: 18px;
        padding: 15px 30px;
    }
    
    .waveform-canvas {
        width: 100%;
        height: 120px;
    }
    
    .preset-difficulty {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn-difficulty {
        flex: 1;
        min-width: 80px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 24px;
    }
    
    .challenge-display {
        font-size: 18px;
        padding: 12px;
    }
    
    .btn-start {
        font-size: 16px;
        padding: 12px 25px;
    }
    
    .message-box, .sidebar-section {
        padding: 15px;
    }
    
    .section-title, .message-title {
        font-size: 14px;
    }
}
    position: relative;
}

.volume-bar {
    height: 100%;
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 12px;
    position: relative;
}

.volume-bar.safe {
    background: linear-gradient(to right, #27ae60, #2ecc71);
}

.volume-bar.warning {
    background: linear-gradient(to right, #f39c12, #e67e22);
}

.volume-bar.danger {
    background: linear-gradient(to right, #e74c3c, #c0392b);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.threshold-marker {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 3px;
    background: #2c3e50;
    border-radius: 2px;
}

.threshold-marker::after {
    content: 'アウト！';
    position: absolute;
    top: -35px;
    right: -15px;
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: bold;
}

.volume-help {
    font-size: 14px;
    color: #666;
    margin: 5px 0 20px 0;
}

.waveform-canvas {
    border: 4px solid #ff6b6b;
    border-radius: 15px;
    margin: 20px 0;
    background: linear-gradient(45deg, #fff5f5, #f0f8ff);
    max-width: 100%;
    height: auto;
}

.difficulty-controls {
    margin: 30px 0;
}

.preset-difficulty {
    margin-bottom: 20px;
}

.btn-difficulty {
    padding: 12px 20px;
    margin: 5px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    color: white;
}

.btn-difficulty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-difficulty.active {
    background: linear-gradient(45deg, #fd79a8, #e84393);
}

.custom-controls {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #dee2e6;
}

.slider-group {
    margin: 15px 0;
}

.slider-label {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    display: block;
}

.threshold-slider, .duration-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    -webkit-appearance: none;
}

.threshold-slider {
    background: linear-gradient(to right, #27ae60, #f39c12, #e74c3c);
}

.duration-slider {
    background: linear-gradient(to right, #ff6b6b, #4ecdc4, #a29bfe);
}

.threshold-slider:hover, .duration-slider:hover {
    opacity: 1;
}

.threshold-slider::-webkit-slider-thumb, .duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4ecdc4;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.duration-slider::-webkit-slider-thumb {
    border-color: #ff6b6b;
}

.threshold-slider::-moz-range-thumb, .duration-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4ecdc4;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.slider-value {
    font-size: 20px;
    font-weight: bold;
    color: #4ecdc4;
    margin-top: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .silent-game-container {
        margin: 10px;
        padding: 20px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .challenge-display {
        font-size: 24px;
        padding: 15px;
    }
    
    .btn-start {
        font-size: 20px;
        padding: 15px 30px;
    }
    
    .waveform-canvas {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 24px;
    }
    
    .challenge-display {
        font-size: 20px;
        padding: 10px;
    }
    
    .btn-start {
        font-size: 18px;
        padding: 12px 25px;
    }
    
    .btn-difficulty {
        padding: 10px 15px;
        font-size: 14px;
        margin: 3px;
    }
}