* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 30px 15px 30px;
    font-size: 28px;
    text-align: center;
}

.subtitle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 0 30px 20px 30px;
    font-size: 14px;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e8e8e8;
    color: #667eea;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

/* 选项卡内容 */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

/* 输入组 */
.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 25px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    min-width: 40px;
}

.input-group input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    width: 100px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-group input[type="text"] {
    width: 250px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 搜索建议 */
.search-container {
    position: relative;
    flex: 1;
}

#pantone-search {
    width: 100%;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

/* 结果卡片 */
.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.color-preview {
    width: 100%;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    transition: background 0.3s;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.color-block {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.color-block h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 14px;
}

.color-block p {
    font-family: monospace;
    font-size: 13px;
    color: #333;
    word-break: break-all;
}

.pantone-match {
    background: linear-gradient(135deg, #f5f0ff 0%, #ede8ff 100%);
}

.pantone-match h4 {
    color: #764ba2;
}

.delta-e {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* 潘通色块 */
.pantone-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid #eee;
}

.pantone-item:last-child {
    margin-bottom: 0;
}

.pantone-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pantone-info {
    flex: 1;
    min-width: 0;
}

.pantone-info p {
    font-family: monospace;
    font-size: 13px;
    color: #333;
    word-break: break-all;
}

/* 页脚说明 */
.footer {
    text-align: center;
    color: rgba(44, 43, 43, 0.8);
    font-size: 12px;
    line-height: 1.9;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* 响应式 */
@media (max-width: 700px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .search-container {
        width: 100%;
    }
    
    #pantone-search {
        width: 100%;
    }
}