/* --- style.css: Wersja STABILNA (Bez skakania na telefonie) --- */

/* 1. RESET I BLOKADA SKAKANIA */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    
    /* KLUCZOWE: Blokuje "gumowanie" strony na iPhone/Android */
    overflow: hidden; 
    overscroll-behavior: none;
    position: fixed; /* Sztywne przypięcie do widoku */
}

/* 2. GŁÓWNY UKŁAD */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    /* 100dvh dopasowuje się dynamicznie do paska adresu */
    height: 100dvh; 
    position: relative;
    overflow: hidden;
}

/* 3. PASEK NAWIGACJI */
#tabs {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding: 10px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    z-index: 100;
    scrollbar-width: none;
}

#tabs::-webkit-scrollbar { display: none; }
#tabs a { text-decoration: none; display: inline-block; }

#tabs button {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

#tabs button.active {
    background-color: #007acc;
    color: white;
    border-color: #0088e3;
    font-weight: 600;
}

/* 4. OBSZAR TREŚCI (MAPA) */
#content {
    flex-grow: 1;
    background-color: #000;
    width: 100%;
    position: relative;
    overflow: hidden; /* Mapa nie wychodzi poza ramy */
}

iframe, img {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain;
}

/* 5. PRZEŁĄCZNIK GFS (WARSTWA NA WIERZCHU) */
.sub-menu {
    position: absolute; /* Pozycjonowanie względem app-container */
    
    /* Ustawienie idealnie nad podpisem autora */
    bottom: 60px; 
    
    /* Wyśrodkowanie */
    left: 50%;
    transform: translateX(-50%);
    
    z-index: 9999; /* Najwyższa warstwa */
    
    background-color: rgba(20, 20, 20, 0.9);
    padding: 6px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    
    display: flex;
    gap: 8px;
    white-space: nowrap;
    
    /* Zapobiega zaznaczaniu tekstu przy dotyku */
    user-select: none;
    -webkit-user-select: none;
}

.sub-btn {
    background-color: transparent;
    color: #ccc;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 20px;
    transition: background 0.3s;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.sub-btn.active {
    background-color: #007acc;
    color: #fff;
    font-weight: 600;
}

/* 6. PODPIS AUTORA */
#author {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 9998;
    
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* Warianty autora */
.author-light {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #000000 !important;
    border: 2px solid #007acc !important;
    font-weight: 600 !important;
}
.author-gray {
    background-color: rgba(30, 30, 30, 0.9) !important;
    color: #bbbbbb !important;
    border: 1px solid #555 !important;
}

/* 7. KOMUNIKATY */
.blocked-site {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    text-align: center;
    padding: 20px;
}
.blocked-site-icon svg { width: 64px; height: 64px; fill: #e0e0e0; margin-bottom: 20px; }
.open-btn { display: inline-block; padding: 14px 28px; background-color: #007acc; color: white; text-decoration: none; border-radius: 10px; margin-top: 20px; font-weight: 500; }