/* 全局样式 */
:root {
    --accent-color: #50aa86;
    --dark-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式重置 */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
    height: 100%;
}

body {
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    /* 基础样式，不会覆盖页面特定的内联样式 */
}

/* 确保内容区域不遮挡背景图 */
.content-wrapper {
    background-color: transparent;
    position: relative;
}

/* 适配移动设备 */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 宠物装饰 */
.pet-decoration {
    position: fixed;
    font-size: 2rem;
    z-index: 0;
    opacity: 0.6;
    animation: float 6s infinite ease-in-out;
}

.pet-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.pet-2 {
    top: 15%;
    right: 5%;
    animation-delay: 1s;
}

.pet-3 {
    top: 80%;
    left: 7%;
    animation-delay: 2s;
}

.pet-4 {
    bottom: 10%;
    right: 8%;
    animation-delay: 3s;
}

.pet-5 {
    top: 40%;
    left: 3%;
    animation-delay: 4s;
}

.pet-6 {
    top: 60%;
    right: 3%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* 导航栏样式 */
.main-nav {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

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

.nav-logo h1 {
    color: #50aa86;
    font-size: 22px;
    margin-left: 12px;
}

.logo-icon {
    font-size: 26px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    margin: 0 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links li a:hover, .nav-links li a.active {
    background: #50aa86;
    color: white;
}

.mobile-menu-btn {
    display: none;
    font-size: 22px;
    color: #50aa86;
    cursor: pointer;
}

/* 头部样式 */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    color: white;
    justify-content: center;
}

header h2 {
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    white-space: nowrap;
}

.meow-text {
    font-size: 0.85rem;
    color: #f8f8f8;
    background: rgba(80, 170, 134, 0.8);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    transform: rotate(-2deg);
    white-space: normal;
    max-width: 60%;
    line-height: 1.3;
}

/* 响应式标题优化 */
@media (max-width: 768px) {
    header h2 {
        font-size: 1.2rem;
    }

    .meow-text {
        font-size: 0.75rem;
        padding: 4px 10px;
        max-width: 55%;
    }
}

@media (max-width: 480px) {
    header {
        margin-bottom: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 5px;
    }

    header h2 {
        font-size: 1.1rem;
        white-space: normal;
        max-width: 90%;
    }

    .meow-text {
        font-size: 0.7rem;
        padding: 3px 10px;
        border-radius: 15px;
        max-width: 85%;
        white-space: normal;
    }
}

/* 轮播区域 - 保持750×1334比例 */
.slider-container {
    position: relative;
    width: 100%;
    padding-top: 177.8667%; /* 1334/750 = 1.778667 */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    margin-bottom: 30px;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
}

.slide.active {
    opacity: 1;
}

/* 二维码区域 */
.qr-container {
    position: absolute;
    top: 61%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    z-index: 20;
    text-align: center;
    background: rgba(255, 255, 255, 1);
}

.qr-code {
    width: 100%;
    height: auto;
    display: block;
}

.qr-text {
    font-weight: bold;
    color: #50aa86;
    font-size: 12px;
    margin-top: 5px;
}

/* 公会信息样式 */
.guild-info {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cat-tail {
    position: absolute;
    top: -30px;
    right: 50px;
    width: 20px;
    height: 60px;
    background: #50aa86;
    border-radius: 0 0 10px 10px;
    transform: rotate(30deg);
}

.cat-tail::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #50aa86;
    border-radius: 50%;
}

.guild-info h3 {
    color: #50aa86;
    margin-bottom: 15px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.guild-info h3 i {
    margin-right: 10px;
}

.guild-info p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature {
    text-align: center;
    padding: 20px;
    background: rgba(153, 208, 140, 0.2);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: #50aa86;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
}

.feature h4 {
    color: #50aa86;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* 内容区域样式 */
.content-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.content-section h3 {
    color: #50aa86;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
}

.content-section h3 i {
    margin-right: 10px;
}

/* 回忆录按钮样式 */
.memoir-btn {
    position: fixed;
    right: 20px;
    top: 80%;
    transform: translateY(-50%);
    background: #50aa86;
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.memoir-btn:hover {
    background: #3e896c;
    transform: translateY(-50%) scale(1.05);
}

/* 回忆录面板样式 */
.memoir-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.memoir-panel.active {
    right: 0;
}

.memoir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #50aa86;
    color: white;
}

.memoir-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.photo-wall {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.photo-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.photo-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.photo-frame.active {
    display: flex;
}

.photo-frame img {
    width: 100%;
    height: calc(100% - 40px);
    object-fit: contain;
    border-radius: 10px;
}

.photo-label {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: #50aa86;
}

.photo-side-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #50aa86;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.prev-btn.photo-side-btn {
    left: 10px;
}

.next-btn.photo-side-btn {
    right: 10px;
}

.photo-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: #50aa86;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    border-radius: 10px;
}

.footer-cats {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 24px;
}

/* ===== 原有样式保持不变，新增如下 ===== */

/* 加载遮罩 */
#loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #50aa86;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: white;
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar::after {
    content: "";
    display: block;
    width: 0;
    height: 100%;
    background: white;
    animation: loadProgress 2s forwards;
}

@keyframes loadProgress {
    to {
        width: 100%;
    }
}

/* 导航下拉菜单层级修复 */
.nav-links {
    z-index: 1000;
}

/* 成员名单样式 */
.member-list {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.member-tag {
    background: #50aa86;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .qr-container {
        width: 60%;
        padding: 10px;
    }

    .qr-text {
        font-size: 10px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .memoir-panel {
        width: 100%;
        right: -100%;
    }

    .memoir-btn {
        padding: 12px 8px;
        font-size: 14px;
    }

    .pet-decoration {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* 手机导航栏优化 - 更细的设计 */
    .main-nav {
        margin-bottom: 15px;
        border-radius: 40px;
    }

    .nav-container {
        padding: 3px 8px;
    }

    .nav-logo h1 {
        font-size: 14px;
        margin-left: 6px;
    }

    .logo-icon {
        font-size: 18px;
    }

    .mobile-menu-btn {
        font-size: 18px;
    }

    header h2 {
        font-size: 2rem;
    }

    .qr-container {
        width: 65%;
        padding: 8px;
    }

    .qr-text {
        font-size: 9px;
    }

    .guild-info, .content-section {
        padding: 20px;
    }

    .feature {
        padding: 15px;
    }

    .photo-side-btn {
        width: 30px;
        height: 30px;
    }
}

/* 计算器页面专用样式 */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--dark-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 计算器按钮容器 */
.calculator-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    gap: 12px;
    flex-wrap: wrap;
}

/* 装备、幻兽、人物和技能按钮样式 */
.equipment-input-btn,
.monster-input-btn,
.character-input-btn,
.skill-input-btn,
.relic-input-btn {
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
    border: 2px solid transparent;
    text-align: center;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.equipment-input-btn:hover,
.monster-input-btn:hover,
.character-input-btn:hover,
.skill-input-btn:hover,
.relic-input-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.equipment-input-btn.active,
.monster-input-btn.active,
.character-input-btn.active,
.skill-input-btn.active,
.relic-input-btn.active {
    border-color: #50aa86;
    background-color: #e6f7f2;
}

.equipment-image,
.monster-image,
.character-image,
.skill-image,
.relic-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 2px;
    /* 减小图片和分数之间的间距 */
}

/* 按钮下方分数显示 */
.score-display {
    font-size: 12px;
    font-weight: bold;
    color: #50aa86;
    margin-top: -10px;
}

.equipment-inputs,
.monster-inputs,
.skill-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.equipment-inputs .input-group,
.monster-inputs .input-group,
.skill-inputs .input-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.equipment-inputs .input-group.inline-input,
.monster-inputs .input-group.inline-input,
.skill-inputs .input-group.inline-input {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.equipment-inputs .input-group.inline-input label,
.monster-inputs .input-group.inline-input label,
.skill-inputs .input-group.inline-input label {
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 80px;
}

.equipment-inputs .input-group.inline-input input,
.monster-inputs .input-group.inline-input input,
.skill-inputs .input-group.inline-input input {
    flex: 1;
    min-width: 0;
}

.equipment-inputs .input-group.level-sync,
.monster-inputs .input-group.level-sync,
.skill-inputs .input-group.level-sync,
.relic-inputs .input-group.level-sync {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.equipment-inputs .input-group.level-sync input,
.monster-inputs .input-group.level-sync input,
.skill-inputs .input-group.level-sync input,
.relic-inputs .input-group.level-sync input {
    flex: 1;
    min-width: 0;
}

.equipment-inputs label,
.monster-inputs label,
.character-inputs label,
.skill-inputs label,
.relic-inputs label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark-color);
    font-size: 14px;
}

.equipment-inputs input,
.monster-inputs input,
.character-inputs input,
.skill-inputs input,
.relic-inputs input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    max-width: 120px;
}

.sync-btn {
    background: #50aa86;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.sync-btn:hover {
    background: #3e896c;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
}

/* 结果和输入行样式 - 用于将结果显示和输入框放在一行 */
.result-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

/* 结果行样式 - 用于将多个结果显示在一行 */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

/* 内联结果显示样式 */
.result-display.inline {
    margin: 0;
    width: auto;
    flex: 1;
    min-width: fit-content;
    font-size: 14px;
}

/* 内联输入组样式 */
.input-group.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 1;
    min-width: fit-content;
}

/* 全宽输入组样式 */
.input-group.full-width {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    width: 100%;
}

/* 内联输入组的标签样式 */
.input-group.inline label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: bold;
    color: var(--dark-color);
}

/* 美化输入框样式 */
.styled-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    width: 100%;
    max-width: 150px;
}

