:root {
    --bg-color: #f0f7ff;
    --card-bg: #ffffff;
    --text-color: #1a1d23;
    --text-muted: #6b7280;
    --primary-color: #0064ff;
    --accent-color: #00c853;
    --border-color: #e5e7eb;
    --bento-radius: 15px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Gradient de base avec formes organiques superposées via multiple backgrounds */
    background-color: #f0f7ff;
    background-image:
        radial-gradient(ellipse 60% 50% at 12% 18%, rgba(99, 179, 237, 0.13) 0%, transparent 70%),
        radial-gradient(ellipse 50% 45% at 88% 82%, rgba(147, 210, 255, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 35% 30% at 55% 5%,  rgba(186, 230, 253, 0.08) 0%, transparent 60%),
        linear-gradient(150deg, #f0f7ff 0%, #f8fbff 50%, #edf5ff 100%);
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding: 24px;
    line-height: 1.5;
}

.container { max-width: 1440px; margin: 0 auto; position: relative; }

/* AUTH OVERLAY & BLUR */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(244, 246, 249, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--bento-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid var(--border-color);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.auth-card h2 { margin: 16px 0 8px; font-size: 1.5rem; }
.auth-card p { color: var(--text-muted); margin-bottom: 24px; }

.container.blurred > *:not(.auth-overlay) {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.4s ease;
}

/* HEADER */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-radius: var(--bento-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.header-left h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.header-center {
    flex: 1;
    text-align: center;
}

#local-time {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gauges {
    display: flex;
    gap: 16px;
}

.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gauge {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.gauge-bg { stroke: var(--border-color); }
.gauge-fill { stroke-linecap: round; transition: stroke-dasharray 0.5s ease; }
.gauge-fill.cpu { stroke: var(--primary-color); }
.gauge-fill.ram { stroke: var(--accent-color); }

.gauge-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 100, 255, 0.25);
}

/* BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
    margin-bottom: 40px;
}

.widget {
    background: var(--card-bg);
    border-radius: var(--bento-radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.widget h3 {
    margin-top: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* NEWS BING STYLE */
.news-bing-style { padding: 0 !important; }
.news-main-container { display: grid; grid-template-columns: 1.6fr 1fr; height: 380px; }
.hero-news { background-size: cover; background-position: center; position: relative; background-color: #111; }
.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: white;
}
.hero-overlay h2 { font-size: 1.2rem; margin: 10px 0; line-height: 1.3; font-weight: 600; }
.badge { background: #d93025; padding: 4px 8px; font-size: 0.65rem; border-radius: 4px; font-weight: 700; letter-spacing: 0.5px; }
.news-sidebar { padding: 20px; border-left: 1px solid var(--border-color); overflow-y: auto; background: #fafbfc; }
.sidebar-item { display: block; padding: 10px 0; border-bottom: 1px solid #eee; font-size: 0.85rem; text-decoration: none; color: var(--text-color); transition: var(--transition); }
.sidebar-item:hover { color: var(--primary-color); padding-left: 4px; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: white; border: none; padding: 12px; cursor: pointer; z-index: 5; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.nav-btn:hover { background: rgba(0,0,0,0.7); }
.nav-btn.next { right: 10px; }
.nav-btn.prev { left: 10px; }
.carousel-dots { display: flex; gap: 6px; margin-top: 12px; }
.dot { width: 6px; height: 6px; background: rgba(255,255,255,0.4); border-radius: 50%; transition: var(--transition); }
.dot.active { background: white; width: 16px; border-radius: 10px; }

/* SERVICES SECTION */
.separator { border: 0; border-top: 1px solid var(--border-color); margin: 40px 0; }
.services-section h2 { font-size: 1.3rem; margin-bottom: 24px; color: var(--text-color); font-weight: 600; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.service-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 16px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.service-card i {
    font-size: 1.6rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover i { transform: scale(1.1); }

.service-card span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.loading { color: var(--text-muted); font-style: italic; font-size: 0.85rem; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: 1fr; }
    .news-main-container { grid-template-columns: 1fr; height: auto; }
    .hero-news { height: 250px; }
    .news-sidebar { border-left: none; border-top: 1px solid var(--border-color); max-height: 200px; }
}

@media (max-width: 768px) {
    body { padding: 16px; }
    .top-header { flex-direction: column; gap: 16px; text-align: center; padding: 20px; }
    .header-right { flex-direction: column; gap: 12px; }
    .gauges { justify-content: center; }
    .services-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
