/* style.css - Osnovni layout in 3D karte */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2c3e50; 
    color: #fff;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Zaklenemo ekran, da ni drsenja! */
    height: 100vh;
    width: 100vw;
}

#game-board {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Nova struktura vrstic za popolno centriranje */
.table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 220px; /* Fiksna višina, da se karte ne stisnejo */
}

.side-panel {
    flex: 1; /* Zavzame enak prostor na levi in desni */
    min-width: 150px;
}

.right-align {
    text-align: right;
}

/* Kontejner za roke igralcev */
.player-hand, .bot-hand {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    height: 100%;
}

/* SREDINA MIZE */
.center-arena {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 20px;
}

.deck-area {
    display: flex;
    gap: 30px;
}

.focus-card {
    background: #f39c12;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    width: 140px;
    height: 190px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.battle-zone {
    display: flex;
    gap: 50px;
    height: 210px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* GUMBI IN REZULTATI */
.score-board {
    display: inline-block;
    background: rgba(0,0,0,0.5);
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
}

.btn-small {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
}

#next-round-btn {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* KARTICE IN ANIMACIJE */
.card-wrapper {
    width: 140px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
    /* POPRAVEK PREKRIVANJA: Namesto gap uporabimo margin */
    margin-left: -40px; 
}

/* Prva karta ne sme imeti zamika v levo */
.card-wrapper:first-child {
    margin-left: 0;
}

.card-wrapper:hover {
    transform: translateY(-20px);
    z-index: 10;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.card-wrapper.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Za Safari */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border: 2px solid #ecf0f1;
    box-sizing: border-box;
}

.card-back {
    background: #27ae60;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 10px, transparent 10px, transparent 20px);
}

.card-front {
    background-color: #fdf5e6;
    color: #333;
    transform: rotateY(180deg);
    padding: 12px;
    display: flex;
    flex-direction: column;
}

/* STANJE V ARENI */
.card-wrapper.in-battle {
    transform: scale(1.1);
    margin-left: 0; /* V areni nimajo zamika */
    z-index: 50;
    cursor: default;
}
.card-wrapper.in-battle:hover {
    transform: scale(1.1);
}

.card-image {
    width: 100%;
    height: 90px; /* Fiksna višina za ilustracijo */
    margin-bottom: 5px;
    border-radius: 4px;
    overflow: hidden;
    background: #bdc3c7; /* Rezervna barva, če se slika nalaga */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Poskrbi, da slika zapolni prostor, ne da bi se raztegnila */
    display: block;
}