.styled-input:focus {
    outline: none;
    border-color: #50aa86;
    box-shadow: 0 0 0 3px rgba(80, 170, 134, 0.1);
}

.styled-input::placeholder {
    color: #aaa;
    font-style: italic;
}

/* 计算器容器样式 */
.calculator {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.calc-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-display {
    background-color: #f0f8ff;
    padding: 10px 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.result-display span {
    color: #50aa86;
    font-size: 18px;
}

.calc-btn {
    background: #50aa86;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
}

.calc-btn:hover {
    background: #3e896c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 计算器页面响应式样式 */
@media (max-width: 768px) {
    /* 在移动设备上保持结果和输入行布局在同一行 */
    .result-input-row,
    .result-row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .result-display.inline,
    .input-group.inline {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .input-group.inline {
        justify-content: center;
    }

    /* 移动设备上保持全宽输入组样式 */
    .input-group.full-width {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .input-group.full-width label {
        white-space: nowrap;
        min-width: fit-content;
        font-size: 13px;
    }

    .input-group.full-width .styled-input {
        flex: 1;
        min-width: 0;
    }

    .calculator {
        padding: 15px 10px;
    }

    .calculator-buttons {
        gap: 15px;
    }

    .equipment-input-btn,
    .monster-input-btn,
    .character-input-btn,
    .skill-input-btn,
    .relic-input-btn {
        padding: 8px;
    }

    .equipment-image,
    .monster-image,
    .character-image,
    .skill-image,
    .relic-image {
        width: 60px;
        height: 60px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 15px;
        max-width: 90%;
    }

    .equipment-inputs .input-group.inline-input,
    .monster-inputs .input-group.inline-input,
    .skill-inputs .input-group.inline-input,
    .relic-inputs .input-group.inline-input {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .equipment-inputs .input-group.inline-input label,
    .monster-inputs .input-group.inline-input label,
    .skill-inputs .input-group.inline-input label,
    .relic-inputs .input-group.inline-input label {
        margin-bottom: 0;
        white-space: nowrap;
        font-size: 13px;
    }

    .equipment-inputs .input-group.inline-input input,
    .monster-inputs .input-group.inline-input input,
    .skill-inputs .input-group.inline-input input,
    .relic-inputs .input-group.inline-input input {
        width: 100%;
    }

    .equipment-inputs .input-group.level-sync,
    .monster-inputs .input-group.level-sync,
    .skill-inputs .input-group.level-sync,
    .relic-inputs .input-group.level-sync {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .equipment-inputs .input-group.level-sync input,
    .monster-inputs .input-group.level-sync input,
    .skill-inputs .input-group.level-sync input,
    .relic-inputs .input-group.level-sync input {
        flex: 1;
        min-width: 0;
        max-width: none;
        width: 50%;
    }

    .sync-btn {
        white-space: nowrap;
        width: 50%;
    }

    .calc-btn {
        width: 100%;
    }

    .result-display {
        padding: 8px 12px;
        font-size: 14px;
    }

    .result-display span {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .back-btn {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .calculator {
        padding: 12px 8px;
    }

    .calculator-buttons {
        gap: 10px;
    }

    .equipment-input-btn,
    .monster-input-btn,
    .character-input-btn,
    .skill-input-btn,
    .relic-input-btn {
        padding: 6px;
    }

    .equipment-image,
    .monster-image,
    .character-image,
    .skill-image,
    .relic-image {
        width: 65px;
        height: 65px;
    }

    .modal-content {
        margin: 5% auto;
        padding: 10px;
    }

    .equipment-inputs,
    .monster-inputs,
    .skill-inputs,
    .relic-inputs {
        gap: 10px;
        margin: 15px 0;
    }

    .equipment-inputs input,
    .monster-inputs input,
    .skill-inputs input,
    .relic-inputs input {
        padding: 6px 8px;
        font-size: 12px;
        width: 100%;
        max-width: 80px;
    }

    .input-group.full-width .styled-input {
        padding: 6px 8px;
        font-size: 8px;
    }

    .close-btn {
        font-size: 24px;
    }

    .result-display {
        padding: 6px 10px;
        font-size: 12px;
        margin: 6px 0;
    }

    .result-display span {
        font-size: 14px;
    }

    .calc-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    header .logo h1 {
        font-size: 1.5rem;
    }
}


/* 确保body和html高度为100%，以便底部图片能够沉底 */
html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* 确保内容容器不会被底部图片覆盖 */
.content-wrapper {
    flex: 1;
    min-height: 0;
}

/* 滚动长图区域样式 */
.rolling-image-container {
    width: 100%;
    height: 250px; /* 降低高度以避免在手机端遮挡计算器模块 */
    overflow: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #f0f0f0;
    z-index: 1;
}

.rolling-image-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    position: relative;
    scrollbar-width: none; /* Firefox隐藏滚动条 */
    -ms-overflow-style: none; /* IE/Edge隐藏滚动条 */
}

/* 隐藏WebKit浏览器（Chrome、Safari等）的滚动条 */
.rolling-image-wrapper::-webkit-scrollbar {
    display: none;
}

.rolling-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 确保图片垂直排列 */
.rolling-image-wrapper img {
    display: block;
    margin-bottom: -4px; /* 移除图片之间的间隙 */
}
