/* 基础样式 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* 解决移动端 100vh 包含工具栏的问题 */
    min-height: -webkit-fill-available;
    background: black;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 阻止部分移动浏览器自动调整字体大小 */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* 移除移动端点击高亮 */
    -webkit-tap-highlight-color: transparent;
    /* 优化 iOS 滚动流畅度 */
    -webkit-overflow-scrolling: touch;
    /* 禁用长按菜单（可选，根据需求） */
    /* -webkit-touch-callout: none; */
}

/* 自定义滚动条样式 (PC端) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* 针对移动端的交互优化 */
a, button, input, .login-submit, .nav-btn, .eye-btn {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    outline: none;
}

/* 兼容旧版 WebKit 的 Flexbox */
.login-page, .login-input-wrapper, .login-submit, .notify-header, .main-page, .btn-grid {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
}

.login-page, .main-page {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.login-page, .login-submit, .notify-header, .main-page {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.login-page, .login-submit, .btn-grid {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* 登录页样式 */
.login-page {
    background: #000 url(https://www.loliapi.com/acg/) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* 适配刘海屏 */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
    /* 背景平滑加载 */
    transition: background 0.3s ease-in-out;
    /* 解决键盘弹出时背景抖动或高度塌陷 */
    overflow: hidden;
    position: relative;
}

.login-container {
    position: relative;
    width: 340px;
    /* 防止手机端内容被键盘顶起时溢出 */
    margin: 20px 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.login-input-wrapper {
    position: relative;
    width: 100%;
    height: 70px;
    background: #ffffff;
    border-radius: 100vw;
    -webkit-border-radius: 100vw;
    -moz-border-radius: 100vw;
    border: 2px solid transparent;
    box-shadow: 0 0 30px rgba(242, 211, 218, 0.5);
    -webkit-box-shadow: 0 0 30px rgba(242, 211, 218, 0.5);
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    padding: 0 20px 0 30px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 错误状态应用在 wrapper 上 */
.login-input-wrapper.error {
    border-color: #ff4d4f;
    box-shadow: 0 0 30px rgba(255, 77, 79, 0.3);
}

.login-input {
    flex: 1;
    -webkit-flex: 1;
    height: 100%;
    background: transparent;
    font-size: 20px;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    /* 解决部分移动浏览器 input 默认圆角和内阴影 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333;
}

.login-error-msg {
    color: #ff4d4f;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-error-msg.show {
    opacity: 1;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    -webkit-animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@-webkit-keyframes shake {
    10%, 90% { -webkit-transform: translate3d(-1px, 0, 0); }
    20%, 80% { -webkit-transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { -webkit-transform: translate3d(-4px, 0, 0); }
    40%, 60% { -webkit-transform: translate3d(4px, 0, 0); }
}

.eye-btn {
    height: 70px;
    width: 44px;
    cursor: pointer;
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    color: #999;
    transition: color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    margin-right: -10px; /* 抵消容器的部分 padding，让视觉更靠右一点但对齐 */
}

.eye-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0;
    padding: 0;
}

.eye-btn:hover {
    color: #19c3ff;
}

.login-submit {
    margin: 40px auto 0;
    cursor: pointer;
    -webkit-transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -moz-transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 针对某些移动端浏览器的 active 状态补丁 */
.login-submit:active, .nav-btn:active {
    opacity: 0.8;
}

.login-submit:hover {
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: #f8f8f8;
}

.login-submit:active {
    -webkit-transform: scale(0.95);
    -moz-transform: scale(0.95);
    -ms-transform: scale(0.95);
    -o-transform: scale(0.95);
    transform: scale(0.95);
}

.login-submit svg path {
    fill: #19c3ff; /* 更有活力的蓝色 */
}

/* 增强版收藏提示框样式 (仿 Ant Design Notification) */
.notify-box {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    background: #fff;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    -webkit-box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    padding: 16px 24px;
    z-index: 9999;
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-animation: notificationMoveIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    -moz-animation: notificationMoveIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    animation: notificationMoveIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    /* 适配刘海屏顶部距离 */
    top: calc(20px + env(safe-area-inset-top));
    top: calc(20px + constant(safe-area-inset-top));
}

@-webkit-keyframes notificationMoveIn {
    0% { opacity: 0; -webkit-transform: translateX(100%); }
    100% { opacity: 1; -webkit-transform: translateX(0); }
}

@-moz-keyframes notificationMoveIn {
    0% { opacity: 0; -moz-transform: translateX(100%); }
    100% { opacity: 1; -moz-transform: translateX(0); }
}

@keyframes notificationMoveIn {
    0% { opacity: 0; -webkit-transform: translateX(100%); -moz-transform: translateX(100%); -ms-transform: translateX(100%); transform: translateX(100%); }
    100% { opacity: 1; -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); }
}

.notify-header {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 8px;
}

#notifyIcon {
    font-size: 24px;
    margin-right: 12px;
    color: #52c41a; /* 成功绿 */
}

#notifyTitle {
    color: rgba(0, 0, 0, 0.88);
    font-weight: 600;
    font-size: 16px;
}

#notifyText {
    color: rgba(0, 0, 0, 0.65);
    font-size: 14px;
    line-height: 1.5;
    padding-left: 36px;
}

.notify-close {
    position: absolute;
    top: 16px;
    right: 20px;
    cursor: pointer;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.45);
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    transition: color 0.2s;
    padding: 5px; /* 增加点击区域 */
}

