@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

body {
            font-family: 'Inter', sans-serif;
            background-color: #071652;
            color: white;
            touch-action: none;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        #main-wrapper {
            display: flex;
            gap: 24px;
            align-items: flex-start;
            max-width: 98vw;
        }

        #ranking-sidebar {
            width: 320px;
            background: #1e293b;
            padding: 20px;
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
            border: 2px solid #334155;
            max-height: 810px;
            overflow-y: auto;
        }

        #game-container {
            position: relative;
            background: #1e293b;
            padding: 24px;
            border-radius: 14px;
            box-shadow: 0 0 60px rgba(56, 189, 248, 0.4);
            border: 2px solid #334155;
            display: flex;
            gap: 24px;
        }

        .canvas-wrapper {
	
            position: relative;
            width: 377px;
            height: 748px;
            border: 3px solid #475569;
            background-color: #020617;
            overflow: hidden;
        }

        canvas#tetris {
            background-image: linear-gradient(rgba(51, 65, 85, 0.15) 1px, transparent 1px),
                              linear-gradient(90deg, rgba(51, 65, 85, 0.15) 1px, transparent 1px);
            background-size: 37px 37px;
            display: block;
        }

        .stats-panel {
            width: 192px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .stat-box {
            background: #0f172a;
            padding: 12px;
            border-radius: 10px;
            text-align: center;
            border: 1px solid #334155;
        }

        .stat-label {
            font-size: 0.8rem;
            color: #94a3b8;
            margin-bottom: 5px;
            font-weight: bold;
            text-transform: uppercase;
        }

        .stat-value {
            font-size: 1.35rem;
            font-weight: bold;
            color: #38bdf8;
            word-break: break-all;
        }

        #overlay {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.85);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            border-radius: 14px;
            padding: 24px;
        }

        .hidden { display: none !important; }

        .btn {
            background: #3b82f6;
            padding: 15px 35px;
            border-radius: 99px;
            font-weight: bold;
            font-size: 1.1rem;
            transition: all 0.2s;
            cursor: pointer;
            text-align: center;
            box-shadow: 0 5px 16px rgba(59, 130, 246, 0.5);
        }
        .btn:hover { transform: scale(1.05); background: #2563eb; }

        #pause-btn {
            background: #475569;
            width: 100%;
            padding: 12px;
            font-size: 1rem;
            border-radius: 8px;
        }

        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background: #334155;
            border-radius: 4px;
            margin-top: 6px;
            overflow: hidden;
        }
        #progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #3b82f6, #60a5fa);
            transition: width 0.3s ease-out;
        }