body {
    background: #e7ecf4 url('https://512pixels.net/downloads/macos-wallpapers/10-12.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif;
}

/* Ventana principal */
.window-main {
    position: absolute;
    z-index: 5;
    background: rgba(255, 255, 255, 0.67);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.8px solid rgba(232, 232, 232, 0.24);
    border-radius: 10px;
    margin: 40px auto 0 auto;
    width: 990px;
    min-width: 340px;
    min-height: 160px; /* <--- IMPORTANTE */
    height: auto; /* <--- IMPORTANTE */
    max-width: 98vw;
    max-height: 90vh; /* <--- LIMITE para que no se salga de la pantalla */
    box-shadow: 0 5px 28px #bbcbe960;
    overflow: auto; /* O 'hidden' si no quieres scroll */
    resize: none; /* Interact.js gestiona el resize, no el nativo */
    left: 60px; /* Para evitar que quede centrada cada vez */
    top: 60px;
    transition: box-shadow 0.15s, border-radius 0.13s, transform 0.18s cubic-bezier(.37, 1.26, .64, 1);
}


.window-main.maximized {
    position: absolute;
    scroll-behavior: smooth;
    border-radius: 0 !important;
    box-shadow: none !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 98vh !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
    transform: none !important;
}

.titlebar-main {
    position: relative;
    background: rgba(255, 255, 255, 0.86);
    height: 30px;
    min-height: 37px; /* <-- Asegura que no se colapse nunca */
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1.5px solid #dde5f2;
    z-index: 2;
}


.titlebar-main {
    background: rgba(255, 255, 255, 0.86);
    color: #002563;
    font-size: 0.9rem;
    height: 20px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1.5px solid #dde5f2;
}

.title-main i {
    font-size: 0.9rem;
    color: #00215a;
}

.window-controls {
    margin-left: auto;
    display: flex;
    gap: 7px;
}


.window-btn {
    width: 15px;
    height: 15px;
    padding: 0;
    border-radius: 50%;
    border: none;
    margin: 0 2px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 2px #9994;
    transition: filter .18s, box-shadow .14s;
    cursor: pointer;
    position: relative;
    outline: none;
}

.window-btn.btn-clos {
    background: #ff3836;
}

.window-btn.btn-min {
    background: #ffbe2f;
}

.window-btn.btn-max {
    background: #29c940;
}

.window-btn:active {
    filter: brightness(82%);
}



.content-main {
    padding: 23px 28px 16px 28px;
}

@media (max-width: 1000px) {
    .window-main {
        width: 98vw;
        min-width: 95vw;
    }
}

.window-main.maximized {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* WIDGET DEL CLIMA */
.weather-drag-widget-vertical {
    position: fixed;
    top: 100px;
    right: 40px;
    z-index: 1; /* Siempre detrás de .window-main */
    background: rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 12px 10px 10px 10px;
    min-width: 230px;   /* MÁS ANCHO */
    max-width: 260px;   /* MÁS ANCHO */
    font-size: 12px;
    font-family: 'Segoe UI', Arial, sans-serif;
    border: 1.2px solid rgba(205, 216, 230, 0.07);
    backdrop-filter: blur(11px) saturate(120%);
    -webkit-backdrop-filter: blur(11px) saturate(120%);
    user-select: none;
    cursor: grab;
    transition: box-shadow 0.18s;
    pointer-events: auto;
    overflow: visible;
}

.weather-drag-widget-vertical:active {
    cursor: grabbing;
    box-shadow: 0 6px 24px #ffffff;
}

.weather-forecast-hours-vertical {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    overflow: visible; /* Nunca muestra scrolls */
    max-height: none;
}

.weather-hour-v {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    background: rgba(255, 253, 253, 0.32);
    backdrop-filter: blur(11px) saturate(120%);
    -webkit-backdrop-filter: blur(11px) saturate(120%);
    border-radius: 7px;
    padding: 3px 6px 2.5px 6px;
    min-width: 150px;
    font-size: 11.5px;
    box-shadow: 0 1px 3px #b2c6e508;
}

.weather-hour-v .icon { font-size: 1.08em; color: #2c2c2c; width: 22px; text-align: center;}
.weather-hour-v .hour { font-size: 0.95em; color: #001c3c; font-weight: 500; min-width: 34px;}
.weather-hour-v .temp { font-weight: 600; color: #0071bf; min-width: 30px;}
.weather-hour-v .desc { font-size: .92em; color: #3d3c3c; flex: 1 1 auto; white-space:nowrap;}



/* scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  -webkit-border-radius: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
   border: 10px solid transparent;
}

::-webkit-scrollbar-thumb:window-inactive {
  background: rgba(255, 255, 255, 0.3);
}