/* ============================================
   OH MY SHELF - Stile della pagina
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

#sottotitolo {
    color: #7f8c8d;
}

.barra-controlli {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

#ricerca {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#ricerca:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #2980b9;
}

/* SCAFFALI */
.scaffale {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.scaffale-intestazione {
    background: #8b5a2b;
    color: white;
    padding: 15px 20px;
    font-size: 20px;
    font-weight: bold;
}

.scaffale-contenuto {
    padding: 20px;
    background: linear-gradient(180deg, #d4a574 0%, #8b5a2b 100%);
    min-height: 100px;
}

.griglia-giochi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* CARD GIOCO */
.gioco {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.gioco:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gioco img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gioco-info {
    padding: 10px;
}

.gioco-nome {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: #2c3e50;
    line-height: 1.3;
}

.gioco-anno {
    font-size: 12px;
    color: #7f8c8d;
}

/* FINESTRA DETTAGLI */
.finestra {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.finestra.nascosta {
    display: none;
}

.finestra-contenuto {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.chiudi {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.chiudi:hover {
    color: #333;
}

.messaggio {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 18px;
}