/* style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: Arial, sans-serif;
    height: 100vh;      /* Szigorúan kitölti a képernyőt */
    overflow: hidden;   /* Megakadályozza a görgetést */
    touch-action: none; /* Letiltja a böngésző alapértelmezett gesztusait (pl. pull-to-refresh) */
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-wrapper {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #34495e;
    padding: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* Kijelző panel (Név és pontok) */
.score-board {
    text-align: center;
    background: #e74c3c;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.player-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.scores-info {
    font-size: 16px;
    line-height: 1.4;
}

.scores-info small {
    color: #ffd700;
    font-weight: bold;
}

/* Play/Pause gomb konténere */
.control-middle {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.btn-action {
    background-color: #f1c40f;
    color: #2c3e50;
    border: none;
    border-radius: 5px;
    padding: 5px 30px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0px #d4ac0d;
}
.btn-action:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* A játéktér konténere - ez húzódik össze/tágul ki dinamikusan */
.canvas-container {
    flex: 1;            /* Kitölti a maradék helyet a gombok és a pontszám között */
    min-height: 0;      /* Szükséges a flex zsugorodáshoz */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

#tetris-canvas {
    background-color: #111;
    border: 3px solid #bdc3c7;
    border-radius: 4px;
    height: 100%;       /* Kitölti a flex konténert magasságban */
    width: auto;        /* Szélesség automatikus az arányok megtartásához */
    aspect-ratio: 1 / 2;
    image-rendering: pixelated; /* Éles kontúrok maradnak */
}

/* Vezérlőgombok sora */
.controls-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.game-btn {
    flex: 1;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    height: 65px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 0px #2980b9;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-btn:active {
    transform: translateY(5px);
    box-shadow: none;
    background-color: #2980b9;
}

/* Statisztika link hivatkozás */
.links-row {
    text-align: center;
    padding-bottom: 5px;
}

.btn-link {
    color: #ecf0f1;
    text-decoration: underline;
    font-size: 14px;
}