/* =========================================== */
/* 全局样式重置与基础设置 */
/* =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}
/* 顶部导航栏模块 */
/* =========================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left h1 {
    font-size: 18px;
    color: #007AFF;
    margin-bottom: 2px;
}

.header-left p {
    font-size: 12px;
    color: #999;
}

.header-right {
    display: flex;
    gap: 12px;
}

/* 顶部导航栏按钮 */
.btn-log, .btn-pingte, .btn-settings {
    padding: 10px 16px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    cursor: pointer;
    transition: none;
    min-width: 60px;
}

.btn-log {
    background-color: #4CAF50;
    color: #fff;
}

.btn-pingte {
    background-color: #4CAF50;
    color: #fff;
}

.btn-settings {
    background-color: #666;
    color: #fff;
}

/* =========================================== */
/* 主要内容模块 */
/* =========================================== */
.main-content {
    padding: 16px;
    min-height: calc(100vh - 120px);
    padding-bottom: 60px;
}

/* =========================================== */
/* 数据输入区域模块 */
/* =========================================== */
.input-section {
    margin-bottom: 24px;
}

/* 标签切换 */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    align-items: center;
}

.btn-add-user {
    padding: 8px;
    border: none;
    border-radius: 50%;
    background-color: #4CAF50;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    margin-left: auto;
}

.tab {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background-color: #f0f0f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    max-width: 90px;
}

.tab-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: #f0f0f0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23333" d="M0 0l6 6 6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
    min-width: 100px;
    max-width: 120px;
}

.tab.active {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
}

.tab-select.active {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23fff" d="M0 0l6 6 6-6z"/></svg>');
}

/* 隐藏原生的下拉框，但保留其功能 */
.tab-select[style*="display: none"] {
    display: none !important;
}

/* =========================================== */
/* 自定义下拉框模块 */
/* =========================================== */
.custom-dropdown {
    position: relative;
    display: inline-block;
    min-width: 100px;
    max-width: 120px;
    vertical-align: middle;
}

.dropdown-selected {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background-color: #f0f0f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path fill="%23333" d="M0 0l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;
    min-height: 28px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-selected:hover {
    background-color: #e0e0e0;
}

.dropdown-selected.active {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23fff" d="M0 0l6 6 6-6z"/></svg>');
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    min-width: 120px;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f8f8;
}

.dropdown-text {
    flex: 1;
    font-size: 16px;
    color: #333;
}

.delete-btn {
    color: #FF3B30;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.delete-btn:hover {
    background-color: #FF3B30;
    color: #fff;
}

/* 输入容器 */
.input-container textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    margin-bottom: 16px;
    overflow-y: hidden;
}

/* 输入按钮 */
.input-buttons {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
}

/* 输入按钮 */
.btn-submit, .btn-cancel, .btn-clear {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: none;
    min-height: 36px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-submit {
    background-color: #007AFF;
    color: #fff;
}

.btn-cancel {
    background-color: #FF9500;
    color: #fff;
}

.btn-clear {
    background-color: #FF3B30;
    color: #fff;
}

/* =========================================== */
/* 统计结果区域模块 */
/* =========================================== */
.result-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 结果头部 */
.result-header {
    margin-bottom: 16px;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.result-item {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #333;
}

.result-item:first-child {
    font-size: 16px;
    color: #007AFF;
    font-weight: bold;
    flex: 0 0 40px;
    text-align: left;
}

.result-item:nth-child(2) {
    font-size: 14px;
    color: #333;
}

.total-amount {
    color: #FF3B30;
    font-weight: bold;
}

.rebate-amount {
    color: #007AFF;
    font-weight: bold;
}

/* 结果控制 */
.result-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.sort-select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #f0f0f0;
    min-width: 0;
}

.btn-copy, .btn-report {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: none;
    min-width: 0;
}

.btn-copy {
    background-color: #007AFF;
    color: #fff;
    min-width: 120px;
}

.btn-report {
    background-color: #FF9500;
    color: #fff;
}

/* 结果表格 */
.result-table {
    width: 100%;
    overflow-x: auto;
    max-height: calc(100vh - 300px); /* 确保表格有最大高度，避免被底部导航栏遮挡 */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

th {
    font-weight: 600;
    color: #666;
    background-color: #f9f9f9;
}

/* 号码颜色类 */
.number-red {
    color: #FF0000;
}

.number-blue {
    color: #007AFF;
}

.number-green {
    color: #4CAF50;
}

/* =========================================== */
/* 底部导航栏模块 */
/* =========================================== */
.footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 0;
    background-color: #fff;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 12px;
    transition: none;
    min-width: 80px;
}

.footer-btn.active {
    color: #007AFF;
}

.footer-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.footer-btn span:last-child {
    font-size: 14px;
}

/* =========================================== */
/* 弹窗模块 */
/* =========================================== */
/* 弹窗容器 */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 1000;
    display: none;
    flex-direction: column;
}

