/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* 生成器部分 */
.generator-section {
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 25px;
}

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

/* 表单控件样式 */
.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* 输入项样式 */
.input-item {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.input-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.input-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.input-item-title {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.remove-item {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    background: #ff3742;
    transform: scale(1.1);
}

/* WiFi特殊输入样式 */
.wifi-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Logo部分样式 */
.logo-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.logo-section:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.logo-label {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.logo-label:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.file-input {
    display: none;
}

.logo-preview {
    margin-top: 15px;
    text-align: center;
}

.logo-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 批量控制按钮 */
.batch-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
}

/* 生成按钮特殊样式 */
.generate-section {
    text-align: center;
    margin-bottom: 30px;
}

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

/* 结果部分样式 */
.results-section {
    display: none;
    border-top: 2px solid #e1e5e9;
    padding-top: 30px;
}

.results-section.show {
    display: block;
}

.results-section h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.qr-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qr-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.qr-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qr-item canvas {
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.qr-item-info {
    margin-bottom: 15px;
}

.qr-item-type {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.qr-item-content {
    font-size: 14px;
    color: #333;
    word-break: break-all;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qr-item-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.download-section {
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .wifi-inputs {
        grid-template-columns: 1fr;
    }
    
    .batch-controls {
        flex-direction: column;
    }
    
    .qr-results {
        grid-template-columns: 1fr;
    }
    
    .qr-item-actions {
        flex-direction: column;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功提示 */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* 错误提示 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}