/* 游戏模式选择样式 */
.mode-selection {
    margin-bottom: 12px;
}

.mode-selection h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.mode-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.mode-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(7, 193, 96, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.mode-option:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
}

.mode-option:hover::before {
    left: 100%;
}

.mode-option.selected {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.1);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.2);
}

.mode-icon {
    font-size: 28px;
    margin-right: 0;
    margin-bottom: 4px;
    min-width: auto;
    text-align: center;
    filter: none !important;
    color: inherit;
    background: transparent;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.mode-info {
    background: transparent;
}

.mode-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    background: transparent;
}

.mode-info p {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    background: transparent;
}

.name-input-section {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* 角色选择样式 */
.role-selection {
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.role-selection h3 {
    margin-bottom: 6px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.role-description {
    margin-bottom: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

.role-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.role-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(156, 39, 176, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.role-option:hover {
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.2);
}

.role-option:hover::before {
    left: 100%;
}

.role-option.selected {
    border-color: #9c27b0;
    background: rgba(156, 39, 176, 0.1);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.2);
}

.role-icon {
    font-size: 28px;
    margin-right: 0;
    margin-bottom: 4px;
    min-width: auto;
    text-align: center;
    filter: none !important;
    color: inherit;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.role-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.role-info p {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

.name-input-section {
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.name-input-section h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.name-input-section p {
    margin-bottom: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

/* 名字输入框样式增强 */
.name-input-section #playerNameInput {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    background: #fafafa;
}

.name-input-section #playerNameInput:focus {
    outline: none;
    border-color: #07c160;
    background: white;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.name-input-section #playerNameInput::placeholder {
    color: #999;
    font-size: 14px;
}

/* 名字建议按钮样式增强 */
.name-input-section .name-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.name-input-section .suggestion-btn {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.name-input-section .suggestion-btn:hover {
    border-color: #07c160;
    color: #07c160;
    background: rgba(7, 193, 96, 0.05);
}

/* 难度选择样式 */
.difficulty-selection {
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.difficulty-selection h3 {
    margin-bottom: 6px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.difficulty-description {
    margin-bottom: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
}

.difficulty-slider-container {
    padding: 12px 10px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 6px;
}

.difficulty-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #52b788 0%, #f39c12 50%, #e74c3c 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
    cursor: pointer;
}

.difficulty-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid #07c160;
    transition: all 0.3s ease;
}

.difficulty-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

.difficulty-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid #07c160;
    transition: all 0.3s ease;
}

.difficulty-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

.difficulty-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.difficulty-label {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.difficulty-label.active {
    color: #07c160;
    font-weight: 600;
    transform: scale(1.1);
}

.difficulty-hint {
    text-align: center;
    color: #666;
    font-size: 12px;
    font-style: italic;
    padding: 6px 10px;
    background: rgba(7, 193, 96, 0.05);
    border-radius: 6px;
}

/* 投票界面样式（狼人杀模式） */
.voting-interface {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 100, 100, 0.05));
    border: 2px solid #ff4444;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    animation: slideDown 0.3s ease-out;
}

.voting-interface h3 {
    color: #d32f2f;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.voting-interface p {
    color: #666;
    margin-bottom: 15px;
}

.vote-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 15px 0 20px 0;
}

.vote-option {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.vote-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.1), transparent);
    transition: left 0.5s ease;
}

.vote-option:hover {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
    transform: translateY(-1px);
}

.vote-option:hover::before {
    left: 100%;
}

.vote-option.selected {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    color: #d32f2f;
    font-weight: 600;
}

.vote-name {
    font-size: 14px;
    font-weight: 500;
}

/* 开放麦输入区域样式 */
.openmic-input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px;
}

.openmic-input-container {
    max-width: 800px;  /* 增加宽度以容纳调试按钮 */
    margin: 0 auto;
    width: 100%;
}

.openmic-input-container textarea {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: #fafafa;
}

.openmic-input-container textarea:focus {
    outline: none;
    border-color: #07c160;
    background: white;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.openmic-input-container textarea::placeholder {
    font-size: 14px;
    color: #999;
}

.openmic-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.openmic-input-footer .char-count {
    font-size: 12px;
    color: #666;
}

.openmic-input-footer .input-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.openmic-send-btn {
    background: linear-gradient(135deg, #07c160, #06ad56);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.debug-btn {
    font-size: 13px !important;
    padding: 6px 12px !important;
    min-width: auto !important;
    margin-left: 8px !important;
}

.debug-btn.hidden {
    display: none !important;
}

.debug-btn:not(.hidden) {
    display: inline-block !important;
}

.openmic-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #06ad56, #059c4f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.openmic-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.openmic-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 为游戏界面添加底部边距，避免被输入框遮挡 */
#gameInterface.has-openmic-input {
    padding-bottom: 140px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .openmic-input-area {
        padding: 12px;
    }
    
    .openmic-input-container textarea {
        min-height: 50px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    #gameInterface.has-openmic-input {
        padding-bottom: 120px;
    }
}

/* 模式状态指示器 */
.mode-status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 开放麦轮次分析样式 */
.openmic-round-analysis {
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.1), rgba(7, 193, 96, 0.05));
    border: 2px solid #07c160;
    border-radius: 12px;
    padding: 16px;
    margin: 15px 0;
    animation: slideDown 0.3s ease-out;
}

.openmic-round-analysis .analysis-header h3 {
    color: #07c160;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.openmic-round-analysis .analysis-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.openmic-round-analysis .stat {
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.openmic-round-analysis .stat.passed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.openmic-round-analysis .stat.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.openmic-round-analysis .analysis-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mode-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mode-option {
        flex-direction: row;
        text-align: left;
        padding: 12px;
    }
    
    .mode-icon {
        font-size: 28px;
        margin-right: 12px;
        margin-bottom: 0;
        min-width: 40px;
    }
    
    .mode-info h4 {
        font-size: 15px;
    }
    
    .mode-info p {
        font-size: 13px;
    }
    
    .role-options {
        grid-template-columns: 1fr;
    }
    
    .role-option {
        flex-direction: row;
        text-align: left;
        padding: 12px;
    }
    
    .role-icon {
        font-size: 28px;
        margin-right: 12px;
        margin-bottom: 0;
        min-width: 40px;
    }
    
    .role-info h4 {
        font-size: 15px;
    }
    
    .role-info p {
        font-size: 13px;
    }
    
    .vote-options {
        grid-template-columns: 1fr;
    }
    
    .openmic-round-analysis .analysis-stats {
        gap: 8px;
    }
    
    .openmic-round-analysis .stat {
        font-size: 11px;
    }
}