/* 弹窗显示 */
.popup.show {
    display: flex;
}

/* 弹窗头部 */
.popup-header {
    background-color: #FF6B6B;
    color: #fff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    position: relative;
    height: 44px;
    min-height: 44px;
}

.popup-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    margin-right: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* 弹窗内容 */
.popup-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

/* 输入行 */
.input-row {
    position: relative;
    margin-bottom: 20px;
}

.input-row.fixed-top {
    position: sticky;
    top: 0;
    background-color: white;
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.input-row input,
.input-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

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

.input-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

/* 结果区域 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-section h3 {
    font-size: 14px;
    color: #333;
    margin: 0;
}

.section-header .slider-toggle {
    margin-left: 10px;
}

/* 显示切换按钮 */
.display-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.toggle-btn {
    padding: 4px 8px;
    border: none;
    background-color: #f5f5f5;
    cursor: pointer;
    font-size: 12px;
}

.toggle-btn.active {
    background-color: #007AFF;
    color: white;
}

/* 紧凑模式记录项 */
.record-item.compact {
    font-weight: bold;
    background-color: #f0f0f0;
    margin-bottom: 8px;
    border-radius: 4px;
}

.result-summary {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* 记录列表 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.record-amount {
    color: #4CAF50;
    font-weight: 600;
}

/* 左右滑动切换按钮 */
.slider-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.slider-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #4CAF50;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-label {
    background-color: #ccc;
}

input:checked + .slider-label:before {
    transform: translateX(24px);
}

/* 滑动按钮左侧的文字标签，点击时自动切换 */
.slider-toggle {
    /* 默认文字为"详细" */
    --toggle-text: "详细";
}

.slider-toggle::before {
    content: var(--toggle-text);
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}

/* 移除右边的"紧凑"文字标签 */

/* 弹窗底部 */
.popup-footer {
    padding: 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-height: auto;
}

.btn-primary {
    background-color: #4A90E2;
    color: #fff;
}

.btn-secondary {
    background-color: #FF6B6B;
    color: #fff;
}

/* 弹窗和提示框模块 */
/* =========================================== */

/* 提示框样式 */
.alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 16px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 1s ease-in-out;
}

/* 提示框动画 */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* 弹窗容器 */
.prompt-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* 弹窗内容 */
.prompt-dialog {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
}

/* 弹窗提示信息 */
.prompt-message {
    margin: 0 0 16px 0;
    font-size: 16px;
}

/* 弹窗输入框 */
.prompt-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* 弹窗按钮容器 */
.prompt-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 弹窗按钮 */
.prompt-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.prompt-button.cancel {
    border: 1px solid #ddd;
    background-color: #f5f5f5;
}

.prompt-button.confirm {
    background-color: #007AFF;
    color: white;
}

/* 确认对话框样式 */
.confirm-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.confirm-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 80%;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.confirm-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.confirm-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.confirm-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.confirm-button.cancel {
    border: 1px solid #ddd;
    background-color: #f5f5f5;
}

.confirm-button.confirm {
    background-color: #007AFF;
    color: #fff;
}

/* 输入框样式 */
.user-input {
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 120px;
    max-width: 120px;
}

/* 号码选择容器 */
#number-checkbox-container {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* 号码选择项 */
.number-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.number-wrapper.selected {
    background-color: #ffebee;
}

.number-wrapper.selected .number-text {
    color: #f44336;
}

.number-text {
    font-size: 12px;
    text-align: center;
}

/* 输入容器 */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

