/* ==========================================================================
   Munchkin Web Game — Authentic Physical Card Style
   ========================================================================== */

.game-card {
    width: 162px;
    height: 242px;
    background: #fae49d; /* Warm parchment yellow */
    border-radius: 16px;
    border: 6px solid #3c1e14; /* Dark chocolate brown outer border */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(180, 130, 60, 0.15);
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast), border-color var(--transition-fast);
    transform-origin: center bottom;
    flex-shrink: 0;
    overflow: hidden;
    user-select: none;
    z-index: 1;
    color: #2b140a;
}

.game-card:hover {
    transform: translateY(-38px) scale(1.18) rotate(0deg) !important;
    z-index: 9999 !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(245, 158, 11, 0.6);
    border-color: #522718;
}

/* Door vs Treasure Variations */
.game-card.deck-door,
.game-card.card-door,
.game-card.card-monster,
.game-card.card-curse {
    background: #f8edd1; /* Creamy Door parchment */
}

.game-card.deck-treasure,
.game-card.card-treasure,
.game-card.card-item,
.game-card.card-potion {
    background: #fae49d; /* Golden Treasure parchment */
}

/* Authentic Race & Class Cards (Crisp Ivory Face + Title on top + Text middle + Art bottom) */
.game-card.card-race,
.game-card.card-race_card,
.game-card.card-class,
.game-card.card-class_card,
.game-card.card-identity {
    background: #ffffff !important;
    border-color: #1a0802 !important;
    color: #110502 !important;
}

.game-card.card-identity .identity-header {
    min-height: auto;
    margin-bottom: 2px;
    padding-top: 2px;
}

.game-card.card-identity .identity-title {
    font-family: var(--font-medieval);
    font-size: 15px;
    font-weight: 900;
    color: #110502;
    letter-spacing: 0.6px;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.15;
}

.game-card.card-identity .identity-body {
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.28;
    color: #110502;
    text-align: left;
    padding: 0 4px;
    margin-bottom: 2px;
    flex: none;
    max-height: 72px;
    overflow: hidden;
    letter-spacing: 0.1px;
}

.game-card.card-identity .identity-artwork {
    flex: 1;
    height: auto;
    min-height: 65px;
    margin: 2px 0 0;
}

.game-card.card-identity .identity-artwork .card-artwork-img {
    max-height: 65px;
}

.game-card.card-identity .identity-footer {
    border-top: none;
    padding-top: 0;
    margin-top: auto;
}

.card-identity-tag {
    font-family: var(--font-medieval);
    font-size: 11.5px;
    font-style: italic;
    font-weight: 700;
    color: #1a0802;
}

/* Card Header */
.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1px;
    min-height: 38px;
    margin-bottom: 2px;
}

.card-top-tag {
    font-family: var(--font-medieval);
    font-size: 13.5px;
    font-weight: 700;
    color: #3c1e14;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.15;
}

.card-sub-tag {
    font-family: var(--font-medieval);
    font-size: 11px;
    font-style: italic;
    color: #5c2c1a;
    line-height: 1.15;
    margin-bottom: 1px;
}

.card-title {
    font-family: var(--font-medieval);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    color: #1a0802;
    letter-spacing: 0.4px;
    text-align: center;
    word-break: break-word;
    text-transform: uppercase;
}

/* Card Image / Icon Area */
.card-artwork {
    height: 72px;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 2px 0;
    position: relative;
    overflow: hidden;
    padding: 2px;
    flex-shrink: 0;
}

.card-artwork-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform var(--transition-bounce);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

.game-card:hover .card-artwork-img {
    transform: scale(1.08);
}

.card-fallback-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

/* Card Description / Body */
.card-body {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    color: #1a0802;
    line-height: 1.32;
    letter-spacing: 0.1px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    padding: 0 4px;
}

/* Card Footer */
.card-footer {
    font-family: var(--font-medieval);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #2c1409;
    margin-top: auto;
    padding-top: 3px;
    border-top: 1px solid rgba(60, 30, 20, 0.25);
    letter-spacing: 0.3px;
    flex-shrink: 0;
    width: 100%;
}

.card-slot {
    font-size: 10.5px;
    font-weight: 700;
    color: #3c1e14;
    white-space: nowrap;
    text-align: left;
    justify-self: start;
}

.card-crest {
    font-size: 12px;
    color: #3c1e14;
    opacity: 0.65;
    text-align: center;
    justify-self: center;
    line-height: 1;
    display: block;
}

.card-gold, .card-identity-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #3c1e14;
    white-space: nowrap;
    text-align: right;
    justify-self: end;
}

/* ==========================================================================
   Card Detail Modal
   ========================================================================== */
.card-detail-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fae49d;
    color: #2b140a;
    border: 5px solid #3c1e14;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.card-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(60, 30, 20, 0.2);
    padding-bottom: 8px;
}

.card-detail-title {
    font-family: var(--font-medieval);
    font-size: 20px;
    font-weight: 900;
    color: #1a0802;
    text-transform: uppercase;
}

.card-detail-stats {
    display: flex;
    gap: 10px;
}

.card-detail-description {
    color: #2d160b;
    font-size: 15px;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.35);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(60, 30, 20, 0.2);
}

.card-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* Item Suitability Badge — shown on equippable items with class/race requirements */
.card-suitability {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    margin: 2px 0 0;
    border-radius: 4px;
    line-height: 1.3;
}

.card-suitable {
    background: rgba(34, 120, 50, 0.2);
    color: #166534;
    border: 1px solid rgba(34, 120, 50, 0.35);
}

.card-unsuitable {
    background: rgba(185, 28, 28, 0.15);
    color: #991b1b;
    border: 1px solid rgba(185, 28, 28, 0.3);
}
