/* ---------- RESET & GLOBAL ---------- */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            min-height: 100vh;
            background: #168aad;
            font-family: 'Segoe UI', 'Poppins', system-ui, -apple-system, 'Roboto', sans-serif;
            padding: 24px 20px;
            transition: background 0.3s ease;
        }

        /* main container */
        .master-container {
            max-width: 1300px;
            margin: 0 auto;
        }

        /* ========== PROFESSIONAL HEADER SECTION ========== */
        .pro-header {
            background: #3ba99c;
            backdrop-filter: blur(16px);
            border-radius: 48px;
            padding: 20px 32px;
            margin-bottom: 32px;
            border: 1px solid rgba(255, 215, 0, 0.3);
            box-shadow: 0 15px 35px rgba(0,0,0,0.3);
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 12px;
        }

        .brand h1 {
            font-size: 2.2rem;
            font-weight: 800;
            background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
            -webkit-background-clip: text;
            background-clip: text;
            color: black;
            letter-spacing: 1px;
        }

        .header-stats {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .stat-pill {
            background: #1b4332;
            border-radius: 60px;
            padding: 6px 18px;
            text-align: center;
            border: 1px solid rgba(255,215,0,0.4);
        }

        .stat-pill-label {
            font-size: 0.6rem;
            text-transform: uppercase;
            color: yellow;
            letter-spacing: 1px;
        }

        .stat-pill-value {
            font-size: 1.4rem;
            font-weight: 700;
            color: white;
            line-height: 1;
        }
        .difficulty-tag {
            background: black;
            border-radius: 60px;
            padding: 6px 20px;
            text-align: center;
        }

        .difficulty-tag .label {
            font-size: 0.6rem;
            text-transform: uppercase;
            color: white;
            font-weight: bold;
        }

        .difficulty-tag .value {
            font-size: 1.2rem;
            font-weight: 800;
            color: white;
            line-height: 1;
        }

        /* ========== TOOL SECTION (separate from header) ========== */
        .tool-section {
            background: #3ba99c;
            backdrop-filter: blur(12px);
            border-radius: 56px;
            padding: 16px 28px;
            margin-bottom: 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 18px;
            border: 1px solid rgba(255,255,255,0.15);
        }

        .tool-group {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
        }

        .tool-btn {
            background: #1b4332;
            border: none;
            padding: 10px 24px;
            border-radius: 50px;
            color: white;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
            backdrop-filter: blur(4px);
            letter-spacing: 0.5px;
        }

        .tool-btn:hover {
            background: #594e36;
            transform: translateY(-2px);
        }

        .tool-btn:active {
            transform: translateY(1px);
        }

        .info-hint {
            font-size: 0.7rem;
            color: white;
            background: #1b4332;
            padding: 5px 16px;
            border-radius: 30px;
        }

        /* ========== GAME AREA ========== */
        .game-layout {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 40px;
            margin-bottom: 35px;
        }

        .canvas-container {
            position: relative;
        }

        canvas {
            display: block;
            width: 100%;
            max-width: 560px;
            height: auto;
            aspect-ratio: 1 / 1;
            border-radius: 36px;
            box-shadow: 0 25px 45px -10px rgba(0,0,0,0.6);
            background: white;
            transition: transform 0.2s;
            cursor: pointer;
        }

        canvas:hover {
            transform: scale(1.01);
        }

        /* Premium D-Pad */
        .control-panel {
            background: #5e548e;
            backdrop-filter: blur(20px);
            border-radius: 64px;
            padding: 30px 28px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .dpad {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
        }

        .dpad-row {
            display: flex;
            gap: 20px;
            justify-content: center;
        }

        .dpad-btn {
            width: 85px;
            height: 85px;
            border-radius: 50%;
            background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
            border: 1px solid rgba(255,255,255,0.3);
            font-size: 2.3rem;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: all 0.07s linear;
            box-shadow: 0 8px 0 rgba(0,0,0,0.3);
        }

        .dpad-btn:active {
            transform: translateY(4px);
            box-shadow: 0 3px 0 rgba(0,0,0,0.3);
        }

        /* ========== INFO BOARD ========== */
        .info-board {
            background: #3ba99c;
            backdrop-filter: blur(12px);
            border-radius: 32px;
            padding: 20px 28px;
            margin-top: 28px;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 18px;
            margin-bottom: 18px;
        }

        .info-card {
            background: #1b4332;
            border-radius: 24px;
            padding: 10px;
            text-align: center;
        }

        .info-card-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            color: white;
            letter-spacing: 1px;
        }

        .info-card-value {
            font-size: 1rem;
            font-weight: 600;
            color: yellow;
            margin-top: 5px;
        }

        .game-tip {
            text-align: center;
            font-size: 0.7rem;
            color: white;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 14px;
        }

        /* ========== FOOTER ========== */
        .game-footer {
            margin-top: 32px;
            text-align: center;
            padding: 16px;
            background: #1b4332;
            border-radius: 40px;
        }

        .footer-text {
            font-size: 0.7rem;
            color: white;
        }

        /* Toast notification */
        .toast-notify {
            position: fixed;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            background: black;
            backdrop-filter: blur(20px);
            padding: 12px 28px;
            border-radius: 60px;
            color: white;
            z-index: 1000;
            animation: slideUp 0.25s ease, fadeOut 0.3s ease 2.5s forwards;
            border-left: 5px solid #FFD700;
            font-size: 0.85rem;
            font-weight: 500;
            pointer-events: none;
            white-space: nowrap;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateX(-50%) translateY(25px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        @keyframes fadeOut {
            to { opacity: 0; visibility: hidden; }
        }

        /* Victory Overlay */
        .victory-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.97);
            backdrop-filter: blur(20px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            animation: fadeIn 0.4s ease;
        }

        .victory-card {
            background: linear-gradient(145deg, #1e1b4b, #0f172a);
            border-radius: 56px;
            padding: 40px 55px;
            text-align: center;
            border: 2px solid #FFD700;
            animation: bounceScale 0.5s ease;
            max-width: 90%;
        }

        .victory-card h1 {
            font-size: 2.6rem;
            color: #FFD700;
            margin-bottom: 15px;
        }

        .victory-card p {
            color: white;
            margin: 12px 0;
            font-size: 1.1rem;
        }

        .victory-btn {
            background: linear-gradient(135deg, #FFD700, #FFA500);
            border: none;
            padding: 12px 36px;
            border-radius: 60px;
            font-weight: bold;
            margin-top: 20px;
            cursor: pointer;
            font-size: 1rem;
            transition: 0.2s;
        }

        .victory-btn:hover {
            transform: scale(1.02);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes bounceScale {
            0% { transform: scale(0.7); opacity: 0; }
            80% { transform: scale(1.05); }
            100% { transform: scale(1); opacity: 1; }
        }

        /* Responsive */
        @media (max-width: 800px) {
            .pro-header { padding: 16px 22px; }
            .brand h1 { font-size: 1.7rem; }
            .stat-pill-value { font-size: 1.1rem; }
            .dpad-btn { width: 70px; height: 70px; font-size: 1.9rem; }
            .tool-btn { padding: 7px 18px; font-size: 0.75rem; }
        }

        @media (max-width: 580px) {
            .dpad-btn { width: 55px; height: 55px; font-size: 1.4rem; }
            .dpad-row { gap: 12px; }
            .control-panel { padding: 20px 18px; }
            .tool-section { flex-direction: column; align-items: stretch; text-align: center; }
            .tool-group { justify-content: center; }
            .info-grid { grid-template-columns: repeat(2, 1fr); }
            .toast-notify { white-space: normal; text-align: center; width: 85%; font-size: 0.75rem; }
            .stat-pill { padding: 3px 12px; }
        }