/* 布局调整优化 v2.0 - 用户体验增强 */
/* 减少!important使用，提高可维护性 */

/* 关键词输入框优化 */
#keyword {
    width: 100%;
    min-height: 160px;
    font-size: 16px;
    padding: 15px;
    box-sizing: border-box;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #ffffff;
}

#keyword:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

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

/* 生成按钮优化 */
#generateBtn {
    min-width: 120px;
    max-width: 180px;
    height: 60px;
    margin: 20px auto 0;
    display: block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#generateBtn:hover {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);  /* 悬浮时稍深 */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);  /* 悬浮阴影 */
}

#generateBtn:active {
    transform: translateY(0);
}

#generateBtn:disabled {
    background: #f8f9fa;                   /* 禁用时更浅 */
    color: #adb5bd;                        /* 禁用文字颜色 */
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
/* 按钮涟漪效果 */
#generateBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#generateBtn:active::before {
    width: 300px;
    height: 300px;
}

/* 表单组优化 */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

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

.form-group .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.4;
}

/* 输入面板优化 */
.input-panel {
    padding: 30px 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 表单验证状态 */
.form-group.has-error #keyword {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group.has-success #keyword {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.error-message {
    color: #2c3e50;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-group.has-error .error-message {
    display: block;
}

/* 字符计数器 */
.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

.char-counter.warning {
    color: #fd7e14;
}

.char-counter.danger {
    color: #dc3545;
}

/* 加载状态下的按钮 */
#generateBtn.loading {
    pointer-events: none;
    background: #6c757d;
}

#generateBtn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    #keyword {
        min-height: 140px;
        font-size: 16px; /* 防止iOS缩放 */
        padding: 12px;
    }
    
    #generateBtn {
        min-width: 140px;
        max-width: 100%;
        height: 44px;
        font-size: 15px;
        margin-top: 15px;
    }
    
    .input-panel {
        padding: 20px 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    #keyword {
        min-height: 120px;
        padding: 10px;
    }
    
    #generateBtn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .input-panel {
        padding: 15px 12px;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    #keyword,
    #generateBtn,
    #generateBtn::before {
        transition: none;
    }
    
    #generateBtn:hover {
        transform: none;
    }
    
    #generateBtn::after {
        animation: none;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    #keyword {
        border-width: 3px;
    }
    
    #generateBtn {
        border: 2px solid white;
    }
}

/* 优化版标记 2025-06-25 */.enterprise-process-monitor { display: none !important; }
