body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
}

.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
    padding: 20px;
}

/* 导航栏样式 */
nav {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 28px;
    font-weight: bold;
    margin-left: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

nav .nav-items {
    display: flex;
    align-items: center;
}

nav .nav-items a,
nav .nav-items select {
    color: #fff;
    text-decoration: none;
    padding: 0 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

nav .nav-items a:hover {
    color: #f39c12;
}

nav .nav-items select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #265988;
    padding: 8px;
    border-radius: 4px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin: 30px auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
}

th:first-child {
    width: 250px;
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* 自定义弹出框样式 */
.custom-alert {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.custom-alert-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.custom-alert-message {
    margin-bottom: 20px;
}

.custom-alert-buttons {
    text-align: right;
}

.custom-alert-button {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.custom-alert-close {
    background-color: #f44336;
    color: white;
}

.custom-alert-confirm {
    background-color: #4CAF50;
    color: white;
}

.menu-icon {
    display: none;
}

/* 响应式表格容器 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* 新的表格包装器，不显示水平滚动条 */
.table-wrapper {
    width: 100%;
    margin-bottom: 15px;
}

@media (min-width: 769px) {
    .table-wrapper {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: visible;
    }
    
    .mobile-time-format {
        font-size: 12px !important;
        word-break: break-all !important;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 10px 0;
        align-items: flex-start;
    }

    nav .logo {
        font-size: 24px;
        margin-bottom: 10px;
    }

    nav .nav-items {
        flex-wrap: wrap;
        justify-content: center;
        display: none;
        flex-direction: column;
        width: 100%;
    }

    nav .nav-items a,
    nav .nav-items select {
        font-size: 14px;
        margin: 5px;
        width: 100%;
        padding: 10px;
        text-align: center;
    }

    nav .nav-items.show {
        display: flex;
    }

    .menu-icon {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        cursor: pointer;
        font-size: 24px;
        color: white;
    }

    .container {
        padding: 10px;
        margin-bottom: 50px !important; /* 使用!important确保在所有浏览器中生效 */
        box-sizing: border-box; /* 确保盒模型一致性 */
        position: relative; /* 添加定位上下文以确保边距生效 */
        width: 100%; /* 确保宽度一致性 */
        overflow: visible; /* 确保内容不被裁剪 */
    }
    
    /* 添加特定于夹克浏览器的样式修复 */
    @supports (-webkit-touch-callout: none) {
        .container {
            margin-bottom: 60px !important;
            padding-bottom: 10px !important;
        }
    }

    h1 {
        font-size: 20px;
        text-align: center;
    }

    table {
        margin: 15px auto;
        table-layout: fixed; /* 改回固定布局，但使用百分比 */
        width: 100%;
        min-width: auto;
        white-space: normal;
        border-collapse: collapse;
        font-size: 14px;
    }

    th,
    td {
        padding: 6px 2px;
        word-wrap: break-word;
        overflow: visible;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
        font-size: 13px;
        text-align: center;
    }
    
    /* 地点列的样式 */
    .location-cell {
        padding: 8px 5px;
        line-height: 1.5;
        text-align: center;
        width: auto; /* 自动占据剩余空间 */
    }
    
    /* 属性标签的样式 */
    .location-cell span {
        margin: 2px;
        display: inline-block;
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: bold;
        color: white;
        text-align: center;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    /* 地点文本的样式 */
    .location-cell div:last-child {
        margin-top: 6px;
        font-size: 14px;
        font-weight: normal;
    }
    
    /* 移动端表格列宽度设置 - 图片、刷新时间和操作列固定宽度 */
    @media (max-width: 768px) {
        /* 图片列 */
        th.th-image, td.image-cell { 
            width: 60px !important;
        }
        
        /* 刷新时间列 */
        th.th-refresh-time, td.refresh-time { 
            width: 52px !important;
        }
        
        /* 地点列 */
        th.th-location, td.location-cell { 
            width: auto !important; /* 自动占据剩余空间 */
        }
        
        /* 操作列 */
        th.th-action, td.action-cell { 
            width: 50px !important;
        }
    }

    th:first-child,
    td:first-child {
        width: 26%;
        min-width: unset;
        padding-left: 5px;
    }

    img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* 图片单元格样式 */
    .image-cell {
        width: 60px;
        padding: 5px;
        text-align: center;
    }
    
    /* 刷新时间单元格样式 */
    .refresh-time {
        width: 50px;
        padding: 5px;
        text-align: center;
    }
    
    /* 操作单元格样式 */
    .action-cell {
        width: 50px;
        padding: 5px;
        text-align: center;
    }

    th:not(:first-child),
    td:not(:first-child) {
        width: auto;
        max-width: none; /* 移除最大宽度限制 */
    }

    .desktop-only:not(.th-location):not(.location-cell) {
        display: none;
    }
    

    /* 移动端表格列宽度进一步调整 */
    @media (max-width: 768px) {
        /* 调整表格整体布局 */
        table {
            table-layout: fixed !important;
            width: 100% !important;
            font-size: 13px;
        }
        
        /* 使用类选择器而非列索引 */
        .th-image, .image-cell {
            width: 60px !important;
        }
        
        .th-refresh-time, .refresh-time {
            width: 60px !important;
        }
        
        .th-location, .location-cell {
            width: calc(100% - 180px) !important;
        }
        
        .th-action, .action-cell {
            width: 60px !important;
        }
        
        
        /* 隐藏多久刷新列 */
        .th-refresh-duration, .refresh-duration-cell {
            display: none !important;
        }
    }

    .hide-boss {
        padding: 4px 8px;
        font-size: 10px;
    }

    .refresh-time {
        font-size: 14px;
    }

    .copy-btn {
        display: block;
        width: 95%;
        margin-top: 10px;
        margin-left: 0;
    }

    .share-input {
        width: 90% !important;
        margin-left: 10px;
        font-size: 12px;
    }

    #hiddenBossesContainer {
        margin-bottom: 100px !important;
    }

    #audioSelector {
        width: 50%;
    }

    .create-group-form {
        padding: 20px;
    }

    .create-group-form input[type="text"],
    .create-group-form input[type="password"],
    .create-group-form select,
    .create-group-form input[type="submit"] {
        width: 100%;
        margin-bottom: 15px;
        font-size: 16px;
    }

    .group-list {
        margin-bottom: 100px;
    }

    .group-list li {
        padding: 15px;
    }

    .group-list li>div {
        flex-direction: column;
    }

    .group-list a {
        font-size: 18px;
        margin-bottom: 10px;
        display: block;
    }

    .password-text {
        display: block;
        margin-top: 5px;
        margin-bottom: 10px;
    }
}

.copy-btn {
    cursor: pointer;
    padding: 10px 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #27ae60;
}

/* 隐藏按钮样式 */
.hide-boss {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

.hide-boss:hover {
    background-color: #2980b9;
}

.hide-boss.hidden {
    background-color: #e74c3c;
}

.hide-boss.hidden:hover {
    background-color: #c0392b;
}

/* 隐藏的Boss标题样式 */
#hiddenBossesToggle {
    background-color: #f39c12;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#hiddenBossesToggle:hover {
    background-color: #e67e22;
}

/* 隐藏的Boss表格容器样式 */
#hiddenBossesContainer {
    margin-top: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 公告样式 */
.announcement {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.announcement p {
    margin: 0;
}

/* 移除外部容器样式 */
.text-ad-container {
    all: unset;
    display: contents; /* 使容器不产生任何布局影响 */
}

/* 保留链接样式 */
.text-ad-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-left: 3px solid; /* 保留左侧小边框 */
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 5px 0; /* 添加少量外边距 */
}

.text-ad-link:hover {
    background-color: #e9f5fe;
    transform: translateX(3px);
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
}

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

.footer-content p {
    margin: 0;
    font-size: 14px;
}

/* 随机图片容器样式 */
#randomImageContainer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: none;
    z-index: 1000; /* 确保图片在其他元素之上显示 */
}

#randomImage {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 属性标签样式 */
.attribute-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
    justify-content: flex-end;
}

.attribute-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 属性标签颜色 */
.tag-unknown {
    background-color: #999999;
}

/* 表格布局调整 */
#bossTable {
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#bossTable tr {
    border-bottom: 1px solid #eee;
}

#bossTable tr:hover {
    background-color: #f5f9ff;
}

.boss-image-cell {
    width: 60px;
    padding: 8px;
}

.boss-image-cell img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.boss-attributes-cell {
    width: 25%;
    text-align: right;
    padding: 8px 15px;
}

.location-info {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-bottom: 3px;
}