/* Reset e estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #e0f8f8;
    color: #2a2a2a;
    line-height: 1.6;
    background-image: 
        linear-gradient(#e0f8f8 1px, transparent 1px),
        linear-gradient(90deg, #e0f8f8 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: 'Press Start 2P', cursive;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Estilo pixel art */
.pixel-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    text-shadow: 2px 2px 0 #000;
}

.pixel-border {
    border: 4px solid #000;
    box-shadow: 4px 4px 0 #000;
    image-rendering: pixelated;
}

.pixel-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 16px;
    background-color: #ff1a1a;
    color: #fff;
    border: none;
    cursor: pointer;
    text-shadow: 2px 2px 0 #000;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.1s;
}

.pixel-button:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #000;
}

.pixel-button:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

/* Header */
header {
    background-color: #ff1a1a;
    color: #ffde00;
    padding: 20px 0;
    text-align: center;
    border-bottom: 4px solid #000;
}

.logo-pixel {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    margin-bottom: 10px;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffde00;
}

.cart-info {
    background-color: #fff;
    color: #000;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    position: relative;
}

.cart-info::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #000;
    z-index: -1;
}

/* Grid de Pokémon */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pokemon-card {
    background-color: #fff;
    padding: 15px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.pokemon-card::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #000;
    z-index: -1;
}

.pokemon-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

.pokemon-sprite {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    margin: 0 auto 10px;
}

.pokemon-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2a2a2a;
}

.pokemon-price {
    color: #ff1a1a;
    font-weight: bold;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: #3b5ba7;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-shadow: 1px 1px 0 #000;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.1s;
}

.add-to-cart:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #000;
}

/* Modal do carrinho */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #000;
}

#cart-items {
    margin: 20px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px dashed #000;
}

.cart-item-sprite {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

.cart-item-name {
    flex-grow: 1;
    margin-left: 15px;
    font-size: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-actions button {
    background-color: #f5f5f5;
    border: 2px solid #000;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
}

.cart-total {
    text-align: right;
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0;
    padding-top: 10px;
    border-top: 2px dashed #000;
}

/* Footer */
footer {
    background-color: #3b5ba7;
    color: #ffde00;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 4px solid #000;
}

/* Feedback */
.feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #3b5ba7;
    color: white;
    padding: 12px 24px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-shadow: 1px 1px 0 #000;
    box-shadow: 3px 3px 0 #000;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.feedback.show {
    opacity: 1;
}

/* Responsividade */
@media (max-width: 768px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    header h1 {
        font-size: 18px;
    }
    
    .pixel-text {
        font-size: 10px;
    }
}