@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/*@import url('https://fonts.cdnfonts.com/css/minecraftia');*/
/*font-family: "Minecraft", sans-serif;*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f5132 0%, #1a7f5a 50%, #0f5132 100%);
    padding: 20px;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-container {
    max-width: 1400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.title {
    text-align: center;
    font-size: 48px;
    margin: 0 0 20px 0;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.new-game-btn {
    padding: 12px 24px;
    font-size: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.new-game-btn:hover {
    transform: scale(1.05);
}

.status-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    font-size: 14px;
}

.move-count {
    margin-bottom: 5px;
}

.status-text {
    color: #ffd700;
    font-size: 12px;
}

.board {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.top-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.stock-waste {
    display: flex;
    gap: 15px;
}

.spacer {
    width: 40px;
}

.foundations {
    display: flex;
    gap: 15px;
}

.tableau {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.pile {
    width: 90px;
    min-height: 130px;
    position: relative;
}

.card-slot, .foundation-slot {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.foundation-slot {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
}

.empty-label {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.foundation-slot .empty-label {
    color: rgba(255, 215, 0, 0.3);
}

#stock {
    cursor: pointer;
    transition: background 0.2s;
}

#stock:hover {
    background: rgba(0, 0, 0, 0.4);
}

.card {
    width: 90px;
    height: 130px;
    background: #fff;
    border-radius: 10px;
    border: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    padding: 8px;
    position: absolute;
    left: 0;
    cursor: grab;
    transition: transform 0.1s;
    user-select: none;
}

.card:hover {
    transform: translateY(-5px);
}

.card.back {
    background-image: url('ozadje.png');
    background-size: cover;
    background-position: center;

}

.card.back:hover {
    transform: none;
}

.card .rank {
    font-size: 20px;
    font-weight: bold;
}

.card .suit {
    font-size: 28px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card .top-right {
    font-size: 16px;
    position: absolute;
    bottom: 8px;
    right: 8px;
}

.red {
    color: #e74c3c;
}

.black {
    color: #2c3e50;
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    display: none;
    z-index: 1000;
    border: 4px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

.victory-title {
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
    font-family: 'Press Start 2P', cursive;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.final-moves {
    color: #fff;
    font-size: 16px;
    margin-bottom: 30px;
    font-family: 'Press Start 2P', cursive;
}

.play-again-btn {
    padding: 15px 40px;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: transform 0.2s;
}

.play-again-btn:hover {
    transform: scale(1.05);
}

@media (max-width: 1200px) {
    .title {
        font-size: 32px;
    }
    
    .game-container {
        padding: 20px;
    }
    
    .card, .pile {
        width: 70px;
    }
    
    .card {
        height: 100px;
    }
}