/* 全局样式 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

/* 标题样式 */
.main-title {
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    font-size: 1.2rem;
    padding: 15px 40px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-success:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

/* API提供商选择特殊样式 */
#apiProvider {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    font-weight: 500;
}

#apiProvider:focus {
    background-color: white;
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* API模型选择特殊样式 */
#apiModel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    font-weight: 500;
}

#apiModel:focus {
    background-color: white;
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

#apiModel:disabled {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #6c757d;
}

/* API地址显示区域样式 */
#apiUrlContainer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #667eea;
}

#apiUrl {
    background-color: white;
    border: 1px solid #ced4da;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

#apiUrl:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    color: #495057;
}

/* 表单选择器样式 */
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 6l7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select:hover {
    border-color: #667eea;
}

/* 生成控制区域特殊样式 */
.generate-section .row {
    align-items: end;
}

.generate-section .form-label {
    color: #667eea;
    font-weight: 600;
}

.generate-section .form-select {
    background-color: #f8f9fa;
    border-color: #667eea;
}

.generate-section .form-select:focus {
    background-color: white;
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* 用户自定义谜底输入框特殊样式 */
#userAnswer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

#userAnswer:focus {
    background-color: white;
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
    transform: translateY(-1px);
}

#userAnswer::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* 用户自定义谜底标签特殊样式 */
#userAnswer + .text-muted {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* 灯谜内容样式 */
.riddle-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    margin-bottom: 20px;
}

#riddleQuestion {
    color: #2c3e50;
    font-size: 1.3rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* 答案样式 */
.answer-content {
    animation: fadeIn 0.5s ease;
}

.alert-success {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

#riddleAnswer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #155724;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.loading-content p {
    margin: 0;
    color: #495057;
    font-weight: 500;
}

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

.d-none {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .btn-success {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
    
    .riddle-text {
        padding: 20px;
    }
    
    #riddleQuestion {
        font-size: 1.1rem;
    }
}

/* 页脚样式 */
footer {
    color: rgba(255, 255, 255, 0.8) !important;
}