/* assets/css/style.css */
:root { 
    --primary: #006633; 
    --accent: #d32f2f; 
    --gray: #6c757d; 
    --glass: rgba(255, 255, 255, 0.95);
    --menu-glass-light: rgba(255, 255, 255, 0.85); 
    --bear-color: #8B4513; 
}

body { 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #f4f7f6 0%, #e9ecef 100%); 
    margin:0; display:flex; flex-direction:column; align-items:center; min-height:100vh; overflow-x: hidden; 
    touch-action: pan-y; 
}

#ptr-container {
    width: 100%; height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: transparent; color: var(--primary); font-size: 13px; font-weight: 700;
    transition: height 0.3s;
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

#customAlert, #customConfirm { 
    display:none; position:fixed; top:0; left:0; width:100%; height:100%; 
    background:rgba(0,0,0,0.4); z-index:3000; justify-content:center; align-items:center; 
    backdrop-filter: blur(10px);
}
.alert-box { 
    background: rgba(255, 255, 255, 0.9); padding:25px; border-radius:20px; width:85%; max-width:320px; text-align:center; 
    box-shadow:0 15px 35px rgba(0,0,0,0.2);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.alert-msg { font-size:16px; margin-bottom:20px; color:#333; line-height:1.5; font-weight: 500; }
.alert-btn { background:var(--primary); color:#fff; border:none; padding:12px 30px; border-radius:12px; font-weight:bold; cursor:pointer; width:100%; transition: 0.2s; }

#loginOverlay { 
    position:fixed; top:0; left:0; width:100%; height:100%; 
    background: linear-gradient(135deg, #f4f7f6 0%, #e9ecef 100%); 
    z-index:2000; display:flex; justify-content:center; align-items:center; 
    transition: opacity 0.5s ease;
}
.login-box { 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    padding:40px 25px; border-radius:24px; width:85%; max-width:320px; 
    text-align:center; box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
    border: 1px solid rgba(255,255,255,0.6);
}

.verify-box { 
    background: var(--glass) !important; 
    padding: 25px 20px !important; 
    border-radius: 20px !important; 
    box-shadow: 0 12px 40px rgba(0,0,0,0.08) !important; 
    width: 98% !important; 
    max-width: 480px !important; 
    border-top: 6px solid var(--primary) !important; 
    margin: 60px auto 30px auto !important; 
    z-index: 10; 
    position: relative; 
    box-sizing: border-box !important;
}

.title-center { text-align: center; color: var(--primary); margin: 0 0 15px 0; font-size: 22px; font-weight: 800; }

.form-group { margin-bottom:12px; }
.form-group label { display:block; margin-bottom:4px; font-weight:700; font-size:11px; color: #555; text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea { width:100%; padding:12px; border:1.5px solid #eee; border-radius:12px; font-size:14px; background:#f9f9f9; box-sizing: border-box; transition: all 0.4s ease; font-family:inherit; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(0,102,51,0.05); }

.btn-verify { width:100%; padding:14px; background:var(--primary); color:#fff; border:none; border-radius:12px; font-weight:bold; cursor:pointer; text-transform:uppercase; transition: all 0.3s; font-size: 14px; }
.btn-verify:disabled { background: var(--gray) !important; opacity: 0.6; cursor: not-allowed; }
.btn-clear { background: transparent; color: var(--gray); border: 1.5px solid #ddd; margin-top: 10px; }

/* 靠 JS 动态控制小熊 */
.menu-icon { 
    position: fixed; bottom: 40px; right: 15px; font-size: 32px; 
    background: #fff; border: 2px solid #f3e5ab; width: 60px; height: 60px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    z-index: 500; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    touch-action: none; user-select: none; cursor: pointer;
    animation: fabPulse 3s infinite;
}
@keyframes fabPulse { 
    0% { box-shadow: 0 10px 25px rgba(139, 69, 19, 0.25), 0 0 0 0 rgba(139, 69, 19, 0.3); } 
    70% { box-shadow: 0 10px 25px rgba(139, 69, 19, 0.25), 0 0 0 15px rgba(139, 69, 19, 0); } 
    100% { box-shadow: 0 10px 25px rgba(139, 69, 19, 0.25), 0 0 0 0 rgba(139, 69, 19, 0); } 
}

.bear-anim { display: inline-block; transform-origin: center bottom; animation: waveBear 2.5s infinite; pointer-events: none; }
@keyframes waveBear { 0%, 100% { transform: rotate(0deg) scale(1); } 10% { transform: rotate(-15deg) scale(1.1); } 20% { transform: rotate(15deg) scale(1.1); } 30% { transform: rotate(-15deg) scale(1.1); } 40% { transform: rotate(15deg) scale(1.1); } 50% { transform: rotate(0deg) scale(1); } }

.menu-items-container { display: flex; flex-direction: column; width: 100%; gap: 10px; }
.menu-item { 
    padding: 14px 20px; text-decoration: none; font-size: 15px; color: #333; font-weight: 600; 
    display: flex; align-items: center; justify-content: flex-start; 
    gap: 12px; cursor: pointer; transition: background 0.2s; border-radius: 12px; 
    width: 100%; box-sizing: border-box; background: #f9f9f9; border: 1px solid #eee; margin: 0;
}
.menu-item:active { background: #eee; }
.menu-item.logout-btn { justify-content: center; color: var(--accent); font-weight: bold; background: rgba(211,47,47,0.05); border-color: rgba(211,47,47,0.1); }

.footer-copyright { width: 100%; text-align: center; padding-bottom: 20px; color: #bbb; font-size: 11px; letter-spacing: 1px; font-weight: 500; }

.modal { display:none; position:fixed; z-index:1500; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.4); overflow-y: auto; }
.modal-content { background:#fff; margin:70px auto; padding:20px; border-radius:20px; width:92%; max-width:360px; box-sizing: border-box; box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.table-container { width: 100%; overflow-x: auto; margin-top: 10px; }
table { width:100%; border-collapse: separate; border-spacing: 0 4px; font-size:11px; }
th { color:#888; font-weight: 600; text-transform: uppercase; padding: 10px 2px; text-align: left; border-bottom: 1px solid #ddd; }
td { background:#f9f9f9; padding: 10px 2px; text-align:center; }
.compact-input { width:100%; padding:12px; border:1px solid #eee; border-radius:10px; margin-bottom:10px; box-sizing: border-box; font-size: 14px;}
.detail-row { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 8px 0; font-size: 13px; }
.detail-label { font-weight: 700; color: #666; }
.detail-value { color: #222; text-align: right; font-weight: 600; }

.email-badge { position: fixed; top: calc(20px + env(safe-area-inset-top, 15px)); right: 20px; width: 50px; height: 50px; background: #fff; border: 2.5px solid #0056b3; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 2000; cursor: pointer; }
.badge-dot { position: absolute; top: -3px; right: -3px; width: 15px; height: 15px; background: #d32f2f; border-radius: 50%; border: 2.5px solid #fff; }
.pulse-blue { animation: pulseBlue 1.5s infinite; }
@keyframes pulseBlue { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0, 86, 179, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 86, 179, 0); } }

.top-banner { 
    position: fixed; top: 0; left: 0; width: 100%; 
    background: transparent; 
    color: red; 
    font-size: 15px; font-weight: 900; 
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px); 
    padding-bottom: 5px;
    z-index: 1900; display: none; overflow: hidden; 
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    pointer-events: none; 
}
.top-banner-text { display: inline-block; white-space: nowrap; padding-left: 100vw; animation: marquee 20s linear infinite; }
@keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

#connResultModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 6000; backdrop-filter: blur(8px); }
.conn-result-box { background: rgba(255, 255, 255, 0.95); padding: 40px 30px; border-radius: 30px; width: 80%; max-width: 300px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.4); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: connModalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.conn-icon { width: 100px; height: 100px; margin: 0 auto 20px auto; display: block; }
.icon-success { color: #1e7e34; animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.icon-fail { color: #d32f2f; animation: shakeIcon 0.5s; }
.conn-title { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.conn-desc { font-size: 14px; color: #666; line-height: 1.4; font-weight: 600; }

@keyframes connModalPop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes bounceIn { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shakeIcon { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-15px); } 40%, 80% { transform: translateX(15px); } }