/* ============ skribble — cartoon style ============ */ * { margin: 0; padding: 0; box-sizing: border-box; } :root { --blue-dark: #0d47a1; --blue: #1976d2; --blue-light: #42a5f5; --ink: #20303f; --panel-border: #d5dde5; --green: #5cb531; --orange: #ff9800; } html, body { height: 100%; } body { font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', 'Segoe UI', cursive, sans-serif; background: radial-gradient(1200px 700px at 20% -10%, rgba(255,255,255,.25), transparent 60%), repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 24px, transparent 24px 48px), linear-gradient(160deg, #2196f3 0%, #1565c0 55%, #0d47a1 100%); color: var(--ink); overflow: hidden; user-select: none; } .hidden { display: none !important; } .screen { height: 100vh; display: flex; flex-direction: column; } /* ============ logo ============ */ .logo { font-weight: 900; color: #fff; letter-spacing: 2px; transform: rotate(-2.5deg); text-shadow: -2px -2px 0 var(--blue-dark), 2px -2px 0 var(--blue-dark), -2px 2px 0 var(--blue-dark), 2px 2px 0 var(--blue-dark), 0 6px 0 rgba(0,0,0,.25); animation: logoBob 3s ease-in-out infinite; } @keyframes logoBob { 0%,100% { transform: rotate(-2.5deg) translateY(0); } 50% { transform: rotate(-2.5deg) translateY(-6px); } } .logo-big { font-size: 64px; text-align: center; } .logo-small { font-size: 26px; white-space: nowrap; } /* ============ panels & buttons ============ */ .panel { background: #fff; border: 3px solid var(--panel-border); border-radius: 14px; box-shadow: 0 6px 0 rgba(0,0,0,.18); } .btn { font-family: inherit; font-weight: 700; border: none; border-radius: 10px; color: #fff; cursor: pointer; padding: 10px 18px; font-size: 16px; text-shadow: 0 1px 0 rgba(0,0,0,.25); transition: transform .06s, box-shadow .06s, filter .15s; } .btn:active { transform: translateY(3px); } .btn:disabled { filter: grayscale(.8) brightness(.9); cursor: not-allowed; } .btn-green { background: var(--green); box-shadow: 0 4px 0 #3e7d1e; } .btn-green:active { box-shadow: 0 1px 0 #3e7d1e; } .btn-orange { background: var(--orange); box-shadow: 0 4px 0 #c25e00; } .btn-orange:active { box-shadow: 0 1px 0 #c25e00; } .btn-blue { background: var(--blue-light); box-shadow: 0 4px 0 #1565c0; } .btn-blue:active { box-shadow: 0 1px 0 #1565c0; } .btn-red { background: #e53935; box-shadow: 0 4px 0 #8e1b18; } .btn-red:active { box-shadow: 0 1px 0 #8e1b18; } .btn-big { font-size: 24px; padding: 14px 18px; } .btn-small { font-size: 14px; padding: 6px 10px; } input, select, textarea { font-family: inherit; font-size: 16px; padding: 10px 12px; border: 3px solid var(--panel-border); border-radius: 10px; outline: none; background: #fff; color: var(--ink); } input:focus, select:focus, textarea:focus { border-color: var(--blue-light); } /* ============ home screen ============ */ #screen-home { align-items: center; justify-content: center; overflow-y: auto; } .home-wrap { width: min(860px, 94vw); display: flex; flex-direction: column; gap: 18px; padding: 24px 0; } .home-columns { display: flex; gap: 18px; } .home-card { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; } .avatar-row { display: flex; align-items: center; justify-content: center; gap: 14px; } #avatar-preview { background: #e3f2fd; border: 3px solid var(--panel-border); border-radius: 12px; } #name-input { text-align: center; font-size: 20px; } .home-sep { display: flex; align-items: center; gap: 10px; color: #90a4ae; font-weight: 700; } .home-sep::before, .home-sep::after { content: ''; flex: 1; height: 3px; background: #eceff1; border-radius: 2px; } .join-row { display: flex; gap: 8px; } .join-row input { flex: 1; text-transform: uppercase; text-align: center; letter-spacing: 6px; font-weight: 700; } #rooms-card { max-height: 420px; } .rooms-head { display: flex; justify-content: space-between; align-items: center; } .rooms-head h2 { font-size: 20px; color: var(--blue-dark); } #rooms-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; } .rooms-empty { text-align: center; color: #90a4ae; padding: 30px 0; } .room-row { display: flex; align-items: center; gap: 10px; border: 2px solid var(--panel-border); border-radius: 10px; padding: 8px 12px; animation: slideIn .25s ease; } .room-row .room-info { flex: 1; } .room-row .room-code { font-weight: 900; color: var(--blue-dark); } .room-row .room-meta { font-size: 12px; color: #78909c; } .howto { padding: 14px 18px; font-size: 14px; text-align: center; background: rgba(255,255,255,.92); } /* ============ top bar ============ */ #topbar { display: flex; align-items: center; gap: 16px; padding: 8px 18px; } #room-code-chip { background: rgba(255,255,255,.9); border-radius: 10px; padding: 4px 12px; font-weight: 900; color: var(--blue-dark); cursor: pointer; font-size: 15px; border: 2px solid var(--panel-border); } #room-code-chip:hover { background: #fff; } #round-display { color: #fff; font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.3); white-space: nowrap; } #word-display { flex: 1; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; } .word-char { min-width: 26px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 8px; font-weight: 900; font-size: 20px; text-transform: uppercase; border-bottom: 4px solid #90a4ae; animation: popIn .2s ease; } .word-char.space { background: transparent; border: none; min-width: 14px; } .word-char.revealed { border-bottom-color: var(--green); color: var(--green); } .word-hint-label { color: #fff; font-size: 13px; font-weight: 700; align-self: center; margin-right: 6px; text-shadow: 0 1px 0 rgba(0,0,0,.3); } #clock { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); border-radius: 12px; padding: 3px 10px 3px 4px; border: 2px solid var(--panel-border); } #clock-svg { width: 34px; height: 34px; } .clock-face { fill: #fff; stroke: var(--ink); stroke-width: 2.5; } #clock-hand { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; transform-origin: 20px 20px; } .clock-dot { fill: var(--ink); } #clock-num { font-weight: 900; font-size: 18px; min-width: 30px; text-align: center; } #clock.urgent { animation: shake .5s infinite; background: #ffebee; } #clock.urgent #clock-num { color: #e53935; } @keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } } .icon-btn { background: rgba(255,255,255,.92); border: 2px solid var(--panel-border); border-radius: 10px; font-size: 18px; padding: 5px 10px; cursor: pointer; } .icon-btn:hover { background: #fff; } /* ============ main layout ============ */ #main { flex: 1; display: flex; gap: 12px; padding: 0 14px 14px; min-height: 0; } #players-panel { width: 230px; padding: 8px; overflow-y: auto; flex-shrink: 0; } #players-list { list-style: none; display: flex; flex-direction: column; gap: 6px; } .player-row { display: flex; align-items: center; gap: 8px; border: 2px solid var(--panel-border); border-radius: 10px; padding: 4px 8px 4px 4px; position: relative; background: #fff; animation: slideIn .25s ease; } .player-row.drawing { border-color: var(--orange); background: #fff8e1; } .player-row.guessed { border-color: #a5d6a7; background: #f1f8e9; } .player-row.me { box-shadow: inset 0 0 0 2px var(--blue-light); } .player-rank { font-weight: 900; color: #90a4ae; font-size: 13px; width: 18px; text-align: center; } .player-row canvas { border-radius: 8px; background: #e3f2fd; flex-shrink: 0; } .player-info { flex: 1; min-width: 0; } .player-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; } .player-score { font-size: 12px; color: #78909c; font-weight: 700; } .player-status { font-size: 15px; } .player-kick { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: #e53935; color: #fff; font-size: 11px; font-weight: 900; cursor: pointer; display: none; align-items: center; justify-content: center; } .player-row:hover .player-kick { display: flex; } .typing-dots::after { content: '…'; animation: dots 1s steps(3) infinite; } @keyframes dots { 0% { content: ''; } 33% { content: '.'; } 66% { content: '..'; } 100% { content: '...'; } } /* ============ canvas area ============ */ #center { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; } #canvas-wrap { flex: 1; position: relative; overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center; background: #fff; min-height: 0; } #draw-canvas { display: block; cursor: crosshair; border-radius: 10px; box-shadow: inset 0 0 0 2px #e3e8ee; } #draw-canvas.no-draw { cursor: not-allowed; } /* ============ tools ============ */ #tools { padding: 8px 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } #tools.disabled { opacity: .45; pointer-events: none; } #tool-buttons { display: flex; gap: 6px; } .tool-btn { width: 44px; height: 44px; border-radius: 10px; border: 3px solid var(--panel-border); background: #fff; cursor: pointer; color: var(--ink); padding: 6px; transition: transform .08s, border-color .1s, background .1s; } .tool-btn svg { width: 100%; height: 100%; } .tool-btn:hover { transform: translateY(-2px); } .tool-btn.active { border-color: var(--blue-light); background: #e3f2fd; } #brush-sizes { display: flex; align-items: center; gap: 8px; } .size-btn { border-radius: 50%; border: 3px solid var(--panel-border); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; } .size-btn.active { border-color: var(--blue-light); background: #e3f2fd; } .size-dot { background: var(--ink); border-radius: 50%; } #palette { display: grid; grid-template-rows: repeat(2, 26px); grid-auto-flow: column; gap: 4px; } .color-swatch { width: 26px; height: 26px; border-radius: 7px; cursor: pointer; border: 2px solid rgba(0,0,0,.25); transition: transform .08s; } .color-swatch:hover { transform: scale(1.15); } .color-swatch.active { outline: 3px solid var(--ink); transform: scale(1.12); } /* ============ chat ============ */ #chat-panel { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; padding: 8px; gap: 6px; } #chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 4px; word-break: break-word; } .chat-msg { font-size: 14px; padding: 3px 8px; border-radius: 8px; animation: slideIn .15s ease; line-height: 1.35; } .chat-msg .chat-name { font-weight: 900; } .chat-msg.sys { font-weight: 700; color: #607d8b; } .chat-msg.good { background: #dcedc8; color: #33691e; font-weight: 700; } .chat-msg.bad { color: #c62828; font-weight: 700; } .chat-msg.close { color: #ef6c00; font-weight: 700; } .chat-msg.guessed-self { background: #dcedc8; color: #33691e; } #typing-indicator { font-size: 12px; color: #78909c; min-height: 16px; font-style: italic; } #chat-input { width: 100%; font-size: 14px; } /* ============ overlay / banners ============ */ #overlay { position: absolute; inset: 0; z-index: 5; background: rgba(13, 71, 161, .55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; border-radius: 10px; } .overlay-card { background: #fff; border-radius: 16px; border: 3px solid var(--panel-border); box-shadow: 0 8px 0 rgba(0,0,0,.25); padding: 26px 34px; text-align: center; max-width: 88%; max-height: 92%; overflow-y: auto; animation: popIn .3s cubic-bezier(.2, 1.6, .4, 1); } .overlay-card h2 { color: var(--blue-dark); margin-bottom: 12px; font-size: 26px; } .overlay-card h3 { color: var(--ink); margin-bottom: 10px; } .overlay-sub { color: #78909c; margin-bottom: 14px; font-weight: 700; } .word-choice-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; } .word-choice-btn { font-family: inherit; font-size: 22px; font-weight: 900; padding: 18px 26px; border-radius: 12px; border: 3px solid var(--panel-border); background: #fff; cursor: pointer; color: var(--ink); transition: transform .1s, border-color .1s; animation: popIn .3s cubic-bezier(.2, 1.6, .4, 1) backwards; } .word-choice-btn:nth-child(2) { animation-delay: .08s; } .word-choice-btn:nth-child(3) { animation-delay: .16s; } .word-choice-btn:hover { transform: translateY(-4px) scale(1.04); border-color: var(--blue-light); background: #e3f2fd; } #banner { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(32,48,63,.92); color: #fff; padding: 10px 26px; border-radius: 12px; font-size: 20px; font-weight: 900; animation: bannerDrop .4s cubic-bezier(.2, 1.6, .4, 1); white-space: nowrap; pointer-events: none; } @keyframes bannerDrop { from { transform: translate(-50%, -70px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } } .reveal-word { font-size: 30px; font-weight: 900; color: var(--green); letter-spacing: 2px; margin: 8px 0 16px; text-transform: uppercase; } .score-recap { display: flex; flex-direction: column; gap: 5px; min-width: 260px; } .score-recap-row { display: flex; justify-content: space-between; gap: 20px; font-weight: 700; padding: 3px 10px; border-radius: 8px; } .score-recap-row:nth-child(odd) { background: #f5f7fa; } .score-recap-row .delta { color: var(--green); } /* leaderboard */ .podium { display: flex; align-items: flex-end; justify-content: center; gap: 18px; margin: 10px 0 18px; } .podium-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: popIn .4s cubic-bezier(.2,1.6,.4,1) backwards; } .podium-slot:nth-child(1) { order: 2; animation-delay: .1s; } .podium-slot:nth-child(2) { order: 1; animation-delay: .25s; } .podium-slot:nth-child(3) { order: 3; animation-delay: .4s; } .podium-block { width: 92px; border-radius: 10px 10px 0 0; display: flex; align-items: flex-start; justify-content: center; font-size: 30px; font-weight: 900; color: #fff; padding-top: 8px; border: 3px solid rgba(0,0,0,.2); border-bottom: none; } .podium-1 .podium-block { height: 110px; background: linear-gradient(#ffd54f, #ffb300); } .podium-2 .podium-block { height: 80px; background: linear-gradient(#eceff1, #b0bec5); } .podium-3 .podium-block { height: 60px; background: linear-gradient(#ffab91, #bf6a4a); } .podium-name { font-weight: 900; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .podium-score { color: #78909c; font-weight: 700; font-size: 13px; } .medal { font-size: 26px; } .leaderboard-table { min-width: 300px; display: flex; flex-direction: column; gap: 4px; } .leaderboard-row { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 8px; font-weight: 700; } .leaderboard-row:nth-child(odd) { background: #f5f7fa; } .leaderboard-row.winner { background: #fff8e1; border: 2px solid #ffd54f; } .leaderboard-rank { width: 26px; font-weight: 900; color: #90a4ae; } .leaderboard-name { flex: 1; text-align: left; } /* lobby settings */ .lobby-card { min-width: min(520px, 80vw); text-align: left; } .lobby-card h2 { text-align: center; } .lobby-code-row { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 14px; } .lobby-code { font-size: 30px; font-weight: 900; letter-spacing: 8px; color: var(--blue-dark); background: #e3f2fd; padding: 6px 18px; border-radius: 12px; border: 3px dashed var(--blue-light); cursor: pointer; } .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 14px; } .settings-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 13px; color: #546e7a; } .settings-grid select, .settings-grid input[type=text] { font-size: 15px; padding: 8px 10px; } .settings-grid .checkbox-label { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; } .settings-grid textarea { grid-column: 1 / -1; resize: vertical; min-height: 54px; font-size: 13px; } .settings-grid .full { grid-column: 1 / -1; } .lobby-actions { display: flex; justify-content: center; gap: 12px; } .waiting-text { text-align: center; color: #78909c; font-weight: 700; margin-top: 10px; animation: pulse 1.6s infinite; } @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } } /* ============ toasts ============ */ #toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 99; display: flex; flex-direction: column; gap: 8px; } .toast { background: rgba(32,48,63,.95); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,.3); animation: toastIn .3s cubic-bezier(.2,1.6,.4,1); max-width: 320px; } .toast.error { background: #c62828; } .toast.good { background: #2e7d32; } @keyframes toastIn { from { transform: translateX(120%); } to { transform: translateX(0); } } @keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } } @keyframes slideIn { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } /* confetti */ .confetti { position: absolute; top: -12px; width: 10px; height: 16px; z-index: 7; animation: confettiFall linear forwards; border-radius: 2px; pointer-events: none; } @keyframes confettiFall { from { transform: translateY(0) rotate(0deg); opacity: 1; } to { transform: translateY(110vh) rotate(720deg); opacity: .6; } } /* scrollbars */ ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 5px; } /* ============ responsive ============ */ @media (max-width: 1000px) { #players-panel { width: 180px; } #chat-panel { width: 240px; } } @media (max-width: 760px) { #main { flex-wrap: wrap; overflow-y: auto; } #center { min-width: 100%; order: -1; height: 70vh; } #players-panel, #chat-panel { width: 100%; max-height: 260px; } .home-columns { flex-direction: column; } .logo-big { font-size: 44px; } }