/* ═══════════════════════════════════════════════════════════════════════════
   qDante Homelab — Glance Custom Theme (Modern Animated v2)
   glance.qdante.ro
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Root / Variables ──────────────────────────────────────────────── */
:root {
    --qdante-bg: hsl(228, 12%, 8%);
    --qdante-card: hsl(228, 10%, 12%);
    --qdante-card-hover: hsl(228, 10%, 15%);
    --qdante-accent: hsl(35, 85%, 55%);
    --qdante-accent-2: hsl(45, 90%, 60%);
    --qdante-accent-dim: hsla(35, 85%, 55%, 0.15);
    --qdante-border: hsl(228, 8%, 20%);
    --qdante-text: hsl(40, 10%, 88%);
    --qdante-text-dim: hsl(40, 5%, 60%);
    --qdante-green: hsl(145, 70%, 50%);
    --qdante-red: hsl(0, 75%, 60%);
}

/* ─── Smooth scroll ─────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ─── Fundal swamp temple ────────────────────────────────────────────── */
body {
    background: var(--qdante-bg) !important;
}

.body-content {
    position: relative;
}

.body-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsla(228, 12%, 6%, 0.55);
    pointer-events: none;
    z-index: 0;
}

.body-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/bg.jpg') center/cover fixed no-repeat;
    z-index: -1;
}

/* ─── Widget cards — glassmorphism modern ────────────────────────────── */
.widget {
    animation: widgetIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    border-radius: 14px !important;
    position: relative;
    overflow: hidden;
}

.widget-content:not(.widget-content-frameless),
.widget-content-frame {
    background: hsla(228, 10%, 12%, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid hsla(228, 8%, 20%, 0.6) !important;
    border-radius: 14px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.03);
}

/* Staggered delay */
.widget:nth-child(1) { animation-delay: 0.03s; }
.widget:nth-child(2) { animation-delay: 0.06s; }
.widget:nth-child(3) { animation-delay: 0.09s; }
.widget:nth-child(4) { animation-delay: 0.12s; }
.widget:nth-child(5) { animation-delay: 0.15s; }
.widget:nth-child(6) { animation-delay: 0.18s; }
.widget:nth-child(7) { animation-delay: 0.21s; }
.widget:nth-child(8) { animation-delay: 0.24s; }
.widget:nth-child(9) { animation-delay: 0.27s; }
.widget:nth-child(10) { animation-delay: 0.30s; }
.widget:nth-child(11) { animation-delay: 0.33s; }
.widget:nth-child(12) { animation-delay: 0.36s; }

@keyframes widgetIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Card hover — neon glow + glass intensificat ───────────────────── */
.widget:hover .widget-content:not(.widget-content-frameless),
.widget:hover .widget-content-frame {
    background: hsla(228, 10%, 15%, 0.6) !important;
    border-color: hsla(35, 85%, 55%, 0.5) !important;
    box-shadow:
        0 8px 32px hsla(35, 85%, 55%, 0.2),
        0 0 80px hsla(35, 85%, 55%, 0.08),
        inset 0 1px 0 hsla(35, 85%, 55%, 0.06);
    transform: translateY(-2px) scale(1.005);
}

/* ─── Border glow la hover pe card ──────────────────────────────────── */
.widget::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        hsla(35, 85%, 55%, 0) 20%,
        hsla(35, 85%, 55%, 0.6) 50%,
        hsla(35, 85%, 55%, 0) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.widget:hover::before {
    opacity: 1;
    animation: borderSweep 2s ease-in-out infinite;
}