/* =========================================== */
/* 响应式设计模块 */
/* =========================================== */
@media (max-width: 480px) {
    /* 顶部导航栏响应式 */
    .header {
        padding: 10px 12px;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .btn-log, .btn-pingte, .btn-settings {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* 主要内容响应式 */
    .main-content {
        padding: 12px;
    }
    
    /* 结果控制响应式 */
    .result-controls {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .sort-select {
        flex: 1;
        min-width: 100px;
        font-size: 12px;
    }
    
    .btn-copy, .btn-report {
        flex: 0 0 auto;
        min-width: 80px;
        font-size: 12px;
        padding: 10px;
    }
    
    /* 移动端表格样式 */
    .result-table {
        max-height: calc(100vh - 320px); /* 移动端调整高度，增加空间 */
        overflow-y: auto; /* 确保可以滚动 */
        overflow-x: auto; /* 允许横向滚动 */
        scrollbar-width: thin; /* 显示细滚动条 */
        scrollbar-color: #007AFF #f0f0f0; /* 滚动条颜色 */
    }
    
    /* 自定义滚动条样式 */
    .result-table::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .result-table::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }
    
    .result-table::-webkit-scrollbar-thumb {
        background: #007AFF;
        border-radius: 3px;
    }
    
    .result-table::-webkit-scrollbar-thumb:hover {
        background: #0056b3;
    }
    
    /* 表格列宽度调整 */
    #zodiac-table {
        width: 100%;
        table-layout: fixed;
    }
    
    #zodiac-table th:first-child,
    #zodiac-table td:first-child {
        flex: 1; /* 序号列自适应宽度 */
        min-width: 100px;
    }
    
    #zodiac-table th:nth-child(2),
    #zodiac-table td:nth-child(2) {
        width: 80px; /* 号码生肖列宽度 */
        min-width: 80px;
        max-width: 100px;
    }
    
    #zodiac-table th:nth-child(3),
    #zodiac-table td:nth-child(3) {
        width: 80px; /* 累计金额列宽度 */
        min-width: 80px;
        text-align: right;
    }
    
    #zodiac-table th:nth-child(4),
    #zodiac-table td:nth-child(4) {
        width: 80px; /* 风险值列宽度 */
        min-width: 80px;
        text-align: right;
    }
    
    th, td {
        padding: 10px 8px; /* 调整移动端内边距，增加可读性 */
        font-size: 14px; /* 调整移动端字体大小，确保在小屏幕上显示正常 */
    }
    
    /* 移动端复选框优化 */
    .number-checkbox {
        transform: scale(1.2); /* 增大复选框大小，便于触摸 */
        margin-right: 6px;
    }
    
    /* 确保表格内容不被底部导航栏遮挡 */
    .main-content {
        padding-bottom: 80px; /* 增加底部内边距 */
    }
    
    /* 移动端弹窗响应式 */
    .prompt-dialog {
        width: 95%;
        padding: 16px;
        animation: popupSlideIn 0.3s ease-out;
    }
    
    .confirm-box {
        width: 90%;
        padding: 16px;
        animation: popupSlideIn 0.3s ease-out;
    }
    
    /* 弹窗动画 */
    @keyframes popupSlideIn {
        from {
            opacity: 0;
            transform: translateY(50px) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* 弹窗按钮移动端优化 */
    .prompt-button {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
        transition: all 0.2s ease;
        border-radius: 8px;
    }
    
    .confirm-button {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
        transition: all 0.2s ease;
        border-radius: 8px;
    }
    
    /* 触摸反馈效果 */
    .prompt-button:active,
    .confirm-button:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* =========================================== */
/* 兑奖统计界面模块 */
/* =========================================== */
.stats-container {
    padding: 16px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 澳门香港切换导航栏 */
.stats-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.stats-nav-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: #f0f0f0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-nav-btn.active {
    background-color: #007AFF;
    color: #fff;
    border-color: #007AFF;
}

/* 期数显示 */
/* 平码输入区域 */
.pingma-container {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    font-size: 0;
}

.pingma-container label {
    font-size: 16px;
    font-weight: 600;
    min-width: 60px;
    white-space: nowrap;
}

.pingma-container input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 45px;
    text-align: center;
    -moz-appearance: textfield;
    margin: 0;
    display: inline-block;
    box-sizing: border-box;
}

.pingma-container input::-webkit-outer-spin-button,
.pingma-container input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 特码输入区域 */
.special-number-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: nowrap;
}

.special-number-container #period-display {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.special-number-container label {
    font-size: 16px;
    font-weight: 600;
    min-width: 60px;
    white-space: nowrap;
}

