* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 16px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.header p {
    color: #666;
    font-size: 14px;
}

.status {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

/* 下载按钮样式 */
.download-container {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.download-btn:active {
    transform: translateY(0);
}

.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    color: #155724;
    text-decoration: none;
    border: 1px solid #155724;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-link-btn:hover {
    background: #155724;
    color: white;
}

.download-hint {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

.status.loading {
    background: #e7f3ff;
    color: #004085;
}

/* 分组容器 */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
}

.group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
}

.industry-btn {
    padding: 6px 12px;
    font-size: 13px;
    color: #667eea;
    background: white;
    border: 1px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.industry-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.industry-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.industry-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #004085;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 16px;
        border-radius: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .status {
        font-size: 13px;
        padding: 12px;
    }

    .groups-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .group-items {
        gap: 6px;
    }

    .industry-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }

    .industry-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    .group-header {
        padding: 8px 12px;
        font-size: 13px;
    }
}
