:root {
    --kolor-zarzenia: #d04a00;
    --kolor-blasku: #e58000;
    --kolor-zielony: #4CAF50; 
    --kolor-czarny: #1c1c1c; 
    --kolor-czerwony: #F44336;
    --kolor-poczatkowy: #444; 
}

body {
    margin: 0;
    padding: 0;
    background-color: #111;
    overflow: hidden;
    font-family: sans-serif;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}

/* ================= SCROLLBAR ================= */
body::-webkit-scrollbar,
.page-content::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track,
.page-content::-webkit-scrollbar-track { background: #111; }
body::-webkit-scrollbar-thumb,
.page-content::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; }
body::-webkit-scrollbar-thumb:hover,
.page-content::-webkit-scrollbar-thumb:hover { background: var(--kolor-zarzenia); }

/* ================= INTRO - SCENA KOWALA ================= */
.intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, #222 0%, #000 75%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 1s ease-out; z-index: 1000;
}

/* KONTENER SCENY */
.scena-kowala {
    position: relative;
    width: 600px;  
    height: 400px;
    margin-bottom: 20px;
    transform-origin: center center;
    transition: transform 0.3s ease;
    overflow: visible;
}

/* MŁOT - TERAZ WISI WYRAŹNIE WYŻEJ */
#mlot {
    position: absolute;
    width: 150px;
    height: auto;
    
    /* ZMIANA: Podniesiony jeszcze bardziej do góry */
    top: -120px;       
    left: 140px;
    
    /* Punkt obrotu: Rękojeść */
    transform-origin: 0% 50%; 
    
    /* Pozycja spoczynkowa: Równolegle do kowadła */
    transform: rotate(90deg); 
    
    z-index: 20;
    will-change: transform;
}

/* ANIMACJA KUCIA */
@keyframes kucie-mlot {
    0% { transform: rotate(90deg); }    /* Start: Poziomo w górze */
    30% { transform: rotate(45deg); }   /* Zamach: Jeszcze wyżej */
    60% { transform: rotate(110deg); }  /* Uderzenie: Mocno w dół (żeby sięgnął kowadła) */
    100% { transform: rotate(90deg); }  /* Powrót: Poziomo */
}

#mlot.uderza {
    animation: kucie-mlot 0.5s cubic-bezier(0.25, 0.1, 0.25, 1.0) forwards;
}

#kowadlo {
    width: 100%; 
    height: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

#punkt-uderzenia.uderzenie-efekt {
    fill: var(--kolor-blasku); 
    box-shadow: 0 0 20px var(--kolor-blasku), 0 0 40px var(--kolor-zarzenia); 
    transition: box-shadow 0.05s ease-out, fill 0.05s ease-out;
}

/* LITERY */
.litery-kontener {
    position: absolute; bottom: 65px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 15px; z-index: 25; 
}

.kuta-litera {
    font-family: 'Georgia', serif; font-size: 3em; color: var(--kolor-poczatkowy);
    opacity: 0; transition: opacity 0.5s; display: inline-block; cursor: default;
}

.kuta-litera.kuj {
    opacity: 1; 
    animation: zarzenie-intro 1.5s infinite alternate, drzacy 0.1s ease-in-out 3;
}

.kuta-litera.finalny-kolor#litera-A { color: var(--kolor-zielony); text-shadow: 0 0 5px var(--kolor-zielony); animation: drzacy 0.1s ease-in-out 1; }
.kuta-litera.finalny-kolor#litera-G { color: var(--kolor-czarny); text-shadow: none; animation: drzacy 0.1s ease-in-out 1; }
.kuta-litera.finalny-kolor#litera-H { color: var(--kolor-czerwony); text-shadow: 0 0 5px var(--kolor-czerwony); animation: drzacy 0.1s ease-in-out 1; }

@keyframes zarzenie-intro {
    0%, 100% { color: #d04a00; text-shadow: 0 0 10px #d04a00, 0 0 20px #e58000; }
    50% { color: #e58000; text-shadow: 0 0 5px #e58000; }
}

@keyframes drzacy {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

/* EFEKTY CZĄSTECZKOWE */
#iskry-kontener, #dym-kontener {
    position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none;
}
#iskry-kontener { width: 100px; height: 20px; bottom: 110px; overflow: hidden; z-index: 15; }
#dym-kontener { width: 100px; height: 20px; bottom: 115px; z-index: 20; overflow: visible; }

.iskra {
    position: absolute; width: 2px; height: 2px; background-color: var(--kolor-blasku);
    border-radius: 50%; opacity: 0; animation: fly 0.5s ease-out forwards;
}
@keyframes fly {
    0% { opacity: 1; transform: translate(0, 0) scale(1.2); }
    80% { opacity: 0.8; background-color: var(--kolor-zarzenia); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.5); }
}

.dym {
    position: absolute; width: 30px; height: 30px; background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%; opacity: 0; filter: blur(10px); animation: unoszenie-dymu 2s ease-out forwards;
}
@keyframes unoszenie-dymu {
    0% { opacity: 0.7; transform: translate(var(--dx), 0) scale(0.5); }
    100% { opacity: 0; transform: translate(var(--dx), -150px) scale(2); }
}

#napis-glowny {
    text-align: center; color: white; opacity: 1; transition: opacity 1s; cursor: pointer; z-index: 100;
}
#napis-glowny h1 { font-size: 3em; margin-bottom: 0; text-transform: uppercase; font-family: 'MedievalSharp', serif; letter-spacing: 2px; }
#napis-glowny p { font-size: 1.2em; color: #aaa; font-family: 'MedievalSharp', serif; }
.schowany { opacity: 0 !important; pointer-events: none; }

