/* =========================================================================
   gameManager/MTG/player.css — the game view for YOUR side of the table:
   cards, hand area, battlefield zones, drop zone, deck (draw/view), the
   in-game deck choice dialog, and card overlay controls (move/tap/plus).
   The opponent's mirrored zones live in opponent.css.
   The battlefield zone position rules used to be inline styles in
   index.php — values are unchanged, only moved here.
   ========================================================================= */

.card-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15vh;

    z-index: 2;
}

.card {
    position: absolute;
    width: 180px;  /* Keeping the same width */
    height: 248px; /* Adjusted from 210px to match 488x680 ratio */
    background: white;
    border: 2px solid #333;
    border-radius: 10px;
    transform-origin: top center;
    transition: transform 0.3s ease;
    cursor: pointer;
    padding: 0; /* Remove any internal spacing */
    overflow: hidden; /* Ensure image stays within border radius */

    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.drop-zone {
    position: fixed;
    width: 50vh;  /* 50% of viewport height for perfect circle */
    height: 50vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #fffcfc;
    border-radius: 50%;

    transition: border-color 0.3s ease;
    z-index: 0;
}

.exile-zone {
    position: fixed;
    height: 122px;
    top: 50%;
    left: 6px;
    border: 3px solid #fffcfc;
    transition: border-color 0.3s ease;
    z-index: 0;
    min-width: 100px;
    opacity: .1;
}

.drop-zone.active {
    border-color: #ffd0d0;  /* Dark red when card is over it */
}

/* ---------- Player battlefield zones (moved from index.php inline styles) ---------- */
#creatureArea { position: fixed; top: 50%; left: 0; right: 0; height: 18vh; z-index: 1; }
#artifactArea { position: fixed; bottom: 16vh; left: 0; height: 20vh; z-index: 1; }
#planeswalkerArea { position: fixed; bottom: 31vh; left: 0; height: 20vh; z-index: 1; }
#enchantArea { position: fixed; bottom: 16vh; right: 0; height: 20vh; z-index: 1; }
#battleArea { position: fixed; bottom: 31vh; right: 0; height: 20vh; z-index: 1; }
#landArea { position: fixed; bottom: 3vh; left: 25%; right: 25%; height: 18vh; z-index: 0; }

#cardAreaHidden { background: #f0f0f0; z-index: 0; }

/* ---------- Deck (draw/view) area ---------- */
#drawCardArea { height: 100%; float: right; margin-right: 5px; position: relative; }
#drawCardArea > img { max-height: 90%; margin-top: 8%; }

/* ---------- Graveyard ---------- */
#graveyardAreaContainer { position: fixed; bottom: 1vh; left: 6px; z-index: 2; height: 14vh; }
#graveyardArea { height: 100%; float: left; }

/* ---------- Exile ---------- */
#exileArea {
    height: 100%;
    float: left;
    width: 100%;
    text-align: center;
    color: white;
    background-color: #a4a4a4;
    line-height: 122px;
}

/* ---------- In-game deck choice dialog (Top / Add & Shuffle / Bottom) ---------- */
.deck-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.deck-dialog {
    background: white;
    width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    padding: 24px;
}

/* NOTE: in the old css/ files .dialog-title was defined here too, but
   account.css always loaded later and won — the base.css copy (24px,
   centered) is that winning rule, so it is not repeated here.
   .button-container below intentionally stays UNSCOPED: it stacks with the
   base.css margin-top rule exactly like the two old files stacked. */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- Draw / View buttons ---------- */
.drawACard, .viewDeck {
    height: 4vh;
    line-height: 4vh;
    padding: 0;
    opacity: 0.1;
    /* Add transition property for smooth opacity changes */
    transition: opacity 0.3s ease;
    cursor: pointer;
}

/* ---------- Card overlay controls (move / tap / plus) ---------- */
.move-control {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-icon {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.move-icon:hover {
    background-color: rgba(255, 255, 255, 1);
}

.tap-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 200px;
}

.tap-button {
    background-color: unset;
    border: 0;
    padding: 10px;
}

.top-controls {
    position: absolute;
    bottom: -16px;
    left: -12px;
    width: 100%;
    height: 28px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 10;
}

.plus-button {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.plus-button:hover {
    background-color: rgba(255, 255, 255, 1);
}
