* { box-sizing: border-box; }
body { font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: 12px; color: #0033CC; margin: 0; padding: 0; background: linear-gradient(to bottom, #9cc8ee 0%, #b8dcf2 40%, #d6ebf8 100%); background-attachment: fixed; min-height: 100vh; }
a { color: #0033CC; text-decoration: underline; cursor: pointer; }
a:hover { color: #cc3300; }
.clouds { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.cloud { position: absolute; background: #fff; border-radius: 50%; opacity: 0.65; filter: blur(2px); box-shadow: 40px 10px 0 8px #fff, -35px 5px 0 5px #fff, 20px -10px 0 0 #fff; }
.container { position: relative; z-index: 1; width: 960px; margin: 12px auto; background: #fff; border: 2px solid #003366; box-shadow: 0 4px 12px rgba(0,30,80,0.35); }
.top-bar { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 50%, #1a4499 100%); border-bottom: 2px solid #001a4d; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.logo { font-size: 36px; font-weight: bold; color: #fff; letter-spacing: -2px; text-shadow: 2px 2px 0 #b51a1a, -1px -1px 0 #ff6666, 3px 3px 0 #001a4d; line-height: 1; cursor: pointer; }
.logo .o-red { color: #ff3333; }
.user-bar { color: #fff; font-size: 12px; text-shadow: 1px 1px 0 #001a4d; display:flex; align-items:center; gap:6px; }
.user-bar a { color: #fff; text-decoration: none; margin: 0 2px; padding: 4px 12px; background: linear-gradient(to bottom, #ffd633 0%, #ff9900 100%); border: 1px solid #663300; border-radius: 4px; display: inline-block; text-shadow: 1px 1px 0 #663300; font-weight: bold; cursor: pointer; }
.user-bar a:hover { background: linear-gradient(to bottom, #ffe066 0%, #ffaa11 100%); }
.user-bar a.btn-logout { background: linear-gradient(to bottom, #ff6666 0%, #cc0000 100%); border-color:#660000; text-shadow:1px 1px 0 #660000;}
.user-bar a.btn-msg { background: linear-gradient(to bottom, #5a9bf5 0%, #1a4499 100%); border-color:#001a4d; }
.user-bar a.btn-settings { background: linear-gradient(to bottom, #ccc 0%, #999 100%); border-color:#444; color:#000; text-shadow:none; }
.user-stats { font-size: 11px; }
.user-stats b { color: #ffcc33; cursor: pointer; }
.user-stats b:hover { text-decoration: underline; }
.live-clock { font-size: 10px; color: #ffcc33; padding: 2px 6px; border: 1px solid #ffcc33; border-radius: 3px; margin-right: 4px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: #00ff00; border-radius: 50%; margin-right: 3px; animation: pulse 1.5s infinite; box-shadow: 0 0 4px #00ff00; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.nav-bar { background: linear-gradient(to bottom, #3a72d8 0%, #1a4499 100%); border-bottom: 1px solid #001a4d; padding: 4px 6px; display: flex; gap: 1px; flex-wrap: wrap; }
.nav-item { display: flex; flex-direction: column; align-items: center; padding: 5px 8px 4px; color: #fff; text-decoration: none; font-size: 10.5px; font-weight: bold; text-align: center; border: 1px solid transparent; border-bottom: none; min-width: 70px; cursor: pointer; text-shadow: 1px 1px 0 #001a4d; border-radius: 4px 4px 0 0; flex: 1; max-width: 110px; }
.nav-item:hover { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 100%); border-color: #001a4d; }
.nav-item.active { background: linear-gradient(to bottom, #ffe066 0%, #ffaa11 100%); color: #663300; text-shadow: 1px 1px 0 #ffff99; border: 1px solid #663300; border-bottom: 1px solid #fff; }
.nav-item svg { width: 32px; height: 32px; margin-bottom: 2px; display: block; }

.nav-bar-secondary { background: linear-gradient(to bottom, #2c5fb0 0%, #1a4499 100%); border-bottom: 2px solid #001a4d; padding: 2px 6px; display: flex; gap: 1px; flex-wrap: wrap; }
.nav-item-small { padding: 3px 9px; color: #cce0f5; text-decoration: none; font-size: 10px; font-weight: bold; border: 1px solid transparent; cursor: pointer; text-shadow: 1px 1px 0 #001a4d; border-radius: 3px; font-family: inherit; background: transparent; }
.nav-item-small:hover { background: #5a9bf5; color: #fff; }
.nav-item-small.active { background: linear-gradient(to bottom, #ffe066 0%, #ffaa11 100%); color: #663300; text-shadow: 1px 1px 0 #ffff99; border: 1px solid #663300; }

.main-content { padding: 10px; background: #fff; }

.panel { background: #fff; border: 1px solid #3366cc; margin-bottom: 10px; box-shadow: 1px 1px 0 rgba(0,30,80,0.15); }
.panel-header { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 100%); color: #fff; padding: 4px 9px; font-weight: bold; font-size: 13px; border-bottom: 1px solid #001a4d; text-shadow: 1px 1px 0 #001a4d; display: flex; justify-content: space-between; align-items: center; }
.panel-header .small { font-size: 10px; font-weight: normal; opacity: 0.9; }
.panel-body { padding: 8px; }
.row { display: flex; gap: 10px; }
.col-main { flex: 2; }
.col-side { flex: 1; }

.featured-thumb { width: 100%; height: 210px; border: 2px solid #003366; background: linear-gradient(to bottom, #87ceeb 0%, #87ceeb 55%, #6b8e23 55%, #556b2f 100%); position: relative; }
.btn-play { display: inline-block; background: linear-gradient(to bottom, #88dd44 0%, #339900 100%); color: #fff; font-weight: bold; padding: 7px 22px; border: 1px solid #003300; border-radius: 5px; text-decoration: none; text-shadow: 1px 1px 0 #003300; cursor: pointer; font-family: inherit; font-size: 14px; box-shadow: inset 0 1px 0 #aaff66, 0 2px 2px rgba(0,0,0,0.3); }
.btn-play:hover { background: linear-gradient(to bottom, #99ee55 0%, #44aa11 100%); }
.btn-yellow { display: inline-block; background: linear-gradient(to bottom, #ffd633 0%, #ff9900 100%); color: #fff; font-weight: bold; padding: 7px 18px; border: 1px solid #663300; border-radius: 4px; text-decoration: none; text-shadow: 1px 1px 0 #663300; cursor: pointer; font-family: inherit; font-size: 13px; margin-top: 8px; }
.btn-yellow:hover { background: linear-gradient(to bottom, #ffe066 0%, #ffaa11 100%); }
.btn-red { display: inline-block; background: linear-gradient(to bottom, #ff6666 0%, #cc0000 100%); color: #fff; font-weight: bold; padding: 7px 18px; border: 1px solid #660000; border-radius: 4px; text-decoration: none; text-shadow: 1px 1px 0 #660000; cursor: pointer; font-family: inherit; font-size: 13px; margin-top: 8px; }

.empty-state { text-align: center; padding: 30px 20px; color: #666; }
.empty-state .icon { font-size: 48px; color: #99bbdd; margin-bottom: 8px; }
.empty-state h3 { color: #0033CC; margin: 6px 0; font-size: 16px; }
.empty-state p { font-size: 11px; color: #666; margin: 4px 0; }

.filter-side { width: 170px; flex-shrink: 0; background: #eef5fc; border: 1px solid #3366cc; padding: 0; }
.filter-side h3 { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 100%); color: #fff; margin: 0; padding: 4px 8px; font-size: 12px; text-shadow: 1px 1px 0 #001a4d; border-bottom: 1px solid #001a4d; }
.filter-side ul { list-style: none; margin: 0; padding: 0; }
.filter-side li { padding: 5px 10px; font-size: 11px; border-bottom: 1px solid #cce0f5; cursor: pointer; }
.filter-side li:hover { background: #fff; color: #cc3300; }
.filter-side li.active { background: #ffd699; color: #663300; font-weight: bold; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,20,60,0.6); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border: 3px solid #003366; box-shadow: 0 8px 24px rgba(0,0,0,0.5); width: 340px; border-radius: 4px; max-height: 90vh; overflow-y: auto; }
.modal-header { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 100%); color: #fff; padding: 6px 10px; font-weight: bold; font-size: 13px; text-shadow: 1px 1px 0 #001a4d; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #001a4d; position: sticky; top: 0; }
.modal-close { cursor: pointer; background: #cc3333; color: #fff; width: 22px; height: 22px; text-align: center; line-height: 20px; border: 1px solid #660000; border-radius: 3px; font-weight: bold; font-family: inherit; }
.modal-body { padding: 14px; }
.modal-body label { display: block; font-weight: bold; color: #0033CC; font-size: 11px; margin: 6px 0 2px; }
.modal-body input, .modal-body textarea, .modal-body select { width: 100%; font-family: inherit; border: 1px solid #3366cc; padding: 5px; font-size: 12px; box-sizing: border-box; border-radius: 2px; }
.modal-btn { margin-top: 10px; width: 100%; padding: 8px; font-family: inherit; font-weight: bold; border: 1px solid #003300; border-radius: 4px; cursor: pointer; color: #fff; text-shadow: 1px 1px 0 #003300; font-size: 13px; background: linear-gradient(to bottom, #88dd44 0%, #339900 100%); }
.modal-btn.signup { background: linear-gradient(to bottom, #ffd633 0%, #ff9900 100%); border-color:#663300; text-shadow:1px 1px 0 #663300;}

.form-row { margin-bottom: 8px; }
.form-row label { display: block; font-weight: bold; color: #0033CC; font-size: 11px; margin-bottom: 2px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; font-family: inherit; border: 1px solid #3366cc; padding: 4px; font-size: 12px; border-radius: 2px; box-sizing: border-box; }

.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge-card { text-align: center; border: 1px solid #99bbdd; padding: 6px; background: linear-gradient(to bottom, #fff 0%, #eef5ff 100%); font-size: 10px; cursor: pointer; position: relative; }
.badge-card:hover { border-color: #ff9900; }
.badge-card .delete-btn { position: absolute; top: 2px; right: 2px; background: #cc0000; color: #fff; border: 1px solid #660000; border-radius: 2px; cursor: pointer; font-size: 9px; padding: 1px 3px; font-weight: bold; }
.game-thumb { width: 90px; height: 70px; border: 1px solid #003366; flex-shrink: 0; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }

.ad-box { border: 1px solid #99bbdd; padding: 8px; text-align: center; position: relative; background: #fff; }
.ad-box .report-btn { position: absolute; top: 2px; right: 2px; background: transparent; border: none; color: #001a4d; font-size: 9px; cursor: pointer; text-decoration: underline; }
.ad-banner { background: linear-gradient(to bottom, #5a9bf5, #1a4499); color: #fff; padding: 15px; border: 2px solid #003366; border-radius: 4px; font-weight: bold; text-shadow: 1px 1px 0 #001a4d; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.ad-banner img { max-width: 100px; max-height: 60px; border: 1px solid #fff; }
.ad-banner .ad-text { flex: 1; }

.group-card { border: 1px solid #3366cc; background: #f5faff; padding: 8px; display: flex; gap: 10px; align-items: center; margin-bottom: 6px; cursor: pointer; }
.group-card:hover { background: #eef5ff; }
.group-emblem { width: 50px; height: 50px; border: 2px solid #003366; flex-shrink: 0; background: #ccc; display: flex; align-items: center; justify-content: center; font-size: 24px; }

.mod-panel { background: #ffeeee; border: 1px solid #cc0000; padding: 8px; margin-top: 10px; }
.mod-panel h3 { color: #cc0000; margin: 0 0 6px; }
.mod-panel button { padding: 3px 8px; margin: 2px; background: #ff6666; border: 1px solid #cc0000; color: #fff; cursor: pointer; font-family: inherit; font-weight: bold; }
.mod-panel input { width: 50px; padding: 2px; font-family: inherit; }

.bloxmake-tabs { display: flex; gap: 2px; margin-bottom: 10px; border-bottom: 2px solid #003366; padding-left: 4px; }
.bm-tab { padding: 6px 16px; background: linear-gradient(to bottom, #cce0f5 0%, #99bbdd 100%); border: 1px solid #003366; border-bottom: none; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: bold; color: #0033CC; border-radius: 5px 5px 0 0; position: relative; top: 1px; }
.bm-tab.active { background: linear-gradient(to bottom, #5a9bf5 0%, #2c5fb0 100%); color: #fff; text-shadow: 1px 1px 0 #001a4d; border-color: #001a4d; top: 0; padding-top: 7px; }
.bm-tab.disabled { opacity: 0.5; cursor: not-allowed; }
.bm-panel { display: none; }
.bm-panel.active { display: block; }
.bm-layout { display: flex; gap: 12px; }
.bm-editor { flex: 1; }
.bm-preview { width: 280px; flex-shrink: 0; }
.bm-control { margin-bottom: 10px; padding: 8px; background: #f5faff; border: 1px solid #99bbdd; }
.bm-control label { display: block; font-weight: bold; margin-bottom: 4px; color: #0033CC; }
.color-row { display: flex; gap: 4px; flex-wrap: wrap; }
.color-swatch { width: 28px; height: 28px; border: 2px solid #003; cursor: pointer; border-radius: 3px; }
.color-swatch.selected { box-shadow: 0 0 0 2px #ffcc33, 0 0 0 4px #003; }
.bm-preview-stage { width: 100%; height: 280px; border: 2px solid #003366; background: linear-gradient(to bottom, #87ceeb 0%, #b8dcf2 60%, #6b8e23 60%, #4d6b1a 100%); position: relative; overflow: hidden; }
.shirt-preview { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 140px; height: 160px; border: 2px solid #003; background: var(--shirt-color, #cc3333); clip-path: polygon(30% 0, 70% 0, 100% 25%, 85% 30%, 85% 100%, 15% 100%, 15% 30%, 0 25%); }
.pants-preview { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 110px; height: 170px; border: 2px solid #003; background: var(--pants-color, #3366cc); clip-path: polygon(20% 0, 80% 0, 100% 100%, 55% 100%, 50% 50%, 45% 100%, 0 100%); }
.tshirt-preview { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 130px; height: 140px; border: 2px solid #003; background: var(--tshirt-color, #ffcc33); clip-path: polygon(25% 0, 75% 0, 100% 25%, 80% 30%, 80% 100%, 20% 100%, 20% 30%, 0 25%); }
.hat-stage { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 180px; height: 180px; perspective: 600px; }
.hat-3d { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transform: rotateX(-15deg) rotateY(var(--rot, 0deg)); transition: transform 0.4s; }
.hat-crown { position: absolute; width: 70px; height: 60px; left: 55px; top: 35px; transform-style: preserve-3d; }
.hat-crown .face { position: absolute; background: var(--hat-color, #cc3333); border: 1.5px solid #001a4d; }
.hat-crown .front { width: 70px; height: 60px; transform: translateZ(35px); }
.hat-crown .back { width: 70px; height: 60px; transform: translateZ(-35px); }
.hat-crown .left { width: 70px; height: 60px; transform: rotateY(-90deg) translateZ(35px); }
.hat-crown .right { width: 70px; height: 60px; transform: rotateY(90deg) translateZ(35px); }
.hat-crown .top { width: 70px; height: 70px; transform: rotateX(90deg) translateZ(35px); background: var(--hat-top, #ee5555); }
.hat-crown .bot { width: 70px; height: 70px; transform: rotateX(-90deg) translateZ(25px); }
.hat-brim { position: absolute; width: 130px; height: 16px; left: 25px; top: 88px; background: var(--hat-color, #cc3333); border: 1.5px solid #001a4d; border-radius: 8px; transform: rotateX(60deg); box-shadow: inset 0 2px 0 rgba(255,255,255,0.3); }
.hat-band { position: absolute; width: 72px; height: 8px; left: 54px; top: 88px; background: var(--hat-band, #ffcc33); border: 1px solid #001a4d; transform: translateZ(34px); }
.bm-rotate-btns { text-align: center; margin-top: 6px; }
.bm-rotate-btns button { font-family: inherit; font-size: 11px; padding: 3px 12px; margin: 0 3px; background: linear-gradient(to bottom, #fff 0%, #cce0f5 100%); border: 1px solid #003366; cursor: pointer; font-weight: bold; color: #0033CC; border-radius: 3px; }
.bm-slider { width: 100%; }
.bm-create-btn { display: block; width: 100%; margin-top: 10px; padding: 8px; background: linear-gradient(to bottom, #88dd44 0%, #339900 100%); color: #fff; border: 1px solid #003300; border-radius: 4px; font-family: inherit; font-weight: bold; font-size: 13px; cursor: pointer; text-shadow: 1px 1px 0 #003300; }
.bm-confirm { margin-top: 8px; padding: 6px; background: #ffffcc; border: 1px solid #cc9900; font-size: 11px; color: #663300; display: none; }
.bm-confirm.show { display: block; }

#face-canvas { border: 2px solid #003366; background: transparent; cursor: crosshair; display: block; margin: 0 auto; }

.footer { background: linear-gradient(to bottom, #5a9bf5 0%, #1a4499 100%); color: #fff; text-align: center; padding: 8px; font-size: 10px; text-shadow: 1px 1px 0 #001a4d; border-top: 2px solid #001a4d; }
.footer a { color: #ffcc33; cursor: pointer; }
.breadcrumb { font-size: 10px; margin-bottom: 8px; color: #666; }
.notice { background: #ffffcc; border: 1px solid #cc9900; padding: 6px 8px; font-size: 11px; color: #663300; margin-bottom: 10px; text-align: center; }
.login-required { text-align: center; padding: 30px; }
.login-required h3 { color: #cc3300; font-size: 16px; margin: 8px 0; }
.login-required p { font-size: 11px; color: #666; margin: 6px 0; }

.color-palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 6px; }
.color-palette .swatch { width: 100%; aspect-ratio: 1; border: 2px solid #003366; cursor: pointer; border-radius: 2px; }
.avatar-part { position: absolute; border: 2px solid #003366; cursor: pointer; transition: box-shadow 0.15s; }
.avatar-part:hover { box-shadow: 0 0 0 2px #ffcc33; }
.avatar-part.selected { box-shadow: 0 0 0 3px #ff9900, 0 0 8px #ff9900; }

.shutdown-overlay { position: fixed; inset: 0; background: #1a4499; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; text-align: center; padding: 20px; }
.shutdown-overlay h1 { font-size: 48px; text-shadow: 3px 3px 0 #001a4d; margin-bottom: 10px; }
.shutdown-overlay p { font-size: 18px; text-shadow: 2px 2px 0 #001a4d; }

.chat-box { height: 200px; overflow-y: auto; border: 1px solid #99bbdd; padding: 6px; background: #f5faff; margin-bottom: 6px; }
.chat-msg { margin-bottom: 4px; }
.chat-msg b { color: #0033CC; }
.chat-msg.me b { color: #cc3300; }

.banned-screen { text-align: center; padding: 40px; }
.banned-screen h1 { color: #cc0000; font-size: 24px; }
.banned-screen p { font-size: 14px; color: #333; }

.bc-banner { background: linear-gradient(to right, #ffcc33, #ff9900); padding: 5px 10px; border-radius: 4px; color: #fff; text-shadow: 1px 1px 0 #663300; font-weight: bold; font-size: 10px; margin-left: 5px; }

.msg-tabs { display: flex; margin-bottom: 10px; border-bottom: 2px solid #003366; }
.msg-tab { padding: 6px 12px; cursor: pointer; font-weight: bold; color: #0033CC; border: 1px solid #003366; border-bottom: none; background: #cce0f5; }
.msg-tab.active { background: #fff; color: #cc3300; border-bottom: 1px solid #fff; }