.mini-card {
    width: var(--mini-card-width, 35px);
    height: var(--mini-card-height, 50px);
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.mini-card.trump-card-full {
    width: clamp(35px, 5vw, 45px);
    height: clamp(50px, 7vw, 65px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.mini-card-value {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 0.6rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 3px;
    border-radius: 2px;
}

.mini-card.hearts, .mini-card.diamonds {
    color: var(--crimson);
}

.mini-card.clubs, .mini-card.spades {
    color: #1a1a2e;
}

.table-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.table-card {
    width: var(--card-width);
    height: var(--card-height);
    min-width: 40px;
    min-height: 55px;
    background: white;
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.table-card.attack-card {
    z-index: 1;
}

.table-card.defense-card {
    position: absolute;
    top: clamp(12px, 2.5vw, 20px);
    left: clamp(10px, 2vw, 15px);
    z-index: 2;
    transform: rotate(15deg);
}

.table-card.undefended {
    animation: pulse-red 2s infinite;
}

.table-card.clickable {
    cursor: pointer;
}

/* Hover effects only for devices with hover capability (not touch) */
@media (hover: hover) and (pointer: fine) {
    .table-card.clickable:hover {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    }
}

/* Touch devices: show feedback on active instead */
@media (hover: none) {
    .table-card.clickable:active {
        transform: scale(0.98);
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    }
}

.table-card.target-selected {
    box-shadow: 0 0 25px var(--gold);
    border: 3px solid var(--gold);
    animation: none; /* Pulsieren stoppen */
    transform: scale(1.05);
}

.hand-card {
    width: var(--card-width);
    height: var(--card-height);
    /* Ensure minimum touch target area */
    min-width: 44px;
    min-height: 60px;
    background: white;
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition-fast);
    margin: 0 clamp(-12px, -1.5vw, -8px);
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Touch improvements */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Hover effects only for devices with hover capability (not touch) */
@media (hover: hover) and (pointer: fine) {
    .hand-card:hover {
        transform: translateY(-15px);
        box-shadow: var(--card-hover-shadow);
        z-index: 10;
    }
}

/* Touch devices: no hover lift, only selected state */
@media (hover: none) {
    .hand-card:active {
        transform: translateY(-8px);
        z-index: 10;
    }
}

.hand-card.selected {
    transform: translateY(-25px);
    box-shadow: 0 0 20px var(--gold);
    border: 2px solid var(--gold);
    z-index: 10;
}

.hand-card.playable {
    cursor: pointer;
}

.hand-card:not(.playable) {
    cursor: not-allowed;
}

.hand-card:not(.playable)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--card-border-radius);
    pointer-events: none;
}

/* Card Symbols (fallback when images don't load) */
.card-symbol {
    font-size: 2rem;
}

.card-value {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 0.9rem;
    font-weight: bold;
}

.card-value-bottom {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    transform: rotate(180deg);
}

.hearts .card-symbol, .hearts .card-value, .hearts .card-value-bottom,
.diamonds .card-symbol, .diamonds .card-value, .diamonds .card-value-bottom {
    color: var(--crimson);
}

.clubs .card-symbol, .clubs .card-value, .clubs .card-value-bottom,
.spades .card-symbol, .spades .card-value, .spades .card-value-bottom {
    color: #1a1a2e;
}