.notify-close:hover {
    color: rgba(0, 0, 0, 0.88);
}

@media screen and (max-width: 450px) {
    .notify-box {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}

/* 主页样式 */
.main-page {
    background: #000 url(../assets/bg-2d024377.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: #fff;
    overflow-y: auto;
    /* 解决 iOS 橡皮筋效果导致背景露底 */
    overscroll-behavior-y: none;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    /* 适配刘海屏 */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
    /* 背景平滑加载 */
    transition: background 0.3s ease-in-out;
}

.main-content {
    width: 70%;
    text-align: center;
    margin-top: 15vh;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.logo-img {
    display: block;
    margin: 0 auto;
    max-width: 240px;
    width: 80%;
    height: auto;
    /* 增加阴影让 Logo 在深色背景更立体 */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.btn-grid {
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: 60px;
    margin-bottom: 30px;
}

.nav-btn {
    margin: 10px;
    font-size: 14px;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    background: rgba(29, 29, 29, 0.5);
    border: 1px solid rgba(89, 129, 183, 0.2);
    display: inline-block;
    min-width: 140px;
    text-decoration: none;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
    /* 优化移动端点击 */
    cursor: pointer;
}

.nav-btn:hover {
    background: -webkit-linear-gradient(left, #19c3ff, #0093ff);
    background: -moz-linear-gradient(left, #19c3ff, #0093ff);
    background: -o-linear-gradient(left, #19c3ff, #0093ff);
    background: linear-gradient(to right, #19c3ff, #0093ff);
}

.footer-slogan {
    margin-top: 20px;
    color: #ffffff;
    font-size: 12px;
    letter-spacing: 11px;
    font-weight: 100;
    padding-left: 20px;
}

.rainbow-link {
    text-decoration: none;
    background: -webkit-linear-gradient(left, #00a98e, #009ff7);
    background: -moz-linear-gradient(left, #00a98e, #009ff7);
    background: -o-linear-gradient(left, #00a98e, #009ff7);
    background: linear-gradient(to right, #00a98e, #009ff7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-animation: rainbow 5s linear infinite;
    -moz-animation: rainbow 5s linear infinite;
    animation: rainbow 5s linear infinite;
}

@-webkit-keyframes rainbow {
    0% { -webkit-filter: hue-rotate(0deg); }
    100% { -webkit-filter: hue-rotate(360deg); }
}

@-moz-keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes rainbow {
    0% { -webkit-filter: hue-rotate(0deg); filter: hue-rotate(0deg); }
    100% { -webkit-filter: hue-rotate(360deg); filter: hue-rotate(360deg); }
}

/* 页面渐入动画 */
.fade-in {
    animation: fadeInPage 0.8s ease-out forwards;
    -webkit-animation: fadeInPage 0.8s ease-out forwards;
}

@-webkit-keyframes fadeInPage {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeInPage {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 微信/QQ 外部浏览器引导层 */
.browser-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    cursor: pointer;
}

.guide-arrow {
    position: absolute;
    top: 10px;
    right: 10px;
    -webkit-animation: arrowMove 1s ease-in-out infinite alternate;
    animation: arrowMove 1s ease-in-out infinite alternate;
}

@-webkit-keyframes arrowMove {
    0% { -webkit-transform: translate(0, 0); }
    100% { -webkit-transform: translate(-10px, 10px); }
}

@keyframes arrowMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-10px, 10px); }
}

.guide-content {
    margin-top: 120px;
    text-align: center;
    color: #fff;
    padding: 0 40px;
}

.guide-content p {
    font-size: 20px;
    margin: 15px 0;
    line-height: 1.6;
}

.guide-content .dots {
    display: inline-block;
    background: #444;
    padding: 0 10px;
    border-radius: 15px;
    font-weight: bold;
    letter-spacing: 2px;
}

.guide-content .highlight {
    color: #19c3ff;
    font-weight: bold;
    font-size: 24px;
    text-decoration: underline;
}

.guide-content .sub-tip {
    font-size: 14px;
    color: #aaa;
    margin-top: 40px;
}

/* 响应式适配 */
@media screen and (max-width: 950px) {
    .main-content { 
        width: 95%; 
        margin-top: 10vh; 
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .btn-grid { margin-top: 30px; }
}

@media screen and (max-width: 400px) {
    .login-container, .login-input { width: 90vw; }
    .nav-btn { min-width: 120px; padding: 10px 20px; font-size: 13px; }
}


