/* 黑白简约线条风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000000;
    padding-bottom: 15px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #000000;
}

/* 表格区域样式 */
.table-section {
    margin-bottom: 30px;
}

.table-wrapper {
    /* JavaScript will control the layout dynamically */
    margin: 20px auto;
    max-width: none; /* 移除最大宽度限制 */
    padding: 0 20px;
}

.category-table {
    border: 2px solid #000000;
    border-radius: 5px;
    padding: 6px;
    background-color: #ffffff;
    min-width: 100px;
    max-width: 300px;  /* 调整类别表格容器宽度为300px */
    flex: 1 1 300px;  /* 调整flex基础宽度为300px */
}

.rating-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.rating-table th {
    background-color: #000000;
    color: #ffffff;
    padding: 6px 4px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #000000;
    font-size: 16px;
}

.rating-table th:first-child {
    width: auto; /* 使用自动宽度，让内容决定 */
    padding-right: 3px;
}

.rating-table th:last-child {
    width: 120px; /* 增加喜欢程度列表头宽度 */
    padding-left: 3px;
}

.rating-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #cccccc;
    font-size: 16px;
}

.rating-table td:last-child {
    width: 120px; /* 增加喜欢程度列内容容器宽度 */
}

.rating-table tr:last-child td {
    border-bottom: none;
}

/* M的简介表格特殊样式 - 两列表格 */
.m-intro-table .rating-table th:first-child {
    width: 40%;
}

.m-intro-table .rating-table th:last-child {
    width: 60%;
}

.m-intro-table .rating-table td:first-child {
    width: 40%;
}

.m-intro-table .rating-table td:last-child {
    width: 60%;
}

.m-intro-table .rating-table input[type="text"] {
    width: 100%;
    max-width: 100%; /* 限制输入框宽度不超过表容器 */
    padding: 4px 6px;
    font-size: 14px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.m-intro-table .rating-table select {
    width: 100%;
    max-width: 100%; /* 限制选择框宽度不超过表容器 */
    padding: 4px 6px;
    font-size: 14px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* 选择框样式 */
select.rating {
    width: 100%;
    padding: 6px;
    border: 1px solid #000000;
    border-radius: 3px;
    background-color: #ffffff;
    color: #000000;
    font-size: 12px;
    cursor: pointer;
}

select.rating:focus {
    outline: none;
    border-color: #666666;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

select.rating option {
    background-color: #ffffff;
    color: #000000;
}

/* 按钮容器样式 */
.button-container {
    text-align: center;
    margin: 30px 0;
}

#saveBtn {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#saveBtn:hover {
    background-color: #ffffff;
    color: #000000;
}

#saveBtn:disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
}

/* 底部导航样式 */
.bottom-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.nav-button {
    padding: 10px 20px;
    border: 1px solid #000000;
    border-radius: 5px;
    text-decoration: none;
    color: #000000;
    transition: all 0.3s ease;
}

.nav-button:hover,
.nav-button.active {
    background-color: #000000;
    color: #ffffff;
}

/* 其他页面的导航样式 - 仅文字 */
.nav-text {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 10px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;  /* 减小字体大小 */
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.nav-text:hover,
.nav-text.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #cccccc;
    color: #666666;
}

footer a {
    color: #666666;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 预览窗口样式 */
.preview-window {
    margin: 0; 
    padding: 20px; 
    text-align: center; 
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.preview-container { 
    max-width: 100%; 
    background: white; 
    border-radius: 10px; 
    padding: 20px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-image { 
    max-width: 100%; 
    height: auto; 
    border: 1px solid #ddd; 
    border-radius: 5px;
}

/* 提示样式已移除，不再使用 */

.preview-save-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    color: white;
}

.preview-save-btn.qq {
    background: #12b7f5;
}

.preview-save-btn.wechat {
    background: #07c160;
}

.preview-save-btn.safari {
    background: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .table-wrapper {
        flex-direction: column;
    }
    
    .category-table {
        min-width: 100px;
        max-width: 300px;  /* 调整单列显示时的宽度为300px */
        flex: 1 1 300px;  /* 调整flex基础宽度为300px */
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .bottom-nav {
        flex-wrap: wrap;
    }
    
    select.rating {
        font-size: 16px; /* 手机端字体更大 */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .category-table {
        padding: 10px;
    }
    
    .rating-table th,
    .rating-table td {
        padding: 8px;
    }
    
    #saveBtn {
        width: 100%;
        padding: 15px;
    }
}