
/* ==================================================
   ZÁKLAD
   ================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

/* Společný základ pro obě vrstvy pozadí */
#bg-base, #bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Spodní vrstva (drží stávající obrázek nebo tmavý přechod jako základ) */
#bg-base {
    z-index: -1002;
    background: radial-gradient(
        circle at 50% 40%,
        #172033 0%,
        #0b101c 55%,
        #060912 100%
    );
}

/* Horní vrstva (přes ni se plynule prolne nový obrázek) */
#bg-overlay {
    z-index: -1001;
    opacity: 0; /* Výchozí stav je neviditelný */
    /* Plynulá animace průhlednosti na 5 sekund */
    transition: opacity 5000ms ease-in-out; 
}



/* ==================================================
   HLAVNÍ KONTEJNER
   ================================================== */

.container {

    max-width: 1500px;

    margin: auto;

    padding: 20px 25px 35px;
}


/* ==================================================
   HLAVIČKA
   ================================================== */

.header {

    text-align: center;

    margin-bottom: 10px;
}

.header h1 {

    margin: 0;

    font-size: 34px;

    letter-spacing: 1px;
}

.sun {

    color: #ffd21c;

    font-size: 35px;
}

.updated {

    margin-top: 7px;

    color: #B0E0FF;

    font-size: 14px;
}

.cas {

color: #B0E0FF;

    font-size: 20px;

}


/* ==================================================
   HLAVNÍ SCHÉMA
   ================================================== */

.energy-system {

    position: relative;

    height: 520px;
    min-height: 520px;

    margin-top: 5px;
    overflow: hidden;
}


/* ==================================================
   KABELY
   ================================================== */

.energy-svg {

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 520px;

    pointer-events: none;

    overflow: hidden;
    clip-path: inset(20px 0 0 20px);
}


/* základní kabel */

.cable {

    fill: none;

    stroke-width: 6;

    stroke-linecap: round;

    filter:
        drop-shadow(0 0 5px currentColor)
        drop-shadow(0 0 10px currentColor);
}


/* PV */

.cable-pv {

    stroke: #19a9ff;
}


/* AC */

.cable-ac {

    stroke: #ffbf1a;
}


/* baterie */

.cable-battery {

    stroke: #4cff55;
}


/* ==================================================
   ELEKTRONY
   ================================================== */

