body{
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: system-ui;
    background-color: #FAF7F0;
    box-sizing: border-box;
}

h2{
    margin-bottom: -0.1rem;
}

.subtitle {
    display: inline-block;
    max-width: 500px;
    color: gray;
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
}

.upload:hover {
    border-color: #5A9CF8;
    color: #5A9CF8;
}

.upload.dragging {
    box-sizing: border-box;
    border-width: 2px;
    border-color: #5A9CF8;
    color: #5A9CF8;
    background-color: #e6f0ff;
}

.upload {
    font-size: 0.9rem;
    border: 1px dashed gray;
    border-radius: 10px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    text-align: center;
    height: 60px;
    margin: 0 1rem;
    color: gray;
    background-color: white;
}

.spacer{
    margin: -0.2rem;
}

.normal_button {
    flex: 1 1 0; 
    max-width: 6.4rem;
    min-width: 4.5rem;
    height: 2rem;
    line-height: 2rem;
    color: white;
    font-size: 0.9rem;
    font-family: system-ui;
    padding: 0 0.3rem;
    margin: 0.5rem 0;
    border: 0;
    box-sizing: border-box;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    flex-grow: 1;
}

.ipt_btn{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    opacity: 0;
    background-color: #ccc;
}

.tentacles{
    color: black;
    border: 2px solid;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 0.9rem;
}

.display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    border-style: solid;
    padding: 0.5rem;
}

#display-img, #lossless-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.small-button {
    font-size: 0.9rem;
    padding: 0.05rem 0.3rem;
    color: white;
    background-color: #64CBA6;
    border: none;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
}

/* 设置叠层 - 遮罩背景 */
.settings-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2000; /* 确保在 Lightbox 之上 */
    justify-content: center;
    align-items: center;
}

/* 设置面板 - 居中卡片 */
.settings-panel {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 400px;
    animation: fadein 0.3s;
}

@keyframes fadein {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 选项行样式 */
.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-footer {
    margin-top: 20px;
    text-align: center;
}

.settings-close-btn {
    padding: 8px 15px;
    background-color: #3F77F6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    body, .tentacles {
        background-color: #303030;
        color: white;
    }
    .upload, .tentacles {
        background-color: #1E1E1E;
    }
    .upload.dragging {
        background-color: #1b2f53;
    }
    .settings-panel {
        background: #535353;
        color: white;
    }
}

#old-version {
    text-decoration: none;
    color: #3F77F6;
}

#old-version:visited {
    color: #3F77F6; 
}

/* 全屏遮罩层样式 */
#fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
    z-index: 9999;
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    pointer-events: none; /* 关键：让鼠标事件穿透遮罩层，避免干扰 drop */
}

/* 激活状态 */
#fullscreen-overlay.active {
    display: flex;
}

/* 内容样式 */
.overlay-content {
    width: 96vw;  /* 90% 视口宽度 */
    height: 96vh; /* 90% 视口高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    
    border: 4px dashed rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    
    color: white;
    background: rgba(0, 0, 0, 0.2); /* 轻微背景色增加对比度 */
}

@media (max-width: 400px) {
    #tomato {
        display: none;
    }
}