@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --locked-color: #f43f5e;
    --unlocked-color: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: rgba(15, 23, 42, 0.5); /* Półprzezroczyste tło, by wideo było widoczne */
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Tło z delikatnymi gradientami dla głębi */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
}
body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
}

/* Wideo w tle */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -100; /* Za wszystkim */
    pointer-events: none;
}

/* Nagłówek */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.logo span {
    color: var(--unlocked-color);
}

.stats {
    display: flex;
    gap: 2rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--unlocked-color);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls button {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}
.controls button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Główny układ */
main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    padding: 2rem 3rem;
    flex: 1;
}

/* Lewa strona - Mapa */
.map-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#map-container {
    width: 100%;
    max-width: 700px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* Tooltip */
#tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--panel-border);
    padding: 1rem;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 50;
    transform: translate(-50%, -120%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    min-width: 150px;
}

#tooltip h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

#tooltip p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
#tooltip .status {
    margin-top: 0.5rem;
    font-weight: 600;
}
.status.locked { color: var(--locked-color); }
.status.unlocked { color: var(--unlocked-color); }

/* Prawa strona - Sidebar */
.sidebar {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Ukrywanie scrollbara */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

#sidebar-empty {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50%;
    transform: translateY(-50%);
}

#sidebar-content {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}
#sidebar-content.active {
    display: flex;
}

.region-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}
.region-header p {
    color: var(--text-muted);
}

/* Sekcja zakupu */
.purchase-section {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}
.purchase-section h3 {
    color: var(--locked-color);
    margin-bottom: 0.5rem;
}
.purchase-section p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.btn-buy {
    background: var(--locked-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: var(--font-family);
}
.btn-buy:hover {
    background: #e11d48;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.5);
}

/* Karty atrakcji */
.attractions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.attraction-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.attraction-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-image {
    width: 100%;
    height: 150px;
    position: relative;
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.locked-blur {
    filter: blur(10px) grayscale(50%);
}

.card-content {
    padding: 1rem;
}
.card-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.card-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.card-hint {
    font-size: 0.85rem;
    color: var(--unlocked-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    display: none;
}
.unlocked-view .card-hint {
    display: block;
}

/* Modal BLIK */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.blik-modal {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.blik-logo {
    display: inline-block;
    background: #fff;
    color: #000;
    font-weight: 800;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.blik-modal p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.blik-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.blik-inputs input {
    width: 40px;
    height: 50px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}
.blik-inputs input:focus {
    outline: none;
    border-color: var(--unlocked-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-confirm {
    background: var(--unlocked-color);
    color: #0f172a;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: var(--font-family);
}
.btn-confirm:hover {
    background: #059669;
}
.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border: none;
    margin-top: 1rem;
    cursor: pointer;
    font-family: var(--font-family);
}
.btn-cancel:hover {
    color: white;
}

/* Loader */
.loader {
    display: none;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--unlocked-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Responsywność */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
    .sidebar {
        height: auto;
    }
}
