
/* ===============================
   DELDORA - WORLD BOARD GLASS CSS
================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    color: #f3fff9;
    background: #030507;
    overflow: hidden;
}

/* ===============================
   stili e sfondi del mondo in tempo reale
 image/bg/sun1.png == sole durante estate aututnno  e primavera
    image/bg/sun2.png == sole notturno durente estate aututnno  e primavera
    image/bg/sun3.png == sole durante inverno
    image/bg/sun4.png == sole notturno durante inverno

    *****************************/
body {
    background-image: url('/image/bg/sun1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}
/* VIDEO SFONDO */
#ambient-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    filter: saturate(1.15) contrast(1.08) brightness(.82);
}

/* LIVELLO SCURO TRASPARENTE */
.dark-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 14%, rgba(115,255,197,.18), transparent 34%),
        radial-gradient(circle at 85% 85%, rgba(90,120,255,.15), transparent 38%),
        linear-gradient(90deg, rgba(0,0,0,.20), rgba(0,0,0,.72));
}

/* LOADING */
#loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    

    background:        
        radial-gradient(circle at center, rgba(115,255,197,.14), transparent 36%),
        rgba(3,5,7,.92);
    background-size: cover;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: opacity .8s ease;
}

.spinner {
    width: 74px;
    height: 74px;
    margin: 0 auto 22px;
    border-radius: 50%;
    border: 6px solid rgba(115,255,197,.12);
    border-top-color: #73ffc5;
    border-right-color: rgba(115,255,197,.55);
    box-shadow:
        0 0 30px rgba(115,255,197,.35),
        inset 0 0 18px rgba(115,255,197,.10);
    animation: spin .85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: #bffff0;
    text-shadow: 0 0 22px rgba(115,255,197,.75);
}
.loading-text img{
    border:30px solid rgba(0, 0, 0, 1);
    border-radius: 12px;}

/* BOARD PRINCIPALE */
#world-board {
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 1280px;
    max-width: calc(100vw - 300px);

    overflow-y: auto;
    overflow-x: hidden;

    padding: 28px;
    color: #fff;

    border-radius: 30px;
    border: 1px solid rgba(180,255,230,.20);

    background:
        linear-gradient(180deg, rgba(8,16,18,.46), rgba(2,4,6,.34)),
        rgba(0,0,0,.18);

    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);

    box-shadow:
        0 28px 90px rgba(0,0,0,.62),
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 45px rgba(115,255,197,.045);
}

#world-board::-webkit-scrollbar {
    width: 10px;
}

#world-board::-webkit-scrollbar-track {
    background: rgba(255,255,255,.035);
    border-radius: 20px;
}

#world-board::-webkit-scrollbar-thumb {
    background: rgba(115,255,197,.32);
    border-radius: 20px;
}

#world-board::-webkit-scrollbar-thumb:hover {
    background: rgba(115,255,197,.55);
}

#world-board.refreshing {
    animation: boardPulse .9s ease;
}

@keyframes boardPulse {
    0% {
        box-shadow: 0 28px 90px rgba(0,0,0,.62);
    }

    50% {
        box-shadow:
            0 28px 90px rgba(0,0,0,.62),
            0 0 55px rgba(115,255,197,.22);
    }

    100% {
        box-shadow: 0 28px 90px rgba(0,0,0,.62);
    }
}

/* TITOLI */
.board-title {
    font-size: 36px;
    font-weight: bold;
    color: #eafff7;
    margin-bottom: 8px;
    letter-spacing: .4px;
    text-shadow:
        0 0 22px rgba(115,255,197,.42),
        0 2px 18px rgba(0,0,0,.75);
}

.board-subtitle {
    color: rgba(255,255,255,.67);
    margin-bottom: 26px;
    font-size: 15px;
}

/* GRIGLIA DASHBOARD */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* CARD TRASPARENTI */
.card {
    position: relative;
    overflow: hidden;

    padding: 22px;
    border-radius: 24px;

    background:
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
        rgba(0,0,0,.10);

    border: 1px solid rgba(255,255,255,.105);

    backdrop-filter: blur(14px) saturate(1.18);
    -webkit-backdrop-filter: blur(14px) saturate(1.18);

    box-shadow:
        0 16px 38px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 28px rgba(115,255,197,.025);

    transition:
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.10),
            rgba(255,255,255,0) 38%
        );
    opacity: .42;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(115,255,197,.34);
    background:
        linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025)),
        rgba(0,0,0,.13);
    box-shadow:
        0 20px 45px rgba(0,0,0,.42),
        0 0 28px rgba(115,255,197,.08),
        inset 0 1px 0 rgba(255,255,255,.10);
}

.card-wide {
    grid-column: 1 / -1;
}

.card h3 {
    position: relative;
    z-index: 1;
    font-size: 19px;
    margin-bottom: 15px;
    color: #d8fff2;
    text-shadow: 0 0 16px rgba(115,255,197,.30);
}

/* STATISTICHE */
.mini-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 13px;
}

.stat {
    padding: 15px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
        rgba(0,0,0,.16);
    border: 1px solid rgba(255,255,255,.075);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stat span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.58);
    margin-bottom: 7px;
}

.stat strong {
    font-size: 26px;
    color: #fff;
    text-shadow: 0 0 14px rgba(255,255,255,.14);
}

/* COLORI */
.green {
    color: #7dffb1 !important;
}

.red {
    color: #ff7777 !important;
}

.yellow {
    color: #ffe08a !important;
}

.blue {
    color: #88d7ff !important;
}

