.table-container {
    width: 100%;
    margin: auto;
    overflow-x: auto;
}

.playerrating {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
}

.playerrating th,
.playerrating td {
    padding: 8px;
    border: 1px solid #ddd;
}

.playerrating th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.playerrating tr:nth-child(even) {
    background-color: #f9f9f9;
}

.playerrating tr:hover {
    background-color: #f0f0f0;
}

.berlinopentable {
    border-collapse: collapse;
    width: 80%;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.berlinopentable th {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.berlinopentable td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #2c3e50;
}

.berlinopentable tr:nth-child(even) {
    background-color: #f8f9fa;
}

.berlinopentable tr:hover {
    background-color: #f1f4f6;
    transition: all 0.3s ease;
}

.berlinopentable td:first-child,
.berlinopentable th:first-child {
    padding-left: 20px;
}

.berlinopentable td:last-child,
.berlinopentable th:last-child {
    padding-right: 20px;
}

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

#mysubmitbtn_yakitori {
    background-color: #2c3e50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#mysubmitbtn_yakitori:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#mysubmitbtn_yakitori:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#mysubmitbtn_yakitori:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tooltip-text {
    visibility: hidden;
    width: 75vw;
    background-color: #555;
    color: #fff;
    text-align: left;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%; /* 调整悬浮窗位置 */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}
label:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.mahjong-history {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

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

.mahjong-history th {
    background-color: #f8f9fa;
    color: #333;
}

.mahjong-history tr:hover {
    background-color: #f5f5f5;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.do_registration {
    background-color: #28a745;
    color: white;
}

.cancel-registration {
    background-color: #dc3545;
    color: white;
}

.mahjong-login-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.error {
    color: #dc3545;
    padding: 10px;
    margin: 10px 0;
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
}

.logout-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-btn {
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
}

@media screen and (max-width: 768px) {
    main {
        padding: 5px;
    }

    .scoreboard-page main {
        padding: 0;
    }
    .scoreboard-page .alignwide.wp-block-template-part{
        margin-left: 0px !important;
        margin-right: 0px !important;
        min-width: 100vw !important;
    }


    .table-container {
        margin: 0;
        padding: 5px;
    }

    .playerrating,
    .berlinopentable,
    .mahjong-history {
        width: 100%;
        margin: 5px 0;
        font-size: 13px;
    }

    .playerrating th,
    .playerrating td,
    .berlinopentable th,
    .berlinopentable td,
    .mahjong-history th,
    .mahjong-history td {
        padding: 4px;
    }

    .berlinopentable td:first-child,
    .berlinopentable th:first-child,
    .berlinopentable td:last-child,
    .berlinopentable th:last-child {
        padding: 4px;
    }

    #mysubmitbtn_yakitori {
        padding: 8px 15px;
        margin: 10px auto;
        font-size: 14px;
    }

    .mahjong-login-form {
        margin: 10px auto;
        padding: 10px;
    }

    .form-group {
        margin-bottom: 8px;
    }

    .btn-action {
        padding: 4px 8px;
        margin-left: 5px;
        font-size: 13px;
    }

    .tooltip-text {
        width: 90vw;
        font-size: 12px;
        padding: 3px;
    }

    .logout-section {
        margin: 10px 0;
        padding: 8px;
    }
}