/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #367c8c 0%, #2a5f6f 50%, #1e4a56 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 5px;
    color: white;
    padding: 10px 0;
}

.logo-section {
    text-align: center;
    margin-bottom: 15px;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, #e8f4f8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 메인 컨텐츠 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 전체 모드에서도 내용에 따라 자동으로 늘어나도록 (flex: 1 제거) */

/* 메인 컨트롤 패널 - 2열 레이아웃 */
.main-control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 5px;
}

/* 키워드 부스팅 섹션 */
.keyword-boosting-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(54, 124, 140, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 10px;
}

.keyword-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.keyword-boosting-section h3 {
    color: #367c8c;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-keyword-btn {
    background: transparent;
    border: none;
    color: #367c8c;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.toggle-keyword-btn:hover {
    background: rgba(54, 124, 140, 0.1);
    color: #2a5f6f;
}

.toggle-keyword-btn:active {
    transform: scale(0.95);
}

.keyword-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyword-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.keyword-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.keyword-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.keyword-input:focus {
    outline: none;
    border-color: #367c8c;
    box-shadow: 0 0 0 3px rgba(54, 124, 140, 0.1);
}

.keyword-input::placeholder {
    color: #999;
}

.remove-keyword-btn {
    padding: 8px 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.remove-keyword-btn:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.remove-keyword-btn:active {
    transform: scale(0.95);
}

.add-keyword-btn {
    padding: 10px 16px;
    background: #367c8c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: flex-start;
}

.add-keyword-btn:hover {
    background: #2a5f6f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(54, 124, 140, 0.3);
}

.add-keyword-btn:active {
    transform: translateY(0);
}

/* 키워드 하이라이팅 스타일 - 텍스트 색상만 변경 */
.keyword-highlight {
    color: #e74c3c;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
}

.keyword-highlight-text {
    color: #e74c3c;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
}

.model-selection-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(54, 124, 140, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

.control-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(54, 124, 140, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.model-selection-section h3 {
    color: #367c8c;
    margin-bottom: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.model-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.model-option {
    cursor: pointer;
    position: relative;
}

.model-option input[type="radio"] {
    display: none;
}

.model-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 25px 30px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #367c8c, #4a9ba8);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.model-card i {
    font-size: 1.5rem;
    color: #367c8c;
    margin-bottom: 8px;
    display: block;
}

.model-name {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.model-desc {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
}

.model-option input[type="radio"]:checked + .model-card {
    border-color: #367c8c;
    background: linear-gradient(135deg, #e8f4f8 0%, #d1e7dd 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 124, 140, 0.3);
}

.model-option input[type="radio"]:checked + .model-card::before {
    transform: scaleX(1);
}

.model-option:hover .model-card {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(54, 124, 140, 0.2);
}

.model-card.selected {
    border-color: #367c8c;
    background: rgba(54, 124, 140, 0.1);
}

.model-card.connected {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    position: relative;
}

.model-card.connected::after {
    content: "연결됨";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.model-option input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-card.connected input[type="radio"]:disabled {
    opacity: 1;
}

/* 패널 공통 스타일 */
.status-panel,
.control-panel,
.effects-panel,
.recordings-panel,
.device-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(54, 124, 140, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.speech-recognition-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(54, 124, 140, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* 전체 모드에서도 내용에 따라 자동으로 늘어나도록 (flex: 1 제거) */

/* 상태 패널 - 숨김 */
.status-panel {
    display: none;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.label {
    font-weight: bold;
    color: #666;
    font-size: 0.9rem;
}

.status-value {
    font-size: 1.1rem;
    color: #333;
    margin-top: 5px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* 상태별 색상 */
.status-value.status-connected {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-value.status-error {
    background: #ffebee;
    color: #c62828;
}

.status-value.status-connecting {
    background: #e3f2fd;
    color: #1565c0;
    animation: pulse 1.5s infinite;
}

.status-value.ws-connected {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-value.ws-disconnected {
    background: #fafafa;
    color: #757575;
}

.status-value.ws-error {
    background: #ffebee;
    color: #c62828;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* 컨트롤 패널 */
.control-panel {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

/* 큰 버튼 스타일 */
.control-btn.large {
    padding: 20px 40px;
    font-size: 1.2rem;
    min-width: 180px;
    border-radius: 8px;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn.primary {
    background: #fff;
    color: #367c8c;
    border: 2px solid #367c8c;
}

.control-btn.primary:hover:not(:disabled) {
    background: #367c8c;
    color: #fff;
}

.control-btn.disconnect {
    background: #fff;
    color: #367c8c;
    border: 2px solid #367c8c;
}

.control-btn.disconnect:hover:not(:disabled) {
    background: #367c8c;
    color: #fff;
}

.control-btn.screen-audio {
    background: #fff;
    color: #367c8c;
    border: 2px solid #367c8c;
}

.control-btn.screen-audio:hover:not(:disabled) {
    background: #367c8c;
    color: #fff;
}

.control-btn.screen-audio.active {
    background: #367c8c;
    color: #fff;
}

/* 버튼 툴팁 */
.button-with-tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 16px;
    background: rgba(54, 124, 140, 0.95);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    min-width: 320px;
    max-width: 450px;
    white-space: normal;
    text-align: center;
    line-height: 1.6;
}

.tooltip-hint::after {
    display: none;
}

.tooltip-hint i {
    color: white;
    margin-right: 6px;
}

.tooltip-hint strong {
    color: #fff;
    text-decoration: underline;
}

.button-with-tooltip:hover .tooltip-hint {
    opacity: 1;
    visibility: visible;
}

.control-btn.record {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

.control-btn:not(.primary):not(.record):not(.disconnect):not(.screen-audio) {
    background: linear-gradient(45deg, #367c8c, #2a5f6f);
    color: white;
}

/* 볼륨 패널 (기존 큰 볼륨 바 제거됨) */

/* 시각화 패널 (기존 유지) */
.visualization-panel {
    text-align: center;
}

#visualizer {
    width: 100%;
    max-width: 800px;
    height: 200px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #000;
}

.viz-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.viz-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 이펙트 패널 */
.effects-panel h3 {
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.effect-group {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(240, 240, 240, 0.7);
    border-radius: 10px;
}

.effect-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.effect-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.effect-group input[type="checkbox"] {
    margin-right: 10px;
}

.compressor-controls,
.filter-controls,
.echo-controls {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.compressor-controls label,
.filter-controls label,
.echo-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* 녹음 리스트 */
.recordings-list {
    min-height: 100px;
}

.recording-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(240, 240, 240, 0.7);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.recording-info {
    flex: 1;
    min-width: 200px;
}

.recording-name {
    font-weight: bold;
    color: #333;
}

.recording-details {
    font-size: 0.8rem;
    color: #666;
}

.recording-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.recording-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    min-width: 60px;
    margin: 2px;
}

.recording-btn.play {
    background: #4CAF50;
    color: white;
}

.recording-btn.play:hover {
    background: #45a049;
    transform: scale(1.05);
}

.recording-btn.download {
    background: #2196F3;
    color: white;
}

.recording-btn.download:hover {
    background: #1976D2;
    transform: scale(1.05);
}

.recording-btn.delete {
    background: #f44336;
    color: white;
}

.recording-btn.delete:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.no-recordings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* 디바이스 정보 */
.device-info h3 {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.device-info p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.device-info span {
    font-weight: bold;
    color: #555;
    word-break: break-all;
}

/* 매우 작은 화면 최적화 */
@media (max-width: 480px) {
     .model-card {
         padding: 2px 1px;
         font-size: 0.65rem;
     }
     
     .model-card i {
         font-size: 0.9rem;
         margin-bottom: 1px;
     }
     
     .model-name {
         font-size: 0.75rem;
         margin-bottom: 1px;
     }
     
     .model-desc {
         font-size: 0.6rem;
         line-height: 1.0;
     }
     
     .model-selection-section h3 {
         font-size: 0.8rem;
         margin-bottom: 4px;
     }
     
     header h1 {
         font-size: 1.3rem;
     }
     
     header p {
         font-size: 0.8rem;
     }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
     .container {
         padding: 1px;
         width: 100%;
         box-sizing: border-box;
         overflow-x: hidden;
         height: 100vh;
         display: flex;
         flex-direction: column;
     }
     
     /* 모바일에서는 툴팁을 터치로 표시 */
     .button-with-tooltip:active .tooltip-hint {
         opacity: 1;
         visibility: visible;
     }
     
     .tooltip-hint {
         font-size: 0.75rem;
         padding: 10px 12px;
         min-width: 260px;
         max-width: 90vw;
         bottom: 15px;
     }
    
    .logo-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
     header {
         margin-bottom: 8px;
         padding: 8px 0;
     }
     
     header h1 {
         font-size: 1.5rem;
     }
     
     header p {
         font-size: 0.9rem;
     }
    
     .model-options {
         display: grid;
         grid-template-columns: 1fr 1fr 1fr;
         gap: 2px;
         width: 100%;
         padding: 0 2px;
     }
     
     .model-card {
         width: 100%;
         padding: 4px 2px;
         font-size: 0.7rem;
         text-align: center;
         min-width: 0;
     }
     
     .model-card i {
         font-size: 1rem;
         margin-bottom: 2px;
     }
     
     .model-name {
         font-size: 0.8rem;
         margin-bottom: 1px;
         font-weight: bold;
     }
     
     .model-desc {
         font-size: 0.65rem;
         line-height: 1.1;
     }
    
    .speech-text-area {
        min-height: 300px;
        max-height: 500px;
        height: 500px;
        padding: 15px;
        font-size: 1.1rem;
        overflow-y: auto;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .control-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        width: 100%;
    }
    
    .control-btn {
        width: 100%;
        padding: 6px 2px;
        font-size: 0.8rem;
        text-align: center;
    }
    
     .main-control-panel {
         grid-template-columns: 1fr;
         gap: 2px;
         width: 100%;
         box-sizing: border-box;
         margin-bottom: 2px;
     }
    
    .main-content {
        width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    
    .speech-recognition-panel {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
    }
    
     .model-selection-section {
         padding: 4px;
         width: 100%;
         box-sizing: border-box;
         margin-bottom: 6px;
     }
     
     .model-selection-section h3 {
         font-size: 0.9rem;
         margin-bottom: 6px;
     }
    
    .control-section {
        padding: 6px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 8px;
    }
    
    .speech-header {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 15px;
        align-items: center;
        justify-content: space-between;
    }
    
    .text-display-options {
        justify-content: center;
        flex-direction: row;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .status-panel,
    .control-panel,
    .visualization-panel,
    .effects-panel,
    .recordings-panel,
    .device-info {
        padding: 15px;
    }
    
    .effect-group {
        padding: 10px;
    }
    
    .compressor-controls label,
    .filter-controls label,
    .echo-controls label {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 애니메이션 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.recording .control-btn.record {
    animation: pulse 1s infinite;
}

/* 터치 기기용 개선 */
@media (hover: none) and (pointer: coarse) {
    .control-btn {
        padding: 15px 24px;
        font-size: 1.1rem;
    }
    
    .recording-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    input[type="range"] {
        height: 30px;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .status-panel,
    .control-panel,
    .visualization-panel,
    .effects-panel,
    .recordings-panel,
    .device-info {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
    }
    
    .label,
    .effect-group label,
    .device-info h3,
    .effects-panel h3,
    .recordings-panel h3 {
        color: #b0b0b0;
    }
    
    .status-value,
    .recording-name {
        color: #f0f0f0;
    }
    
    .effect-group {
        background: rgba(60, 60, 60, 0.7);
    }
    
    .recording-item {
        background: rgba(60, 60, 60, 0.7);
    }
}

/* 회의 모드 설정 스타일 */
.mode-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-option {
    flex: 1;
    min-width: 200px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    background: white;
}

.mode-option:hover {
    border-color: #6c5ce7;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.1);
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option input[type="radio"]:checked + .mode-label {
    color: #6c5ce7;
}

.mode-option input[type="radio"]:checked {
    border-color: #6c5ce7;
    background: #f8f7ff;
}

.mode-option:has(input[type="radio"]:checked) {
    border-color: #6c5ce7;
    background: #f8f7ff;
}

.mode-label {
    display: block;
    text-align: center;
}

.mode-label i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.mode-label strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.mode-label small {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
}

.meeting-settings {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    border-left: 4px solid #6c5ce7;
}

.meeting-settings h4 {
    color: #6c5ce7;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.setting-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.setting-group select:focus {
    border-color: #6c5ce7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.mobile-guide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.mobile-guide h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-guide ul {
    list-style: none;
    padding: 0;
}

.mobile-guide li {
    margin-bottom: 8px;
    padding-left: 0;
    line-height: 1.4;
}

.mobile-guide li strong {
    color: #fff;
}

/* 음성 인식 패널 - 다른 패널과 동일한 스타일 적용 */
.speech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.speech-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    color: #333;
}

.text-display-options {
    display: flex;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.option-label input[type="radio"] {
    margin: 0;
    accent-color: #367c8c;
}

.option-label:hover {
    color: #367c8c;
}



.recognition-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.recognition-status {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.recognition-status .status-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.speech-output {
    margin: 20px 0;
}

.speech-output h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
}

.speech-text-area {
    background: #fff;
    color: #333;
    border-radius: 12px;
    padding: 20px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.2rem;
    line-height: 2.0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
    position: relative;
    cursor: text;
    transition: border-color 0.2s ease;
    word-break: break-word;
}

/* 전체 모드에서도 내용에 따라 자동으로 늘어나도록 (flex: 1 제거) */

.speech-text-area:focus {
    outline: none;
    border-color: #367c8c;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(54, 124, 140, 0.1);
}

.speech-text-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(45deg, transparent 49%, rgba(54, 124, 140, 0.05) 50%, transparent 51%);
    background-size: 20px 20px;
    animation: scan 3s linear infinite;
    pointer-events: none;
    opacity: 0;
}

/* 스트리밍 모드에서만 청록색 띠 효과 표시 */
.speech-text-area:not(.full-mode).typing::before {
    opacity: 1;
}

/* 전체 모드에서는 청록색 띠 효과 숨김 */
.speech-text-area.full-mode::before {
    display: none;
}

.speech-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 50px 20px;
}

.speech-text-item {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(54, 124, 140, 0.05);
    border-radius: 8px;
    border-left: 4px solid #367c8c;
    transition: all 0.3s ease;
}

.speech-text-item:hover {
    background: rgba(54, 124, 140, 0.1);
    transform: translateX(2px);
}

.speech-timestamp {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.speech-content {
    display: block;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    font-family: inherit;
}

.speech-final-text {
    margin-bottom: 10px;
    color: #000;
}

.speech-partial-text {
    color: #666;
    font-style: italic;
}

.speech-cursor {
    display: none;
}

.speech-current-text {
    margin-bottom: 10px;
    padding: 12px;
    background: rgba(54, 124, 140, 0.1);
    border-radius: 8px;
    border-left: 4px solid #367c8c;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
}

/* 전체 모드에서는 테두리와 배경 제거 */
.speech-text-area.full-mode .speech-current-text {
    background: transparent;
    border-left: none;
    padding: 0;
    margin-bottom: 0;
    min-height: auto;
}

/* 스트리밍 텍스트 효과 - 단어 단위 */
.streaming-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    line-height: 1.8;
    gap: 2px;
    max-width: 100%;
    overflow: hidden;
}

.streaming-word {
    display: inline-block;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
    margin: 1px;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.streaming-word.level1 {
    font-size: 1.0rem;
    opacity: 0.7;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.streaming-word.level2 {
    font-size: 1.1rem;
    opacity: 0.8;
    color: #555;
    background: rgba(54, 124, 140, 0.08);
}

.streaming-word.level3 {
    font-size: 1.2rem;
    opacity: 0.9;
    color: #444;
    background: rgba(54, 124, 140, 0.12);
}

.streaming-word.level4 {
    font-size: 1.4rem;
    opacity: 1;
    color: #333;
    font-weight: 500;
    background: rgba(54, 124, 140, 0.18);
    box-shadow: 0 1px 2px rgba(54, 124, 140, 0.2);
}

.streaming-word.level5 {
    font-size: 1.6rem;
    opacity: 1;
    color: #222;
    font-weight: 600;
    background: rgba(54, 124, 140, 0.25);
    box-shadow: 0 2px 4px rgba(54, 124, 140, 0.3);
}

/* 작은 볼륨 바 */
.mini-volume-panel {
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px solid rgba(54, 124, 140, 0.1);
}

.mini-volume-bars {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 3px;
    height: 20px;
}

.mini-volume-bar {
    width: 8px;
    height: 4px;
    background-color: #e6e7e8;
    border-radius: 2px;
    transition: all 0.1s ease;
    min-height: 2px;
}

.mini-volume-bar.active {
    background: linear-gradient(135deg, #367c8c, #4a9ba8);
    box-shadow: 0 0 4px rgba(54, 124, 140, 0.3);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes typing {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.recognition-settings {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.status-display {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.recognition-settings h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    color: #333;
}

.recognition-settings .setting-group {
    margin-bottom: 12px;
}

.recognition-settings label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.recognition-settings input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.recognition-settings input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9em;
}

.recognition-settings input[type="text"]:read-only {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

/* 연결 상태별 색상 */
.ws-connected {
    color: #4CAF50 !important;
    font-weight: bold;
}

.ws-connecting {
    color: #FF9800 !important;
}

.ws-disconnected {
    color: #f44336 !important;
}

.speech-listening {
    color: #4CAF50 !important;
    font-weight: bold;
}

.speech-processing {
    color: #2196F3 !important;
}

/* 반응형 디자인 - 회의 모드 */
@media (max-width: 768px) {
    .mode-selection {
        flex-direction: column;
    }
    
    .mode-option {
        min-width: auto;
    }
    
    .setting-group {
        margin-bottom: 12px;
    }

    .recognition-controls {
        flex-direction: column;
    }
    
    .recognition-status {
        flex-direction: column;
        gap: 10px;
    }
    
    .speech-text-area {
        min-height: 120px;
        padding: 15px;
    }
} 