/* style.css */

/* 基本样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 90%;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}


/* 标题样式 */
h2, h3 {
    text-align: center;
    color: #333;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
    margin-bottom: 5px;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

/* 定义自定义div列表样式 */
.custom-div-list {
    padding-left: 0;
}

.list-item {
    position: relative;
    padding-left: 10px;
    margin-bottom: 5px;
}

/* 如果需要符号，可以添加伪元素 */
.list-item::before {
    content: "•"; /* 或者其他符号 */
    color: #5cb85c;
    position: absolute;
    left: 0;
    top: 0;
}

button {
    margin-top: 15px;
    padding: 10px;
    background-color: #5cb85c;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #4cae4c;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-direction: row;
    flex-wrap: wrap;
}

button.export-btn:hover {
    background-color: #025aa5;
}

button.logout-btn {
    background-color: #d9534f;
}

button.logout-btn:hover {
    background-color: #c9302c;
}

a {
    color: #5cb85c;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#todayResults,
#dateResults,
#topResults {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    /*table-layout: fixed;  确保列宽设置生效 */
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 8px;
    text-align: left;
    overflow: hidden; /* 防止内容溢出 */
    text-overflow: ellipsis;
}

.meaning1-header {
    width: 10%; /* 调整为所需的宽度 */
}

.meaning1-cell {
    width: 10%; /* 调整为所需的宽度 */
    white-space: normal; /* 允许内容换行 */
    word-wrap: break-word; /* 防止长词汇溢出 */
}

/* 隐藏元素 */
.hidden {
    display: none;
}

.section {
    margin-top: 30px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        margin: 10px auto;
        padding: 20px;
    }

    h2, h3 {
        font-size: 1.2em;
    }

    label {
        font-size: 0.9em;
    }

    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    button {
        font-size: 0.9em;
    }

    .button-group {
        flex-direction: column;
    }

    table {
        font-size: 0.85em;
    }
}

/* 适配更小屏幕 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h2, h3 {
        font-size: 1em;
    }

    label {
        font-size: 0.8em;
    }

    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    button {
        font-size: 0.8em;
    }

    table {
        font-size: 0.8em;
    }
    .button-group {
        display: flex;
        gap: 10px;
        margin-top: 10px;
    }

    .print-btn {
        padding: 8px 12px;
        background-color: #5bc0de;
        border: none;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
    }

    .print-btn:hover {
        background-color: #31b0d5;
    }

    .export-btn {
        background-color: #5cb85c;
    }

    .export-btn:hover {
        background-color: #4cae4c;
    }

    /* 样式调整以支持打印功能 */
    @media print {
        body * {
            visibility: hidden;
        }
        #printableArea, #printableArea * {
            visibility: visible;
        }
        #printableArea {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
        }
        .button-group {
            display: none;
        }
        .field-selection {
            display: none;
        }
    }

    /* 样式优化 */
    .field-selection {
        margin-bottom: 10px;
    }

    .field-selection label {
        margin-right: 15px;
    }

    .word-cell {
        cursor: pointer;
        color: #337ab7;
    }

    .word-cell:hover {
        text-decoration: underline;
    }