.special-number-container input {
    flex: 1;
    max-width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    white-space: nowrap;
    text-align: center;
    -moz-appearance: textfield;
}

.special-number-container input::-webkit-outer-spin-button,
.special-number-container input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 号码颜色类 */
.number-red {
    color: #FF3B30;
}

.number-blue {
    color: #007AFF;
}

.number-green {
    color: #34C759;
}

/* 统计列表 */
.stats-table-container {
    overflow-x: auto;
}

#stats-table {
    width: 100%;
    border-collapse: collapse;
}

#stats-table th,
#stats-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#stats-table th {
    background-color: #f0f0f0;
    font-weight: 600;
    position: sticky;
    top: 0;
}

#stats-table tr:hover {
    background-color: #f5f5f5;
}

#stats-table tr:first-child {
    background-color: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .stats-nav {
        gap: 8px;
    }
    
    .stats-nav-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .special-number-container {
        flex-direction: row;
        align-items: center;
    }
    
    .special-number-container label {
        min-width: 60px;
        margin-bottom: 0;
    }
    
    .special-number-container input {
        flex: 1;
    }
    
    #stats-table th,
    #stats-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
}

/* =========================================== */
/* 日志窗口样式模块 */
/* =========================================== */

/* 日志窗口容器 */
.log-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    touch-action: none;
    overflow: hidden;
}

/* 日志窗口内容 */
.log-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 80%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateZ(0);
    position: relative;
}

/* 日志窗口头部 */
.log-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 日志窗口标题 */
.log-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* 日志窗口操作区域 */
.log-actions {
    display: flex;
    gap: 8px;
}

/* 日志窗口清空按钮 */
.log-clear-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: #f5f5f5;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.log-clear-btn:hover {
    background-color: #e0e0e0;
}

.log-clear-btn:active {
    transform: scale(0.98);
    background-color: #d0d0d0;
}

/* 日志窗口关闭按钮 */
.log-close-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    background-color: #007AFF;
    color: white;
    font-size: 11px;
    cursor: pointer;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.log-close-btn:hover {
    background-color: #0056b3;
}

.log-close-btn:active {
    transform: scale(0.98);
    background-color: #004085;
}

/* 日志列表 */
.log-list {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 空日志提示 */
.log-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* 日志项 */
.log-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

/* 日志时间 */
.log-time {
    color: #666;
    margin-right: 8px;
}

/* 日志用户 */
.log-user {
    color: #333;
    font-weight: 500;
    margin-right: 8px;
}

/* 日志操作 */
.log-action {
    color: #007AFF;
    margin-right: 8px;
}

/* 日志内容 */
.log-content-text {
    color: #333;
}

/* 日志过滤器 */
.log-filter {
    display: flex;
    gap: 16px;
    align-items: center;
}

.log-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* 解析复选框颜色 */
.log-filter-item:has(input[value="parse"]) {
    color: #FF3B30; /* 红色 - 解析 */
}

/* 提交复选框颜色 */
.log-filter-item:has(input[value="submit"]) {
    color: #007AFF; /* 蓝色 - 提交 */
}

/* 撤销复选框颜色 */
.log-filter-item:has(input[value="undo"]) {
    color: #4CAF50; /* 绿色 - 撤销 */
}

.log-filter-item input[type="checkbox"] {
    cursor: pointer;
}

/* 日志类型颜色 */
.log-parse {
    color: #FF3B30; /* 红色 - 解析 */
}

.log-submit {
    color: #007AFF; /* 蓝色 - 提交 */
}

.log-undo {
    color: #4CAF50; /* 绿色 - 撤销 */
}

.log-parse .log-action,
.log-submit .log-action,
.log-undo .log-action {
    color: inherit;
}

.log-parse .log-content-text,
.log-submit .log-content-text,
.log-undo .log-content-text {
    color: inherit;
}

/* 日志窗口移动端适配 */
@media (max-width: 480px) {
    .log-content {
        width: 95%;
        max-height: 85%;
    }
    
    .log-header {
        padding: 16px;
    }
    
    .log-title {
        font-size: 18px;
    }
    
    .log-clear-btn, .log-close-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 70px;
    }
    
    .log-list {
        padding: 12px;
    }
    
    .log-item {
        padding: 10px;
        font-size: 13px;
    }
}
