/* styles.css */

* {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
            padding: 15px;
            max-width: 100%;
            overflow-x: hidden;
        }
        
        .container {
            max-width: 100%;
            margin: 0 auto;
        }
        
        h1 {
            text-align: center;
            margin: 20px 0;
            font-size: 1.8rem;
            color: #2c3e50;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .section {
            background: white;
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .section:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 25px rgba(0,0,0,0.12);
        }
        
        h3 {
            margin-bottom: 15px;
            color: #3498db;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
        }
        
        h3 i {
            margin-right: 10px;
        }
        
        .camera-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .camera-btn {
            flex: 1;
            min-width: 100px;
            padding: 12px;
            background: #edf2f7;
            border: none;
            border-radius: 10px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
            color: #4a5568;
        }
        
        .camera-btn.active {
            background: linear-gradient(135deg, #3498db, #2c3e50);
            color: white;
            box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
        }
        
        .upload-input {
            display: none;
        }
        
        .preview-container {
            position: relative;
            width: 100%;
            height: 300px;
            border-radius: 12px;
            overflow: hidden;
            background: #f8fafc;
            margin: 15px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px dashed #e2e8f0;
            /* 添加光标和悬停效果 */
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .preview-container:hover {
            border-color: #3498db;
            background-color: #edf7ff;
        }
        
        .preview-placeholder {
            color: #a0aec0;
            text-align: center;
            padding: 20px;
        }
        
        .preview-placeholder i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: #cbd5e0;
        }
        
        .preview-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: none;
        }
        
        .attribute-section {
            margin: 20px 0;
            padding: 15px;
            background: #f8fafc;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
        }
        
        .attr-row {
            margin-bottom: 15px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #4a5568;
        }
        
        select {
            width: 100%;
            padding: 12px 15px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: white;
            font-size: 1rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            transition: border-color 0.3s;
        }
        
        select:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
        
        .action-button {
            width: 100%;
            padding: 16px;
            font-size: 1.1rem;
            background: linear-gradient(135deg, #3498db, #2c3e50);
            color: white;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-weight: bold;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            transition: transform 0.2s, box-shadow 0.2s;
            margin: 20px 0;
        }
        
        .action-button:active {
            transform: translateY(2px);
            box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
        }
        
        .loading {
            display: none;
            text-align: center;
            padding: 20px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        }
        
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-left-color: #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .result {
            display: none;
            text-align: center;
        }
        
        .result-image {
            width: 100%;
            max-height: 500px;
            object-fit: contain;
            border-radius: 12px;
            margin: 15px 0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        
        .info-box {
            background: #e3f2fd;
            border-left: 4px solid #3498db;
            padding: 15px;
            border-radius: 0 8px 8px 0;
            margin: 15px 0;
            font-size: 0.9rem;
        }

        /* 新增：警告提示框样式 */
        .warning-box {
            background: #fff3cd; /* 黄色系背景 */
            border-left: 4px solid #ffc107; /* 黄色系边框 */
            padding: 15px;
            border-radius: 0 8px 8px 0;
            margin: 15px 0;
            font-size: 0.9rem;
            text-align: left; /* 左对齐文字 */
        }
        
        /* 响应式调整 */
        @media (min-width: 768px) {
            body {
                padding: 30px;
            }
            
            .section {
                padding: 30px;
            }
            
            h1 {
                font-size: 2.2rem;
            }
            
            .camera-btn {
                font-size: 0.9rem;
            }
        }