
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #fff;
    background: url('img/wood-table.jpg') center/cover no-repeat fixed;
}


.top-bar {
    width: 100%;
    background: rgba(0,0,0,0.25);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

.logo {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.controls button {
    margin-left: 10px;
    padding: 8px 16px;
    background: #ffffff22;
    border: 1px solid #ffffff55;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.controls button:hover {
    background: #ffffff44;
}


#hud {
    text-align: center;
    margin-top: 10px;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}


.layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    padding: 20px;
    box-sizing: border-box;
}


.mahjonggame {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.mahjongcanvas {
    background: radial-gradient(circle, rgba(0,0,0,0.15), rgba(0,0,0,0.35)),
                url('img/wood-table.jpg') center/cover;
    padding: 20px;
    border-radius: 14px;
    box-shadow:
        0 0 40px rgba(0,0,0,0.6),
        inset 0 0 40px rgba(0,0,0,0.4);
}


.tileContainer {
    position: relative;
    width: min(1600px, 95vw);
    height: min(1000px, 70vh);
}


.tile {
    position: absolute;
    width: 100px;
    height: 150px;
    background: linear-gradient(to bottom, #f2f2f2, #e6e6e6);
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.15s ease, outline 0.15s ease;
    box-shadow:
        8px 10px 12px rgba(0,0,0,0.55),
        inset 0 0 6px rgba(0,0,0,0.25),
        inset 0 4px 8px rgba(255,255,255,0.6);
}


.tile::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.7),
        rgba(255,255,255,0.2)
    );
}


.tile img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    position: absolute;
    top: 10%;
    left: 10%;
}


.tile.free:hover {
    outline: 3px solid rgba(255,255,255,0.7);
}


.tile.selected {
    outline: 4px solid #ffe066;
}


#hud {
    color:yellow !important;
}



.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}


.ad-spot {
    width: 200px;
}

.ad-box {
    width: 100%;
    height: 300px;
    background: #eee;
    border: 2px solid #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
}

.page-scale-wrapper {
    width: 1600px;      
    margin: 0 auto;
    transform-origin: top center;
}


@media (max-width: 1600px) {
    .page-scale-wrapper {
        transform: scale(calc(100vw / 1600));
    }

    body {
        overflow-x: hidden;
        overflow-y: hidden;
    }
}