@keyframes borderSweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
    background: linear-gradient(180deg,
        hsla(228, 12%, 5%, 0.7) 0%,
        hsla(228, 12%, 10%, 0.7) 100%
    ) !important;
    border-right: 1px solid hsla(228, 8%, 20%, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sidebar .nav-item {
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.sidebar .nav-item.active {
    background: hsla(35, 85%, 55%, 0.12) !important;
    border-left: 3px solid var(--qdante-accent);
    color: var(--qdante-accent) !important;
    box-shadow: inset 0 0 20px hsla(35, 85%, 55%, 0.05);
}

.sidebar .nav-item.active::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: var(--qdante-accent);
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 hsla(35, 85%, 55%, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px hsla(35, 85%, 55%, 0);
    }
}

.sidebar .nav-item:hover:not(.active) {
    background: hsla(228, 8%, 16%, 0.8) !important;
    transform: translateX(4px);
}

/* ─── Logo cu gradient animat ───────────────────────────────────────── */
.logo-text {
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg,
        var(--qdante-accent) 0%,
        var(--qdante-accent-2) 25%,
        hsl(30, 85%, 60%) 50%,
        var(--qdante-accent-2) 75%,
        var(--qdante-accent) 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoFlow 5s ease-in-out infinite;
    filter: drop-shadow(0 0 12px hsla(35, 85%, 55%, 0.15));
}

@keyframes logoFlow {
    0%   { background-position: 0% 50%; filter: drop-shadow(0 0 12px hsla(35, 85%, 55%, 0.15)); }
    50%  { background-position: 100% 50%; filter: drop-shadow(0 0 20px hsla(35, 85%, 55%, 0.25)); }
    100% { background-position: 0% 50%; filter: drop-shadow(0 0 12px hsla(35, 85%, 55%, 0.15)); }
}

/* ─── Titluri widget ─────────────────────────────────────────────────── */
.widget-header {
    border-bottom: 1px solid hsla(228, 8%, 20%, 0.5) !important;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

/* ─── Linkuri ─────────────────────────────────────────────────────────── */
a {
    transition: color 0.2s ease;
    position: relative;
}

a.color-highlight {
    color: var(--qdante-accent) !important;
}

a.color-highlight:hover {
    color: hsl(35, 85%, 70%) !important;
    text-shadow: 0 0 20px hsla(35, 85%, 55%, 0.2);
}

/* ─── Clock widget ───────────────────────────────────────────────────── */
.widget-type-clock .clock-time {
    font-weight: 200;
    letter-spacing: 4px;
    font-size: 2.8rem !important;
    background: linear-gradient(135deg,
        var(--qdante-accent) 0%,
        hsl(35, 85%, 70%) 40%,
        hsl(45, 90%, 65%) 70%,
        var(--qdante-accent) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: clockGlow 6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px hsla(35, 85%, 55%, 0.1));
}

@keyframes clockGlow {
    0%   { background-position: 0% 50%; filter: drop-shadow(0 0 20px hsla(35, 85%, 55%, 0.1)); }
    50%  { background-position: 100% 50%; filter: drop-shadow(0 0 30px hsla(35, 85%, 55%, 0.2)); }
    100% { background-position: 0% 50%; filter: drop-shadow(0 0 20px hsla(35, 85%, 55%, 0.1)); }
}

.widget-type-clock .clock-date {
    color: var(--qdante-text-dim) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ─── Weather widget ─────────────────────────────────────────────────── */
.widget-type-weather .weather-icon {
    animation: weatherFloat 4s ease-in-out infinite;
}

@keyframes weatherFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-4px) rotate(2deg); }
}

.widget-type-weather .weather-temp {
    transition: all 0.3s ease;
}

.widget-type-weather:hover .weather-temp {
    color: var(--qdante-accent);
}

/* ─── Monitor widget ─────────────────────────────────────────────────── */
.widget-type-monitor .monitor-site-status.ok {
    color: var(--qdante-green) !important;
}

.widget-type-monitor .monitor-site-status.fail {
    color: var(--qdante-red) !important;
    animation: failShake 0.5s ease-in-out;
}

@keyframes failShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

.widget-type-monitor .monitor-site-status.loading {
    animation: pulseGlow 1.2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50%      { opacity: 0.5; filter: brightness(1.4); }
}

/* ─── Server Stats ───────────────────────────────────────────────────── */
.widget-type-server-stats .progress-bar {
    border-radius: 6px !important;
    height: 8px !important;
    overflow: hidden;
    background: hsla(228, 8%, 20%, 0.5) !important;
}

.widget-type-server-stats .progress-fill {
    background: linear-gradient(90deg,
        var(--qdante-accent) 0%,
        hsl(35, 85%, 65%) 50%,
        var(--qdante-accent-2) 100%
    ) !important;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border-radius: 6px;
}

.widget-type-server-stats .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        hsla(0, 0%, 100%, 0.2) 50%,
        transparent 100%
    );
    animation: progressShine 2.5s ease-in-out infinite;
}

@keyframes progressShine {
    0%   { left: -30%; }
    100% { left: 130%; }
}

