/* Alap beállítások és Halloween téma */
:root {
    --primary-color: #ff6600;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --green: #28a745;
    --orange: #fd7e14;
    --blue: #007bff;
    --purple: #6f42c1;
    --grey: #6c757d;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.6;
}

/* Belépő oldal */
.login-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; padding: 20px; }
.login-container h1 { color: var(--primary-color); }
.login-container input { width: 80%; max-width: 300px; padding: 12px; margin-bottom: 15px; border-radius: 5px; border: 1px solid var(--grey); }
.login-container button { background-color: var(--primary-color); color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
.login-container .error { color: #ff4d4d; height: 20px; }

/* Térkép oldal */
.main-container { max-width: 1000px; margin: 0 auto; }
header { padding: 15px; background-color: rgba(0,0,0,0.5); text-align: center; }
header h1 { margin: 0 0 15px 0; color: var(--primary-color); }
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.filters select, .filters button { padding: 10px; border-radius: 5px; border: 1px solid var(--primary-color); background: var(--dark-color); color: var(--light-color); }
.filters button.active { background: var(--primary-color); color: white; }

#map { height: 40vh; width: 100%; z-index: 1; }
@media (min-width: 768px) { #map { height: 500px; } }

/* "Mutassátok magatokat" Banner */
#trickster-banner { background-color: var(--purple); text-align: center; padding: 20px; margin: 15px; border-radius: 8px; display: none; }
#trickster-banner h2 { margin-top: 0; color: white; }
#trickster-banner button { background-color: var(--light-color); color: var(--purple); font-weight: bold; padding: 10px 15px; border: none; border-radius: 5px; cursor: pointer; }
#trickster-banner .small-text { margin-top: 10px; font-size: 0.9em; }
#trickster-banner .small-text a { color: #eee; font-weight: bold; }

/* Házak listája */
#house-list-container, #trickster-gallery-container { padding: 15px; }
#house-list-container h2, #trickster-gallery-container h2 { text-align: center; color: var(--primary-color); }

.house-card { background-color: #2b2b2b; border-left: 5px solid var(--grey); margin-bottom: 10px; border-radius: 5px; cursor: pointer; transition: transform 0.2s; display: flex; align-items: center; gap: 15px; padding: 10px; }
.house-card:hover { transform: scale(1.02); }

/* JAVÍTÁS: Thumbnail méretezése */
.card-thumbnail, .card-thumbnail-placeholder { width: 60px; height: 60px; flex-shrink: 0; border-radius: 8px; }
.card-thumbnail { background-size: cover; background-position: center; }
.card-thumbnail-placeholder { background-color: #444; display: flex; align-items: center; justify-content: center; font-size: 2em; }
.card-content { flex-grow: 1; position: relative; } /* Ez kell, hogy a badge pozicionálása működjön */
.card-content h3 { margin: 0 0 5px 0; }
.card-content .address { font-weight: bold; color: var(--primary-color); }
.card-content .details { font-size: 0.9em; color: #ccc; margin: 0; }
.card-checkins { font-size: 0.8em; color: var(--grey); margin-top: 5px; }

/* Csínytevők Galéria */
#trickster-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; }
.trickster-card { text-align: center; }
/* JAVÍTÁS: Képek méretezése és vágása */
.trickster-card img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Ez biztosítja a négyzetes arányt */
    object-fit: cover; /* Ez vágja a képet, nem torzítja */
    border-radius: 8px;
    border: 2px solid #444;
}
.trickster-card p { margin-top: 5px; font-size: 0.9em; font-weight: bold; }

/* Modal ablakok */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #2b2b2b; padding: 20px; border-radius: 8px; width: 90%; max-width: 600px; max-height: 85vh; overflow-y: auto; position: relative; }
.modal-content .close-btn { position: absolute; top: 10px; right: 15px; font-size: 28px; background: none; border: none; color: white; cursor: pointer; }
#modal-body h2 { color: var(--primary-color); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.modal-actions button, .modal-actions a { text-decoration: none; display: inline-block; text-align: center; padding: 12px; border-radius: 5px; border: none; cursor: pointer; color: white; font-size: 16px; flex-grow: 1; font-weight: bold; }

/* JAVÍTÁS: Gombok színeinek beállítása */
.checkin-btn { background-color: var(--green); color: white; }
.upload-house-photo-btn { background-color: var(--purple); color: white; }
.route-btn { background-color: var(--blue); color: white; }
.report-btn { background-color: #dc3545; color: white; }
.checkin-btn:disabled { background-color: var(--grey); cursor: not-allowed; }

/* Ház belső galériájának képei */
.house-photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 10px; }
.house-photo-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; }

/* Státusz színek és badge-ek */
.house-card[data-status="NYITVA"] { border-left-color: var(--green); }
.house-card[data-status="Hamarosan zár!"] { border-left-color: var(--orange); }
.house-card[data-status="Hamarosan nyit!"] { border-left-color: var(--blue); }
.house-card[data-status="ZÁRVA"] { border-left-color: var(--grey); }

.status-badge { position: absolute; top: 0px; right: 0px; padding: 4px 8px; border-radius: 10px; font-size: 0.8em; font-weight: bold; color: white; }
.status-badge.open { background-color: var(--green); }
.status-badge.closing-soon { background-color: var(--orange); }
.status-badge.opening-soon { background-color: var(--blue); }
.status-badge.closed { background-color: var(--grey); }

/* Betöltő animáció */
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; display: flex; flex-direction:column; align-items: center; justify-content: center; color: var(--primary-color); }
.spinner { border: 4px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top: 4px solid var(--primary-color); width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#event-progress-container {
    margin: 15px auto 0 auto;
    max-width: 500px;
    text-align: center;
}
#event-timer-text {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.progress-bar-background {
    width: 100%;
    background-color: #444;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    border: 1px solid #666;
}
#progress-bar-fill {
    width: 0%; /* JS fogja állítani */
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 8px;
    transition: width 1s linear;
}

/* 2. Új idő-információ a ház kártyáján */
.card-time-info {
    font-size: 0.8em;
    font-weight: bold;
    color: #eee;
    margin-top: 5px;
    background-color: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}
.card-time-info.soon {
    color: var(--primary-color);
}

/* 3. Képnézegető (Lightbox) */
#lightbox-modal {
    background: rgba(0,0,0,0.9);
    cursor: pointer;
}
#lightbox-modal .close-btn {
    position: fixed; /* fix pozíció a képernyőn */
    top: 20px;
    right: 30px;
    z-index: 1060;
}
#lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}