* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 25%, #81C784 50%, #A5D6A7 75%, #4CAF50 100%) !important;
            background-attachment: fixed !important;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                radial-gradient(circle at 25% 25%, rgba(76, 175, 80, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 75% 75%, rgba(102, 187, 106, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 50% 50%, rgba(129, 199, 132, 0.1) 0%, transparent 25%)!important;
            animation: grassWave 4s ease-in-out infinite;
            pointer-events: none;
            z-index: 0;
        }

        @keyframes grassWave {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-2px) rotate(0.5deg); }
        }

        /* HEADER */
        .header {
            background: linear-gradient(135deg, #2E7D32 0%, #388E3C 50%, #43A047 100%);
            padding: 15px 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            position: relative;
            z-index: 1000;
            border-bottom: 3px solid #1B5E20;
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
            color: white;
            text-decoration: none;
        }

        .logo h1 {
            font-size: 2.2rem;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            background: linear-gradient(45deg, #FFD700, #FFF);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .logo-icon {
            font-size: 2.5rem;
            color: #FFD700;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-5px); }
        }

        .app-store-btn {
            background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFD700 100%);
            color: white;
            text-decoration: none;
            padding: 12px 24px;
            border-radius: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
        }

        .app-store-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
            background: linear-gradient(135deg, #FF8A65 0%, #FFB74D 50%, #FFE082 100%);
        }

        .app-store-btn i {
            font-size: 1.2rem;
            animation: spin 3s linear infinite;
        }

        @keyframes spin {
            from { transform: rotateY(0deg); }
            to { transform: rotateY(360deg); }
        }

        /* MAIN CONTENT */
        .main-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        .game-container {
            display: flex;
            gap: 30px;
            align-items: flex-start;
            background: rgba(255,255,255,0.95);
            padding: 30px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            backdrop-filter: blur(10px);
            border: 3px solid rgba(76, 175, 80, 0.3);
            max-width: 1200px;
        }

        /* BOARD CONTAINER - QUAN TRỌNG CHO MOBILE */
        .board-container {
            position: relative;
            width: auto;
            height: auto;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
            border-radius: 15px;
            background: white;
            box-shadow: 0 15px 40px rgba(0,0,0,0.4);
        }

        .board {
            display: grid;
            grid-template-columns: repeat(15, 40px);
            grid-template-rows: repeat(15, 40px);
            background-color: white;
            padding: 15px;
            border: 4px solid #2E7D32;
            border-radius: 15px;
            position: relative;
            /* Kích thước cố định cho board - KHÔNG THAY ĐỔI */
            width: 630px; /* 15 * 40px + padding */
            height: 630px; /* 15 * 40px + padding */
            min-width: 630px;
            min-height: 630px;
        }

        .board::before {
            content: '';
            position: absolute;
            top: -4px;
            left: -4px;
            right: -4px;
            bottom: -4px;
            background: linear-gradient(45deg, #4CAF50, #2196F3, #FFC107, #F44336);
            border-radius: 15px;
            z-index: -1;
            animation: borderGlow 3s linear infinite;
        }

        @keyframes borderGlow {
            0% { filter: hue-rotate(0deg); }
            100% { filter: hue-rotate(360deg); }
        }

        .cell {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 14px;
            color: #333;
            position: relative;
            transition: all 0.2s ease;
        }

        .piece {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border: 2px solid white;
            box-shadow: 0 3px 10px rgba(0,0,0,0.4);
            z-index: 100;
            transition: all 0.3s ease;
            cursor: pointer;
            /* Tăng kích thước tương tác trên mobile */
            min-width: 28px;
            min-height: 28px;
        }

        .piece.red { 
            background: linear-gradient(135deg, #F44336 0%, #E53935 50%, #D32F2F 100%);
        }
        .piece.green { 
            background: linear-gradient(135deg, #4CAF50 0%, #43A047 50%, #388E3C 100%);
        }
        .piece.yellow { 
            background: linear-gradient(135deg, #FFC107 0%, #FFB300 50%, #FF8F00 100%);
        }
        .piece.blue { 
            background: linear-gradient(135deg, #2196F3 0%, #1976D2 50%, #1565C0 100%);
        }

        .piece.moving {
            z-index: 200;
            transform: translate(-50%, -50%) scale(1.4);
            box-shadow: 0 6px 20px rgba(0,0,0,0.8);
        }

        .piece.selectable {
            border: 3px solid #FFD700;
            animation: glow 1.5s infinite;
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 10px #FFD700; }
            50% { box-shadow: 0 0 25px #FFD700, 0 0 35px #FFD700; }
        }

        .game-ui {
            background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            width: 360px;
            border: 2px solid rgba(76, 175, 80, 0.3);
        }

        .game-ui h2 {
            text-align: center;
            margin-bottom: 20px;
            color: #2E7D32;
            font-size: 1.8rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
        }

        .player-info {
            margin-bottom: 12px;
            padding: 15px;
            border-radius: 12px;
            border: 2px solid transparent;
            transition: all 0.3s;
            background: rgba(255,255,255,0.7);
        }

        .player-info.active {
            border-color: #4CAF50;
            background: rgba(76, 175, 80, 0.1);
            transform: scale(1.02);
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .player-info.red { border-left: 5px solid #F44336; }
        .player-info.green { border-left: 5px solid #4CAF50; }
        .player-info.yellow { border-left: 5px solid #FFC107; }
        .player-info.blue { border-left: 5px solid #2196F3; }

        .dice-container {
            text-align: center;
            margin: 20px 0;
            padding: 20px;
            background: rgba(76, 175, 80, 0.1);
            border-radius: 15px;
            border: 2px solid rgba(76, 175, 80, 0.3);
        }

        .dice-container h3 {
            color: #2E7D32;
            margin-bottom: 15px;
        }

        .dice {
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
            border: 3px solid #4CAF50;
            border-radius: 15px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            color: #2E7D32;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .dice:hover {
            transform: scale(1.1);
            background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 100%);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
        }

        .dice.rolling {
            animation: diceRoll 0.6s ease-in-out;
        }

        @keyframes diceRoll {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(90deg); }
            50% { transform: rotate(180deg); }
            75% { transform: rotate(270deg); }
        }

        .game-button {
            background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
            color: white;
            border: none;
            padding: 12px 18px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            margin: 4px 0;
            transition: all 0.3s;
            width: 100%;
            box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
            /* Tăng kích thước touch target cho mobile */
            min-height: 44px;
        }

        .game-button:hover {
            background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
        }

        .game-button.release {
            background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%);
        }

        .game-button.release:hover {
            background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%);
        }

        .message {
            background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(100, 181, 246, 0.1) 100%);
            padding: 15px;
            border-radius: 10px;
            margin: 15px 0;
            border-left: 4px solid #2196F3;
            font-size: 14px;
            line-height: 1.5;
            box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
        }

        .message.ai-thinking {
            background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 183, 77, 0.1) 100%);
            border-left: 4px solid #FF9800;
        }

        .setup-screen {
            background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            text-align: center;
            max-width: 500px;
            backdrop-filter: blur(10px);
            border: 3px solid rgba(76, 175, 80, 0.3);
        }

        .setup-screen h1 {
            color: #2E7D32;
            margin-bottom: 20px;
            font-size: 2.5rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
        }

        .setup-option {
            margin: 20px 0;
        }

        .setup-option label {
            display: block;
            margin-bottom: 8px;
            color: #2E7D32;
            font-weight: bold;
        }

        .setup-option select {
            padding: 12px 20px;
            border: 2px solid #4CAF50;
            border-radius: 8px;
            font-size: 16px;
            width: 100%;
            background: white;
            min-height: 44px; /* Touch target cho mobile */
        }

        /* FOOTER */
        .footer {
            background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #388E3C 100%);
            color: white;
            text-align: center;
            padding: 20px;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
            position: relative;
            z-index: 1000;
            border-top: 3px solid #4CAF50;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .footer-text {
            font-size: 1rem;
            font-weight: 500;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
        }

        .footer-link {
            color: #FFD700;
            text-decoration: none;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        .footer-link:hover {
            color: #FFF;
            text-shadow: 0 0 10px #FFD700;
        }

        /* Board colors - với hiệu ứng mới */
        .vertical-blue { background: linear-gradient(180deg, #2196F3 0%, #1976D2 100%); color: white; }
        .vertical-green { background: linear-gradient(180deg, #4CAF50 0%, #388E3C 100%); color: white; }
        .horizontal-red { background: linear-gradient(90deg, #F44336 0%, #D32F2F 100%); color: white; }
        .horizontal-yellow { background: linear-gradient(90deg, #FFC107 0%, #FF8F00 100%); color: black; }

        .rotate-from-top { transform: rotate(180deg); }
        .rotate-from-left { transform: rotate(90deg); }
        .rotate-from-right { transform: rotate(-90deg); }

        .center {
            background: conic-gradient(from 0deg, #2196F3 90deg, #FFC107 90deg 180deg, #F44336 180deg 270deg, #4CAF50 270deg);
            animation: centerSpin 10s linear infinite;
        }

        @keyframes centerSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .corner-blue { background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%); }
        .corner-yellow { background: linear-gradient(135deg, #FFC107 0%, #F57C00 100%); }
        .corner-red { background: linear-gradient(135deg, #F44336 0%, #C62828 100%); }
        .corner-green { background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%); }

        .path-light-blue { background: radial-gradient(circle, #BBDEFB 0%, #90CAF9 100%); border-radius: 50%; }
        .path-light-yellow { background: radial-gradient(circle, #FFF176 0%, #FFEB3B 100%); border-radius: 50%; }
        .path-light-red { background: radial-gradient(circle, #FFCDD2 0%, #EF9A9A 100%); border-radius: 50%; }
        .path-light-green { background: radial-gradient(circle, #C8E6C9 0%, #A5D6A7 100%); border-radius: 50%; }

        .special-green { background: radial-gradient(circle, #C8E6C9 0%, #81C784 100%); border-radius: 50%; }
        .special-yellow { background: radial-gradient(circle, #FFF176 0%, #FFD54F 100%); border-radius: 50%; }
        .special-red { background: radial-gradient(circle, #FFCDD2 0%, #E57373 100%); border-radius: 50%; }
        .special-blue { background: radial-gradient(circle, #BBDEFB 0%, #64B5F6 100%); border-radius: 50%; }

        .arrow-red { 
            background: radial-gradient(circle, #FFCDD2 0%, #E57373 100%); 
            border-radius: 50%; 
            color: #B71C1C; 
            font-size: 20px; 
            font-weight: 900;
            animation: pulse 2s infinite;
        }
        .arrow-green { 
            background: radial-gradient(circle, #C8E6C9 0%, #81C784 100%); 
            border-radius: 50%; 
            color: #1B5E20; 
            font-size: 20px; 
            font-weight: 900;
            animation: pulse 2s infinite;
        }
        .arrow-yellow { 
            background: radial-gradient(circle, #FFF176 0%, #FFD54F 100%); 
            border-radius: 50%; 
            color: #E65100; 
            font-size: 20px; 
            font-weight: 900;
            animation: pulse 2s infinite;
        }
        .arrow-blue { 
            background: radial-gradient(circle, #BBDEFB 0%, #64B5F6 100%); 
            border-radius: 50%; 
            color: #0D47A1; 
            font-size: 20px; 
            font-weight: 900;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

/* CSS cho hướng dẫn game - không toggle */
.game-guide-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.game-guide {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(76, 175, 80, 0.2);
    overflow: visible;
}

.guide-header {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 18px 18px 0 0;
}

.guide-header h2 {
    margin: 0;
    font-size: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-align: center;
}

.guide-content {
    padding: 30px;
}

.guide-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(76, 175, 80, 0.1);
}

.guide-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.guide-section h3 {
    color: #2E7D32;
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(129, 199, 132, 0.1) 100%);
    border-radius: 12px;
    border-left: 5px solid #4CAF50;
}

.guide-section h4 {
    color: #388E3C;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
    padding: 10px 15px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
}

.guide-section ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.guide-section li {
    background: rgba(76, 175, 80, 0.05);
    margin: 10px 0;
    padding: 15px 18px;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    line-height: 1.7;
    font-size: 1.05rem;
}

.guide-section strong {
    color: #2E7D32;
    font-weight: 600;
}

/* Highlight boxes */
.highlight-box {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(129, 199, 132, 0.1) 100%);
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.win-condition {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 235, 59, 0.1) 100%);
    border-color: rgba(255, 193, 7, 0.4);
}

.stable-demo {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    color: #333;
    padding: 12px 16px;
    margin: 0 8px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Path demo */
.path-demo {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(33, 150, 243, 0.05);
    border-radius: 12px;
}

.path-step {
    background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    margin: 0 8px;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Kick demo */
.kick-demo {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1rem;
    padding: 15px;
    background: rgba(244, 67, 54, 0.05);
    border-radius: 12px;
}

.piece-demo {
    padding: 10px 18px;
    border-radius: 25px;
    margin: 0 10px;
    display: inline-block;
    font-weight: 500;
}

.your-piece {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.enemy-piece {
    background: linear-gradient(135deg, #F44336 0%, #E57373 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
}

.result {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

/* Stable rules */
.stable-rules {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(33, 150, 243, 0.1);
}

.blocking-examples {
    margin: 25px 0;
}

.example {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid #2196F3;
    box-shadow: 0 3px 15px rgba(33, 150, 243, 0.1);
}

.blocking-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(33, 150, 243, 0.03);
    border-radius: 10px;
    flex-wrap: wrap;
}

.stable-free, .stable-occupied, .stable-blocked {
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.stable-free {
    background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%);
    color: #2E7D32;
    border: 2px solid #4CAF50;
}

.stable-occupied {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC02 100%);
    color: #E65100;
    border: 2px solid #FF9800;
}

.stable-blocked {
    background: linear-gradient(135deg, #FFCDD2 0%, #F44336 100%);
    color: white;
    border: 2px solid #D32F2F;
}

.stable-free:hover, .stable-occupied:hover, .stable-blocked:hover {
    transform: scale(1.05);
}

/* Strategy grid */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.strategy-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.strategy-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
}

.strategy-item h4 {
    color: #2E7D32;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.strategy-item p {
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Tips container */
.tips-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 25px 0;
}

.tip {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #4CAF50;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.tip:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

.tip-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    padding: 12px;
    border-radius: 50%;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.tip div {
    flex: 1;
    line-height: 1.6;
}

.tip strong {
    display: block;
    margin-bottom: 5px;
    color: #2E7D32;
}

        /* ============================ */
        /* RESPONSIVE MOBILE - QUAN TRỌNG */
        /* ============================ */

        /* Tablet (768px - 1024px) */
        @media (max-width: 1024px) {
            .game-container {
                flex-direction: column;
                gap: 20px;
                padding: 20px;
                max-width: 95%;
            }
            
            .game-ui {
                width: 100%;
                max-width: 600px;
                margin: 0 auto;
            }
        }

        /* Mobile Landscape (568px - 768px) */
        @media (max-width: 768px) {
            .header-content {
                padding: 0 10px;
                flex-wrap: wrap;
                gap: 10px;
            }
            
            .logo h1 {
                font-size: 1.8rem;
            }
            
            .logo-icon {
                font-size: 2rem;
            }
            
            .app-store-btn {
                padding: 8px 12px;
                font-size: 12px;
                gap: 5px;
            }
            
            .main-container {
                padding: 10px;
                align-items: flex-start;
            }
            
            .game-container {
                flex-direction: column;
                gap: 15px;
                padding: 10px;
                max-width: 100%;
                margin: 0;
                width: 100%;
                background: rgba(255,255,255,0.98);
            }
            
            /* BOARD SCROLL CONTAINER CHO MOBILE - TỐI ƯU */
            .board-container {
                width: 100%;
                height: auto;
                overflow: auto;
                border: 2px solid #4CAF50;
                border-radius: 12px;
                position: relative;
                margin: 0 auto;
                /* Smooth scrolling */
                scroll-behavior: smooth;
                /* Hide scrollbar cho iOS */
                -webkit-overflow-scrolling: touch;
            }
            
            /* Custom scrollbar cho Android/Desktop */
            .board-container::-webkit-scrollbar {
                width: 8px;
                height: 8px;
            }
            
            .board-container::-webkit-scrollbar-track {
                background: rgba(76, 175, 80, 0.1);
                border-radius: 4px;
            }
            
            .board-container::-webkit-scrollbar-thumb {
                background: rgba(76, 175, 80, 0.5);
                border-radius: 4px;
            }
            
            .board-container::-webkit-scrollbar-thumb:hover {
                background: rgba(76, 175, 80, 0.7);
            }
            
            /* Hiển thị indicator scroll cho user - TỐI ƯU */
            .board-container::before {
                content: '⬅️ Vuốt để xem ➡️';
                position: absolute;
                top: 5px;
                left: 50%;
                transform: translateX(-50%);
                background: rgba(76, 175, 80, 0.95);
                color: white;
                padding: 5px 12px;
                border-radius: 15px;
                font-size: 11px;
                font-weight: bold;
                z-index: 1000;
                opacity: 1;
                animation: fadeInOut 4s ease-in-out;
                pointer-events: none;
                box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            }
            
            @keyframes fadeInOut {
                0%, 100% { opacity: 0; }
                15%, 85% { opacity: 1; }
            }
                                    
            /* Game UI responsive tốt hơn */
            .game-ui {
                width: 100%;
                max-width: 100%;
                padding: 15px;
                margin: 0;
            }
            
            .game-ui h2 {
                font-size: 1.5rem;
                margin-bottom: 15px;
            }
            
            .player-info {
                padding: 12px;
                margin-bottom: 10px;
                font-size: 14px;
            }
            
            .dice {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }
            
            .dice-container {
                padding: 15px;
                margin: 15px 0;
            }
            
            .game-button {
                padding: 14px 18px;
                font-size: 15px;
                margin: 6px 0;
                min-height: 48px; /* Tăng touch target */
            }
            
            .message {
                padding: 12px;
                font-size: 13px;
                margin: 12px 0;
            }
        }

        /* Mobile Portrait (320px - 568px) */
        @media (max-width: 568px) {
            .header {
                padding: 10px 15px;
            }
            
            .logo h1 {
                font-size: 1.5rem;
            }
            
            .logo-icon {
                font-size: 1.8rem;
            }
            
            .app-store-btn {
                padding: 6px 10px;
                font-size: 11px;
            }
            
            .main-container {
                padding: 10px;
            }
            
            .game-container {
                padding: 10px;
                border-radius: 15px;
            }
            
            /* Board container cho màn hình nhỏ */
            .board-container {
                border: 2px solid #4CAF50;
            }
            
            .board-container::before {
                font-size: 11px;
                padding: 6px 12px;
                top: 8px;
            }
            
            /* Game UI cho màn hình nhỏ */
            .game-ui {
                padding: 15px;
            }
            
            .game-ui h2 {
                font-size: 1.3rem;
                margin-bottom: 12px;
            }
            
            .player-info {
                padding: 10px;
                margin-bottom: 8px;
                font-size: 13px;
            }
            
            .dice {
                width: 55px;
                height: 55px;
                font-size: 24px;
            }
            
            .dice-container {
                padding: 12px;
                margin: 12px 0;
            }
            
            .dice-container h3 {
                font-size: 1.1rem;
                margin-bottom: 10px;
            }
            
            .game-button {
                padding: 12px 15px;
                font-size: 14px;
                margin: 5px 0;
                min-height: 44px;
            }
            
            .message {
                padding: 10px;
                font-size: 12px;
                margin: 10px 0;
                line-height: 1.4;
            }
            
            /* Setup screen cho mobile */
            .setup-screen {
                padding: 25px 20px;
                max-width: 90%;
                margin: 10px auto;
            }
            
            .setup-screen h1 {
                font-size: 2rem;
                margin-bottom: 15px;
            }
            
            .setup-option {
                margin: 15px 0;
            }
            
            .setup-option select {
                padding: 10px 15px;
                font-size: 14px;
            }
        }

        /* Very Small Mobile (max-width: 375px) */
        @media (max-width: 375px) {
            .logo h1 {
                font-size: 1.3rem;
            }
                        
            .game-ui h2 {
                font-size: 1.2rem;
            }
            
            .dice {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
            
            .setup-screen h1 {
                font-size: 1.8rem;
            }
            
            .setup-screen {
                padding: 20px 15px;
            }
        }

        /* Landscape mode trên mobile */
        @media (max-height: 500px) and (orientation: landscape) {
            .main-container {
                padding: 10px;
            }
            
            .game-container {
                flex-direction: row;
                gap: 15px;
                padding: 10px;
                max-height: 90vh;
            }
                        
            .game-ui {
                max-height: 80vh;
                overflow-y: auto;
                width: 300px;
                flex-shrink: 0;
            }
        }

        /* Guide responsive cho mobile */
        @media (max-width: 768px) {
            .game-guide-container {
                padding: 0 15px;
                margin: 20px auto;
            }
            
            .guide-content {
                padding: 20px;
            }
            
            .guide-header {
                padding: 20px;
            }
            
            .guide-header h2 {
                font-size: 1.6rem;
            }
            
            .guide-section h3 {
                font-size: 1.4rem;
                padding: 12px 15px;
                flex-direction: column;
                text-align: center;
                gap: 8px;
            }
            
            .strategy-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .stable-demo, .path-step {
                margin: 5px 3px;
                padding: 8px 12px;
                font-size: 1rem;
            }
            
            .blocking-demo {
                gap: 5px;
                padding: 10px;
            }
            
            .stable-free, .stable-occupied, .stable-blocked {
                min-width: 40px;
                padding: 10px 8px;
                font-size: 1rem;
            }
            
            .tip {
                padding: 15px;
                gap: 15px;
                flex-direction: column;
                text-align: center;
            }
            
            .tip-icon {
                min-width: 45px;
                height: 45px;
                font-size: 1.5rem;
                align-self: center;
            }
        }

        @media (max-width: 480px) {
            .blocking-demo {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            
            .path-demo {
                padding: 10px;
            }
            
            .path-step {
                display: block;
                margin: 5px 0;
            }
            
            .guide-section li {
                padding: 12px 15px;
                font-size: 1rem;
            }
            
            .guide-section h4 {
                font-size: 1.1rem;
                padding: 8px 12px;
            }
        }

        /* Cải thiện touch targets cho mobile */
        @media (max-width: 768px) {
            /* Tăng vùng tương tác cho tất cả elements có thể click */
            .piece, .dice, .game-button, select, a {
                touch-action: manipulation;
                -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
            }
            
            /* Prevent zoom khi double tap */
            .board, .game-ui {
                touch-action: pan-x pan-y;
            }
            
            /* Smooth scrolling */
            .board-container {
                scroll-behavior: smooth;
                overscroll-behavior: contain;
            }
        }

        /* Dark mode detection cho mobile */
        @media (prefers-color-scheme: dark) and (max-width: 768px) {
            .board-container::-webkit-scrollbar-track {
                background: rgba(76, 175, 80, 0.2);
            }
            
            .board-container::-webkit-scrollbar-thumb {
                background: rgba(76, 175, 80, 0.6);
            }
        }

        /* High DPI screens */
        @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
            .piece {
                border-width: 1px; /* Thinner borders on high DPI */
            }
            
            .board {
                border-width: 3px;
            }
        }

        /* Performance optimizations cho mobile */
        @media (max-width: 768px) {
            /* Reduce animations on mobile để tiết kiệm battery */
            .piece, .dice, .game-button {
                transition-duration: 0.2s;
            }
            
            /* Optimize background animations */
            @media (prefers-reduced-motion: reduce) {
                *, *::before, *::after {
                    animation-duration: 0.01ms !important;
                    animation-iteration-count: 1 !important;
                    transition-duration: 0.01ms !important;
                }
                
                .board::before {
                    animation: none;
                }
                
                body::before {
                    animation: none;
                }
            }
        }