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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

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

h1 {
    color: #1a73e8;
    margin-bottom: 10px;
}

h2 {
    color: #202124;
    margin-bottom: 15px;
}

h3 {
    color: #5f6368;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* 输入区域样式 */
.input-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.description {
    color: #5f6368;
    margin-bottom: 15px;
}

.input-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

select {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    min-width: 180px;
}

select:focus {
    outline: none;
    border-color: #1a73e8;
}

.combination-rules {
    background-color: #f1f3f4;
    padding: 15px;
    border-radius: 4px;
}

.rule-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.rule-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.prefix-suffix {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.prefix-group, .suffix-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    width: 150px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.primary-button {
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: flex-start;
}

.primary-button:hover {
    background-color: #1765cc;
}

.primary-button:active {
    background-color: #155db9;
}

/* 结果区域样式 */
.results-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.secondary-button {
    background-color: #f1f3f4;
    color: #202124;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.secondary-button:hover {
    background-color: #e8eaed;
}

.secondary-button:active {
    background-color: #dadce0;
}

.secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.results-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background-color: #f1f3f4;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dadce0;
}

th {
    font-weight: 600;
    color: #5f6368;
}

tr:hover {
    background-color: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-button {
    background-color: transparent;
    border: none;
    color: #1a73e8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.no-results {
    text-align: center;
    padding: 40px 0;
    color: #5f6368;
    font-style: italic;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 115, 232, 0.3);
    border-radius: 50%;
    border-top-color: #1a73e8;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #5f6368;
}

/* 页脚样式 */
footer {
    margin-top: 40px;
    text-align: center;
    color: #5f6368;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .options, .prefix-suffix {
        flex-direction: column;
        gap: 15px;
    }
    
    .option-group, .prefix-group, .suffix-group {
        width: 100%;
    }
    
    select, input[type="text"] {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
}