@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700;900&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } #gameCanvas { touch-action: none; } #gameCanvas { touch-action: none; } body { background: #0a0a1a; font-family: 'Vazirmatn', sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; color: #fff; } #game-container { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 420px; padding: 10px; gap: 8px; } .scoreboard { display: flex; justify-content: space-between; align-items: center; width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 10px 20px; } .score-box { text-align: center; } .score-label { font-size: 11px; opacity: 0.6; letter-spacing: 2px; text-transform: uppercase; } .score-value { font-size: 36px; font-weight: 900; line-height: 1; } .score-box.player .score-value { color: #00f5ff; } .score-box.ai .score-value { color: #ff4466; } .score-divider { font-size: 24px; opacity: 0.3; } #canvas-wrapper { position: relative; width: 100%; border-radius: 20px; overflow: hidden; box-shadow: 0 0 40px rgba(0,245,255,0.15), 0 0 80px rgba(255,68,102,0.1); } #gameCanvas { display: block; width: 100%; cursor: none; } #overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); transition: opacity 0.3s; z-index: 10; } #overlay.hidden { opacity: 0; pointer-events: none; } .overlay-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; } .overlay-sub { font-size: 14px; opacity: 0.6; margin-bottom: 20px; text-align: center; } .btn { background: linear-gradient(135deg, #00f5ff, #0088ff); color: #000; border: none; padding: 14px 36px; font-size: 16px; font-weight: 700; font-family: 'Vazirmatn', sans-serif; border-radius: 50px; cursor: pointer; box-shadow: 0 0 20px rgba(0,245,255,0.4); } .btn.red { background: linear-gradient(135deg, #ff4466, #ff0055); box-shadow: 0 0 20px rgba(255,68,102,0.4); } .level-btns { display: flex; gap: 10px; margin-bottom: 8px; } .level-btn { border: 2px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); color: #fff; padding: 10px 20px; font-size: 14px; font-weight: 700; font-family: 'Vazirmatn', sans-serif; border-radius: 50px; cursor: pointer; transition: all 0.2s; } .level-btn.easy { border-color: #00ff88; color: #00ff88; } .level-btn.medium { border-color: #ffcc00; color: #ffcc00; } .level-btn.hard { border-color: #ff4466; color: #ff4466; } .level-btn.selected.easy { background: #00ff88; color: #000; box-shadow: 0 0 15px rgba(0,255,136,0.4); } .level-btn.selected.medium { background: #ffcc00; color: #000; box-shadow: 0 0 15px rgba(255,204,0,0.4); } .level-btn.selected.hard { background: #ff4466; color: #000; box-shadow: 0 0 15px rgba(255,68,102,0.4); } .level-badge { font-size: 12px; padding: 3px 12px; border-radius: 20px; font-weight: 700; margin-bottom: 6px; } .level-badge.easy { background: rgba(0,255,136,0.15); color: #00ff88; border: 1px solid #00ff88; } .level-badge.medium { background: rgba(255,204,0,0.15); color: #ffcc00; border: 1px solid #ffcc00; } .level-badge.hard { background: rgba(255,68,102,0.15); color: #ff4466; border: 1px solid #ff4466; } .goal-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 5; transition: opacity 0.1s; } .goal-flash.player { background: radial-gradient(ellipse, rgba(0,245,255,0.3) 0%, transparent 70%); } .goal-flash.ai { background: radial-gradient(ellipse, rgba(255,68,102,0.3) 0%, transparent 70%); } .goal-flash.show { opacity: 1; } .controls-hint { font-size: 11px; opacity: 0.4; text-align: center; letter-spacing: 1px; } .btn-lb { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); padding: 8px 24px; font-size: 13px; font-family: 'Vazirmatn', sans-serif; border-radius: 50px; cursor: pointer; margin-top: 10px; } .btn-lb:hover { border-color: rgba(255,255,255,0.5); color: #fff; } .lb-panel { position: absolute; inset: 0; background: rgba(0,0,0,0.92); backdrop-filter: blur(10px); z-index: 20; display: flex; flex-direction: column; align-items: center; padding: 20px 16px; overflow-y: auto; } .lb-panel.hidden { display: none; } .lb-title { font-size: 22px; font-weight: 900; margin-bottom: 16px; } .lb-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-bottom: 16px; } .lb-stat-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 10px 6px; text-align: center; } .lb-stat-val { font-size: 24px; font-weight: 900; } .lb-stat-val.win { color: #00ff88; } .lb-stat-val.lose { color: #ff4466; } .lb-stat-val.rate { color: #ffcc00; } .lb-stat-lbl { font-size: 10px; opacity: 0.5; margin-top: 2px; } .lb-history-title { font-size: 13px; opacity: 0.5; margin-bottom: 8px; align-self: flex-start; } .lb-row { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 12px; border-radius: 10px; margin-bottom: 4px; font-size: 13px; background: rgba(255,255,255,0.04); } .lb-row .result { font-weight: 700; } .lb-row .result.win { color: #00ff88; } .lb-row .result.lose { color: #ff4466; } .lb-row .score { opacity: 0.7; } .lb-row .level-tag { font-size: 10px; opacity: 0.5; } .lb-empty { opacity: 0.4; font-size: 14px; margin-top: 30px; } /* تبهای لیدربرد */ .lb-tabs { display: flex; gap: 0; width: 100%; margin-bottom: 14px; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; } .lb-tab { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; font-weight: 700; font-family: 'Vazirmatn', sans-serif; border-radius: 9px; cursor: pointer; border: none; background: transparent; color: rgba(255,255,255,0.4); transition: all 0.2s; } .lb-tab.active { background: rgba(255,255,255,0.12); color: #fff; } .lb-tab-content { display: none; width: 100%; } .lb-tab-content.active { display: flex; flex-direction: column; align-items: center; width: 100%; } /* رنکهای جهانی */ .global-row { display: flex; align-items: center; width: 100%; padding: 10px 12px; border-radius: 12px; margin-bottom: 6px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); gap: 10px; } .global-row.me { background: rgba(0,245,255,0.08); border-color: rgba(0,245,255,0.25); } .global-row.top1 { background: rgba(255,200,0,0.08); border-color: rgba(255,200,0,0.3); } .global-row.top2 { background: rgba(180,180,180,0.07); border-color: rgba(180,180,180,0.2); } .global-row.top3 { background: rgba(200,100,50,0.07); border-color: rgba(200,100,50,0.2); } .global-rank { font-size: 18px; min-width: 28px; text-align: center; } .global-name { flex: 1; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .global-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; } .global-wins { font-size: 14px; font-weight: 900; color: #00ff88; } .global-rate { font-size: 10px; color: rgba(255,204,0,0.8); } .lb-loading { opacity: 0.5; font-size: 14px; margin: 20px 0; } .lb-error { color: #ff4466; font-size: 13px; margin: 20px 0; text-align: center; } .lb-refresh-btn { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); padding: 6px 18px; font-size: 12px; font-family: 'Vazirmatn', sans-serif; border-radius: 50px; cursor: pointer; margin-bottom: 10px; align-self: flex-end; } .pause-menu { position: absolute; inset: 0; background: rgba(0,0,0,0.88); backdrop-filter: blur(10px); z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } .pause-menu.hidden { display: none; } .pause-menu { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.82); backdrop-filter: blur(10px); z-index: 15; } .pause-menu.hidden { display: none; }