*
{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body
{
    background: radial-gradient(circle at center, #1e272e, #0f1419);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    max-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    overflow: hidden;
}

header
{
    text-align: center;
}

h1
{
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ff3838;
    text-shadow: 0 0 16px rgba(255, 56, 56, 0.6);
}

.subtitle
{
    margin-top: 0.5rem;
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}

.subtitle.brutal
{
    background: #ffffff;
    color: #0f1419;
    border: 3px solid #ff3838;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
    transform: skew(-6deg);
}

.counter
{
    font-size: 0.9rem;
    color: #a4b0be;
    margin-top: 0.4rem;
    margin-bottom: 1rem;
}

.game-area
{
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.card-stage
{
    width: 210px;
    height: 300px;
    position: relative;
}

.card
{
    width: 100%;
    height: 100%;
    border-radius: 14px;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Deck / Dos de carte */
.deck-card
{
    background: repeating-linear-gradient(
        45deg,
        #2f3542,
        #2f3542 12px,
        #1e272e 12px,
        #1e272e 24px
    );
    border: 3px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck-card::before, .deck-card::after
{
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: #1e272e;
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: -1;
}

.deck-card::before
{
    top: 4px;
    left: 4px;
}

.deck-card::after
{
    top: 8px;
    left: 8px;
    z-index: -2;
}

.deck-card:active:not(.disabled)
{
    transform: scale(0.96);
}

.deck-card.disabled
{
    opacity: 0.3;
    cursor: not-allowed;
}

.deck-label
{
    background: rgba(0, 0, 0, 0.65);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

/* Carte révélée */
.drawn-card
{
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    z-index: 5;
}

.drawn-card.visible
{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.drawn-card.red
{
    color: #ff3838;
}

.drawn-card.black
{
    color: #2f3542;
}

.corner
{
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
}

.corner.bottom
{
    transform: rotate(180deg);
}

.center-suit
{
    font-size: 4.5rem;
    align-self: center;
}

/* Boutons */
.controls
{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 260px;
}

button
{
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

button:active
{
    transform: scale(0.97);
}

.btn-discard
{
    background: #ff3838;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 56, 56, 0.4);
}

.btn-discard:disabled
{
    background: #4b6584;
    color: #778ca3;
    box-shadow: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-reset
{
    background: transparent;
    border: 2px solid #4b6584;
    color: #a4b0be;
    font-size: 0.85rem;
    padding: 10px;
}