.electron-pv {

    fill: #7dd7ff;

    filter:
        drop-shadow(0 0 6px #19a9ff)
        drop-shadow(0 0 12px #19a9ff);
}

.electron-ac {

    fill: #fff2a0;

    filter:
        drop-shadow(0 0 6px #ffbf1a)
        drop-shadow(0 0 12px #ffbf1a);
}

.electron-battery {

    fill: #a4ff9d;

    filter:
        drop-shadow(0 0 6px #4cff55)
        drop-shadow(0 0 12px #4cff55);
}


/* ==================================================
   PANELY
   ================================================== */

.panel {

    position: absolute;

    left: 20px;

    width: 260px;

    padding: 18px 20px;

    background: linear-gradient(
        145deg,
        rgba(29, 41, 59, 0.75),
        rgba(17, 25, 39, 0.75)
    );

    border: 1px solid #168ed0;

    border-radius: 14px;

    box-shadow:
        0 0 15px rgba(0,160,255,.15),
        inset 0 0 20px rgba(0,100,200,.04);
}

.panel1 {
    top: 25px;
}

.panel2 {
    top: 205px;
}

.panel h2 {

    margin: 0 0 10px;

    color: #51c4ff;

    font-size: 21px;
}

.panel .power {

    font-size: 31px;

    font-weight: bold;

    color: #6bcaff;

    margin-bottom: 8px;
}

.details {

    color: #bdc8d8;

    line-height: 1.7;

    font-size: 15px;
}







/* ==================================================
   MĚNIČ
   ================================================== */

.inverter {

    position: absolute;

    left: 50%;

    top: 60px;

    transform: translateX(-50%);

    width: 230px;

    height: 300px;

    border-radius: 25px;

    background:
        linear-gradient(
            145deg,
            #d8e1e7,
            #87949e 45%,
            #394550 100%
        );

    border: 2px solid #aebbc4;

    box-shadow:
        0 0 25px rgba(0,130,255,.25),
        inset 0 0 20px rgba(255,255,255,.15);

    color: #101820;

    text-align: center;

    z-index: 5;
}

.inverter-screen {

    width: 145px;

    height: 90px;

    margin: 35px auto 18px;

    background:
        linear-gradient(
            #0c4570,
            #061b2d
        );

    border: 4px solid #252f37;

    border-radius: 8px;

    box-shadow:
        inset 0 0 15px #008cff;

    color: #7ddcff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 12px;
}

     .inverter-data {

    margin-top: 10px;

    text-align: center;
}

.inverter-data .inverter-power {

    font-size: 28px;

    font-weight: bold;

    color: #111820;
}

.inverter-load {

    margin-top: 7px;

    font-size: 17px;

    font-weight: bold;

    color: #202b34;
}

.inverter-details {

    margin-top: 10px;

    font-size: 15px;

    color: #26333d;
}


/* ==================================================
   BATERIE
   ================================================== */

.battery {

    position: absolute;

    right: 45px;
    top: 320px;

    width: 280px;
    min-height: 180px;

    padding: 15px 20px;

    display: flex;
    align-items: center;

    box-sizing: border-box;

    border-radius: 15px;

    background: linear-gradient(
        145deg,
        rgba(29, 41, 59, 0.75),
        rgba(17, 25, 39, 0.75)
    );

    border: 1px solid #4cff55;

    box-shadow:
        0 0 18px rgba(60,255,80,.12);

    z-index: 5;
}

.battery-left {

    width: 60px;

    display: flex;

    justify-content: center;

    align-items: center;
}


.battery-data {

    flex: 1;

    text-align: center;

    margin-left: 0;
}

.battery-nadpis {
    
       font-size: 22px;
        color: #a9f5a9;
    font-weight: bold; 
}

.battery-voltage {

    font-size: 26px;

    font-weight: bold;
}


.battery-current {

    margin-top: 8px;

    font-size: 18px;

    font-weight: bold;
}

.battery-icon {

    position: relative;

    width: 60px;
    height: 130px;

    border: 3px solid #ddd;

    border-radius: 7px;

    box-sizing: border-box;

    overflow: hidden;

    background: #10151c;
}


.battery-icon::before {

    content: "";

    position: absolute;

    top: -7px;
    left: 12px;

    width: 18px;
    height: 5px;

    background: #ddd;

    border-radius: 2px;
}


.battery-level {

    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;

    height: 50%;

    background: #42e85a;

    transition: height 0.8s ease;
}


.battery-percent {

    position: absolute;

    left: 0;
    right: 0;

    top: 50%;

    transform: translateY(-50%);

    text-align: center;

    font-size: 20px;

    font-weight: bold;

    color: white;

    text-shadow:
        0 2px 4px black;
}

.battery-icon:before {

    content: "";

    position: absolute;

    top: -13px;

    left: 22px;

    width: 27px;

    height: 9px;

    background: #4cff55;

    border-radius: 3px 3px 0 0;
}

.battery h2 {

    margin: 8px 0 3px;

    color: #5cff63;
}

.battery-value {

    font-size: 27px;

    font-weight: bold;
}

.battery-current {

    color: #a9f5a9;

    margin-top: 5px;
}


/* ==================================================
   SPOTŘEBA / DŮM
   ================================================== */

.house {

    position: absolute;

    right: 45px;

    top: 25px;

    width: 280px;

    padding: 20px;

    border-radius: 15px;

    background: linear-gradient(
        145deg,
        rgba(29, 41, 59, 0.75),
        rgba(17, 25, 39, 0.75)
    );

    border: 1px solid #c18c15;

    box-shadow:
        0 0 18px rgba(255,190,20,.12);

    z-index: 5;
}

.house-icon {

    font-size: 58px;

    text-align: center;

    margin-bottom: 5px;
}

.house h2 {

    text-align: center;

    margin: 0 0 10px;

    color: #ffc832;

    font-size: 22px;
}

.house .power {

    text-align: center;

    font-size: 32px;

    font-weight: bold;

    color: #ffd05b;

    margin-bottom: 10px;
}


/* ==================================================
   INFORMACE VEDLE VÝSTUPU
   ================================================== */

.output-info {

    position: absolute;

    right: 305px;

    top: 120px;

    color: #ffd65b;

    text-shadow: 0 0 8px #ffae00;

    background: rgba(5,12,24,.75);

    padding: 7px 10px;

    border-radius: 7px;

    line-height: 1.5;

    font-size: 14px;
}


/* ==================================================
   FV CELKEM
   ================================================== */

.total {

    position: absolute;

    left: 25px;

    bottom: 15px;

    width: 260px;

    padding: 16px;

    text-align: center;

    border-radius: 13px;

    background: linear-gradient(
        145deg,
        rgba(29, 41, 59, 0.75),
        rgba(17, 25, 39, 0.75)
    );

    border: 1px solid #199ff0;

    box-shadow:
        0 0 18px rgba(0,160,255,.15);
}

.total-title {

    color: #53c7ff;

    font-size: 18px;
}

.total-power {

    font-size: 34px;

    font-weight: bold;

    color: #6bcaff;

    margin-top: 5px;
}


/* ==================================================
   SPODNÍ INFORMACE
   ================================================== */



.info-card {

    background: #131c2b;

    border: 1px solid #29364a;

    border-radius: 12px;

    padding: 15px;

    text-align: center;
}

.info-card-title {

    color: #9baac0;

    font-size: 14px;

    margin-bottom: 5px;
}

.info-card-value {

    font-size: 21px;

    font-weight: bold;
}

#bg-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Stojí nad oběma obrázky (-1001 a -1002), ale pod textem (0+) */
    z-index: -1000; 

    /* MODERNÍ FILTR: Ztmaví pozadí pod sebou na 65 % původního jasu */
    backdrop-filter: brightness(95%);
    -webkit-backdrop-filter: brightness(95%); /* Podpora pro Safari */

    /* ZÁLOŽNÍ ŘEŠENÍ: Pokud prohlížeč neumí backdrop-filter, 
       použije se klasická černá s 35% průhledností */
    background-color: rgba(0, 0, 0, 0.35); 
}



/* ==================================================
   MOBIL
   ================================================== */

@media (max-width: 950px) and (max-height: 800px) {

    html,
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .container {
        width: 1300px;
        max-width: none;
        margin: 0;
        padding: 20px 25px 35px;
        zoom: 36%;
    }

    .house,
    .battery {
        right: 90px;
    }

}

