* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --white: #ffffff; --text: #333333; --border: #eaeaea; }
body { font-family: -apple-system, sans-serif; background: var(--white); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.preload * { transition: none !important; }

header { background: var(--white); border-bottom: 1px solid var(--border); position: relative; z-index: 1000; padding: calc(15px + env(safe-area-inset-top)) 20px 15px 20px; max-height: 150px; opacity: 1; overflow: hidden; transition: all 3s ease-in-out; }
header.hide-bars { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-color: transparent; }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; font-size: 1.2rem; font-weight: 700; }

footer { background: var(--white); border-top: 1px solid var(--border); text-align: center; font-size: 0.9rem; position: relative; z-index: 1000; padding: 20px 20px calc(35px + env(safe-area-inset-bottom)) 20px; max-height: 200px; opacity: 1; overflow: hidden; transition: all 3s ease-in-out; }
footer.hide-bars { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-top-color: transparent; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 20px; font-weight: 500; }
.footer-links a { color: var(--text); text-decoration: none; }
.copyright { color: #666666; font-size: 0.85rem; }

main { flex: 1; position: relative; width: 100%; overflow: hidden; }
.screen { position: absolute; top: 0; width: 100%; height: 100%; background: var(--white); transition: transform 3s ease-in-out; display: flex; justify-content: center; align-items: flex-start; }
.screen::before, .screen::after { content: ""; position: absolute; top: 0; width: 1px; height: 100%; background: #000000; opacity: 0.15; z-index: 50; pointer-events: none; }
.screen::before { left: 0; } .screen::after { right: 0; }
#screen-main { left: 0; transform: translateX(0); z-index: 10; }
#screen-main.slide-out { transform: translateX(-100%); }
#screen-new { left: 0; transform: translateX(100%); z-index: 20; }
#screen-new.slide-in { transform: translateX(0); }

.content-animate-wrapper { width: 90%; max-width: 400px; margin-top: 15px; display: flex; flex-direction: column; gap: 12px; transform: translateY(-150vh); transition: transform 3s ease-in-out; z-index: 25; }
.content-animate-wrapper.slide-down { transform: translateY(0); }
.box-container { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: 0 4px 16px rgba(0,0,0,0.03); }
.box-container h2 { font-size: 1.05rem; margin-bottom: 14px; text-align: center; }
.input-group { display: flex; gap: 8px; }
#msg-input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fafdff; font-size: 16px; touch-action: manipulation; }
#msg-submit { padding: 0 16px; background: #000000; color: var(--white); border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }

#messages-list { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.message-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.03); display: flex; justify-content: space-between; gap: 12px; }
.message-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.message-text { font-size: 0.95rem; font-weight: 500; word-break: break-word; }
.message-time { font-size: 0.75rem; color: #888888; }
.delete-btn { width: 28px; height: 28px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
.delete-svg { width: 18px; height: 18px; fill: #ff3b30; }

.pagination-container { display: flex; justify-content: center; gap: 12px; padding: 2px 0; }
.page-num { cursor: pointer; font-size: 0.95rem; font-weight: 600; color: #888888; padding: 2px 6px; }
.page-num.active { color: #000000; text-decoration: underline; }

.circle-btn { width: 60px; height: 60px; background: var(--white); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid var(--border); position: absolute; top: 80%; transform: translateY(-50%); z-index: 100; right: 10%; transition: transform 0.2s ease; }
.circle-btn:active { transform: scale(0.92); }
.lock-svg { width: 26px; height: 26px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15); transform-origin: center center; }
.lock-svg.rotated { transform: rotate(90deg); }

.circle-btn.vibrating { animation: vibrate 0.1s linear infinite; }
@keyframes vibrate { 0%, 100% { transform: translateY(-50%) translateX(0); } 25% { transform: translateY(-50%) translateX(-2px); } 75% { transform: translateY(-50%) translateX(2px); } }