/* ------------------- MENU GŁÓWNE ------------------- */
#mainContent {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, #3a3a3a 0%, #111 75%);
    opacity: 0; transition: opacity 0.5s ease-in; display: none; z-index: 10; overflow: hidden;
}

.page-content {
    width: 100%; min-height: 100%; display: flex; flex-direction: column;
    align-items: center; box-sizing: border-box; overflow-y: auto;
    position: relative; z-index: 12;
}

/* LOGO */
.main-logo {
    height: auto; 
    width: auto; 
    max-height: 120px;
    max-width: 90%;
    object-fit: contain; 
    margin-bottom: 15px; 
    filter: drop-shadow(0 0 8px var(--kolor-blasku));
    transition: transform 0.3s;
}
.main-logo:hover { transform: scale(1.05); }

.main-title {
    font-family: 'MedievalSharp', cursive; font-size: 4rem; color: #fff; text-align: center;
    text-transform: uppercase; margin: 0 0 15px 0; letter-spacing: 5px;
    animation: zarzenie 8s ease-in-out infinite alternate;
}

.main-nav {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 15px; width: 100%; max-width: 450px;
}

.nav-item {
    font-family: 'Georgia', serif; font-size: 1.5em; color: #999; text-decoration: none;
    text-transform: uppercase; letter-spacing: 2px; font-weight: bold;
    background-color: #1a1a1a; border: 2px solid #444; border-radius: 5px;
    padding: 15px 30px; width: 100%; text-align: center; box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease-in-out;
}

.nav-item:hover {
    color: var(--kolor-blasku); text-shadow: 0 0 8px var(--kolor-blasku);
    background-color: #222; border-color: var(--kolor-blasku); transform: scale(1.03);
}

/* TŁA */
#tlo-mgly-kontener, #tlo-zar-kontener { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
#tlo-mgly-kontener { z-index: 10; } #tlo-zar-kontener { z-index: 11; }
.klab-mgly { position: absolute; background: rgba(255, 255, 255, 0.04); border-radius: 50%; filter: blur(60px); animation: animacja-mgly linear infinite; }
@keyframes animacja-mgly { 0% { transform: translateX(var(--start-x)) translateY(var(--y-pos)); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateX(var(--end-x)) translateY(var(--y-pos)); opacity: 0; } }
.weglik { position: absolute; background: var(--kolor-blasku); border-radius: 50%; width: 3px; height: 3px; box-shadow: 0 0 6px var(--kolor-blasku); animation: unoszenie-weglika linear infinite; }
@keyframes unoszenie-weglika { 0% { transform: translateY(0); opacity: 0; } 10%, 90% { opacity: 0.8; } 100% { transform: translateY(-120vh); opacity: 0; } }
@keyframes zarzenie { 0%, 100% { color: #960b01; text-shadow: 0 0 8px #5a1c01; } 50% { color: #ff9900; text-shadow: 0 0 10px #e58000; } }

/* SOCIALS */
.socials-footer { display: flex; justify-content: center; align-items: center; gap: 25px; margin-top: 20px; margin-bottom: 20px; position: relative; z-index: 20; }
.social-btn { display: flex; justify-content: center; align-items: center; width: 55px; height: 55px; background: rgba(255, 255, 255, 0.08); border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease; text-decoration: none; backdrop-filter: blur(4px); }
.social-btn svg { width: 24px; height: 24px; fill: #fff; transition: all 0.3s ease; }
.social-btn:hover { background: var(--kolor-zarzenia); border-color: var(--kolor-blasku); box-shadow: 0 0 20px rgba(208, 74, 0, 0.6); transform: translateY(-3px) scale(1.1); }

/* PARTNERZY STOPKA */
.partners-footer { 
    margin-top: auto; 
    padding-top: 20px; 
    margin-bottom: 30px; 
    width: 100%; 
    max-width: 700px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 50px; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
}
.partner-link { display: block; transition: transform 0.3s ease; line-height: 0; }
.partner-logo { 
    height: 55px; 
    width: auto; 
    opacity: 1;        
    filter: none;      
    transition: transform 0.3s ease, filter 0.3s ease; 
}
.partner-logo.agh-invert { filter: invert(1); } 
.partner-link:hover .partner-logo { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)); }
.partner-link:hover .partner-logo.agh-invert { filter: invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.5)); }

/* ================= RESPONSYWNOŚĆ ================= */

/* Tablety i małe laptopy */
@media (max-width: 992px) {
    .scena-kowala { transform: scale(0.85); }
}

/* Telefony (Pionowo) */
@media (max-width: 600px) {
    /* Skalujemy całą scenę kucia, żeby wszystko się zmieściło */
    .scena-kowala {
        transform: scale(0.5); 
        margin-bottom: -50px; 
    }
    
    #napis-glowny h1 { font-size: 1.8em; }
    .main-title { font-size: 2.5rem; }
    .nav-item { width: 90%; font-size: 1.2em; padding: 12px; }
    .partners-footer { flex-wrap: wrap; gap: 30px; }
}

/* Telefony (Poziomo) */
@media (max-height: 500px) {
    .scena-kowala { transform: scale(0.4); margin-bottom: -80px; }
    .page-content { justify-content: flex-start; padding-top: 10px; }
    .main-logo { display: none; }
}