.widget-type-server-stats .server-stat-value {
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ─── Markets widget ─────────────────────────────────────────────────── */
.widget-type-markets .market-change.positive {
    color: var(--qdante-green) !important;
}

.widget-type-markets .market-change.negative {
    color: var(--qdante-red) !important;
}

.widget-type-markets .market-value {
    transition: all 0.3s ease;
}

.widget-type-markets .market-item:hover .market-value {
    transform: scale(1.02);
}

/* ─── Bookmarks ──────────────────────────────────────────────────────── */
.widget-type-bookmarks .bookmark-group-title {
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.65rem;
    opacity: 0.7;
}

.widget-type-bookmarks a {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 3px 6px;
    border-radius: 6px;
    position: relative;
}

.widget-type-bookmarks a::after {
    content: '→';
    position: absolute;
    right: 6px;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.widget-type-bookmarks a:hover {
    background: hsla(35, 85%, 55%, 0.08);
    transform: translateX(6px);
    padding-right: 24px;
}

.widget-type-bookmarks a:hover::after {
    opacity: 1;
    right: 6px;
    color: var(--qdante-accent);
}

/* ─── Butoane SHOW MORE ──────────────────────────────────────────────── */
.collapsible-container .collapsible-toggle {
    color: var(--qdante-accent) !important;
    border: 1px solid hsla(35, 85%, 55%, 0.2) !important;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.collapsible-container .collapsible-toggle:hover {
    background: hsla(35, 85%, 55%, 0.1) !important;
    transform: scale(1.03);
    box-shadow: 0 4px 12px hsla(35, 85%, 55%, 0.15);
}

/* Ripple effect on click */
.collapsible-container .collapsible-toggle:active {
    transform: scale(0.97);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: hsla(228, 8%, 25%, 0.5);
    border-radius: 3px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(35, 85%, 55%, 0.3);
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.page-footer {
    border-top: 1px solid hsla(228, 8%, 20%, 0.4) !important;
    padding-top: 14px !important;
    margin-top: 28px !important;
    color: var(--qdante-text-dim) !important;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ─── Login page ───── (folosește același fundal swamp ca dashboard-ul) ─ */

.login-page .login-box {
    background: hsla(228, 10%, 12%, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid hsla(228, 8%, 20%, 0.5) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    animation: loginReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    padding: 32px !important;
}

@keyframes loginReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-page input[type="text"],
.login-page input[type="password"] {
    background: hsla(228, 10%, 16%, 0.8) !important;
    border: 1px solid hsla(228, 8%, 20%, 0.6) !important;
    border-radius: 10px !important;
    color: var(--qdante-text) !important;
    transition: all 0.3s ease;
    padding: 12px 14px !important;
    font-size: 0.95rem;
}

.login-page input[type="text"]:focus,
.login-page input[type="password"]:focus {
    border-color: hsla(35, 85%, 55%, 0.5) !important;
    box-shadow: 0 0 0 4px hsla(35, 85%, 55%, 0.08);
    outline: none;
    transform: scale(1.005);
    background: hsla(228, 10%, 18%, 0.9) !important;
}

.login-page button[type="submit"] {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

.login-page button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px hsla(35, 85%, 55%, 0.25);
}

.login-page button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
}

/* ─── Butoane generale ───────────────────────────────────────────────── */
button, .btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
}

button:active, .btn:active {
    transform: scale(0.97);
}

/* ─── List items hover (RSS, Docker, HN, Reddit) ────────────────────── */
.widget-type-rss .rss-item,
.widget-type-docker-containers .docker-container-item,
.widget-type-hacker-news .hacker-news-item,
.widget-type-reddit .reddit-item {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5px 8px;
    border-radius: 8px;
    margin: 0 -8px;
}

.widget-type-rss .rss-item:hover,
.widget-type-docker-containers .docker-container-item:hover,
.widget-type-hacker-news .hacker-news-item:hover,
.widget-type-reddit .reddit-item:hover {
    background: hsla(228, 10%, 18%, 0.4);
    transform: translateX(5px);
}

/* ─── Calendar ───────────────────────────────────────────────────────── */
.widget-type-calendar .calendar-day-today {
    background: hsla(35, 85%, 55%, 0.15) !important;
    border-radius: 50%;
    color: var(--qdante-accent) !important;
    font-weight: 700;
    animation: dayGlow 3s ease-in-out infinite;
}

@keyframes dayGlow {
    0%, 100% { box-shadow: 0 0 0 0 hsla(35, 85%, 55%, 0.15); }
    50%      { box-shadow: 0 0 0 8px hsla(35, 85%, 55%, 0.05); }
}

/* ─── Widget header titles ───────────────────────────────────────────── */
.widget-header .widget-title {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.widget:hover .widget-header .widget-title {
    color: var(--qdante-accent);
}

/* ─── Releases widget ────────────────────────────────────────────────── */
.widget-type-releases .release-item {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 4px 8px;
    border-radius: 8px;
    margin: 0 -8px;
}

.widget-type-releases .release-item:hover {
    background: hsla(228, 10%, 18%, 0.4);
    transform: translateX(4px);
}

/* ─── Selectare text ─────────────────────────────────────────────────── */
::selection {
    background: hsla(35, 85%, 55%, 0.25);
    color: var(--qdante-text);
}