/* SEARCH */
.table-search {
    position: relative;
    z-index: 1;

    width: 100%;
    margin-bottom: 13px;
    padding: 13px 15px;

    border-radius: 16px;
    outline: none;

    border: 1px solid rgba(115,255,197,.22);
    background: rgba(0,0,0,.16);

    color: #ecfff8;
    font-size: 14px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: .22s ease;
}

.table-search::placeholder {
    color: rgba(255,255,255,.42);
}

.table-search:focus {
    border-color: rgba(115,255,197,.70);
    background: rgba(0,0,0,.24);
    box-shadow:
        0 0 0 3px rgba(115,255,197,.07),
        0 0 22px rgba(115,255,197,.13);
}

/* TABELLE */
.table-wrap {
    position: relative;
    z-index: 1;

    max-height: 340px;
    overflow: auto;

    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.075);

    background: rgba(0,0,0,.10);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.table-wrap.tall {
    max-height: 460px;
}

.table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
    background: rgba(255,255,255,.035);
}

.table-wrap::-webkit-scrollbar-thumb {
    background: rgba(115,255,197,.28);
    border-radius: 20px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(115,255,197,.50);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;

    padding: 13px 12px;

    background: rgba(5,12,14,.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    color: #cffff0;
    text-align: left;

    border-bottom: 1px solid rgba(115,255,197,.18);
    text-shadow: 0 0 12px rgba(115,255,197,.20);
}

td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    color: rgba(255,255,255,.84);
    vertical-align: top;
}

tr {
    transition: background .18s ease;
}

tr:hover td {
    background: rgba(115,255,197,.055);
}

td.num {
    text-align: right;
    white-space: nowrap;
    font-weight: bold;
}

small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.43);
    font-size: 12px;
}

/* TEMPO DEL MONDO */
#world-time-box {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 20;

    width: 250px;
    padding: 17px;

    border-radius: 20px;

    background:
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)),
        rgba(0,0,0,.20);

    border: 1px solid rgba(115,255,197,.28);

    color: #e8fff7;
    line-height: 1.6;

    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);

    box-shadow:
        0 16px 40px rgba(0,0,0,.48),
        inset 0 1px 0 rgba(255,255,255,.08);
}

#world-time-box strong {
    color: #73ffc5;
    text-shadow: 0 0 15px rgba(115,255,197,.45);
}

/* STATUS WEBSOCKET */
#world-engine-status {
    position: fixed;
    left: 15px;
    bottom: 15px;
    z-index: 99999;

    opacity: .16;
    min-width: 260px;

    padding: 12px 16px;
    border-radius: 16px;

    background:
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)),
        rgba(0,0,0,.22);

    color: #caffca;
    border: 1px solid rgba(120,255,120,.42);

    font-size: 13.5px;
    line-height: 1.5;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow:
        0 10px 28px rgba(0,0,0,.45),
        inset 0 1px 0 rgba(255,255,255,.08);

    transition: opacity .25s ease, transform .25s ease;
}

#world-engine-status:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* FOOTER */
.footer {
    margin-top: 24px;
    padding-bottom: 8px;
    color: rgba(255,255,255,.48);
    text-align: right;
    font-size: 13px;
}

/* SELEZIONE TESTO */
::selection {
    background: rgba(115,255,197,.30);
    color: #fff;
}
#biome-climate {
    margin-top: 15px;
    padding: 12px;

    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;

    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;

    backdrop-filter: blur(6px);
}

/* Scrollbar */
#biome-climate::-webkit-scrollbar {
    width: 8px;
}

#biome-climate::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

#biome-climate::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}

#biome-climate::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.45);
}

.clima-item {
    margin-bottom: 12px;
    padding: 10px;

    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border-left: 4px solid #66d9ff;

    line-height: 1.6;
}

.clima-item strong {
    color: #fff;
    font-size: 15px;
}
/* ===============================
   effetto pioggia o neve
================================ */
#weather-overlay{
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:999999;
    overflow:hidden;
}

/* ===========================
   PIOGGIA
=========================== */

.rain-drop{
    position:absolute;
    width:2px;
    height:25px;

    background:linear-gradient(
        rgba(255,255,255,0),
        rgba(170,220,255,.9)
    );

    animation:rainFall linear infinite;
}

@keyframes rainFall{

    from{
        transform:translateY(-50px) rotate(12deg);
    }

    to{
        transform:translateY(calc(100vh + 100px)) rotate(12deg);
    }

}

/* ===========================
   NEVE
=========================== */

.snowflake{

    position:absolute;

    color:white;

    user-select:none;

    animation-name:snowFall;
    animation-timing-function:linear;
    animation-iteration-count:infinite;

    text-shadow:
        0 0 8px rgba(255,255,255,.8);

}

@keyframes snowFall{

    from{
        transform:
            translateY(-50px)
            translateX(0px)
            rotate(0deg);
    }

    to{

        transform:
            translateY(calc(100vh + 60px))
            translateX(80px)
            rotate(360deg);

    }

}
/* RESPONSIVE */
@media (max-width: 1100px) {
    body {
        overflow: auto;
    }

    #world-board {
        position: relative;
        inset: auto;
        width: auto;
        max-width: none;
        margin: 285px 14px 20px;
        padding: 22px;
    }

    #world-time-box {
        width: calc(100% - 28px);
        left: 14px;
        right: 14px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    #world-board {
        margin-top: 300px;
        padding: 16px;
        border-radius: 20px;
    }

    .board-title {
        font-size: 26px;
    }

    .board-subtitle {
        font-size: 14px;
    }

    .card {
        padding: 16px;
        border-radius: 19px;
    }

    .mini-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 13px;
    }

    th,
    td {
        padding: 10px;
    }
}