/* =========================
   SENSOR BACKGROUND
========================= */

body {
    min-height: 100vh;

    background-image: url("../../sprites/timmy_sensor_bkg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: white;
    font-family: Arial;
    text-align: center;

    padding-top: 50px;

    overflow-y: auto;
    overflow-x: hidden;
}

.sensor-header {

    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: -100px;
    margin-top: -200px;
}

.sensor-header img {

    width: min(850px, 90vw);
    height: auto;

    pointer-events: none;

    user-select: none;

    filter:
        drop-shadow(0 0 18px rgba(120, 180, 255, 0.18));
}

/* =========================
   MAIN LAYOUT
========================= */

.sensor-layout {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 55px;

    padding: 120px 120px 80px 120px;
}

/* =========================
   BASE CARD
========================= */

.card {
    background: rgba(20, 24, 34, 0.78);

    border: 1px solid rgba(80, 160, 255, 0.25);
    border-radius: 22px;

    padding: 30px;

    backdrop-filter: blur(12px);

    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.45),
        0 0 25px rgba(60, 120, 255, 0.12);
}

/* =========================
   MOTION CARD
========================= */

.sensor-card {
    width: 360px;
}

.motion-card h1 {
    margin-bottom: 26px;
}

.motion-stats {
    margin-top: 28px;

    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.motion-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 16px;

    background: rgba(0, 0, 0, 0.25);

    border: 1px solid rgba(120, 180, 255, 0.16);
    border-radius: 14px;
}

.motion-stat span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

.motion-stat strong {
    color: #8ecbff;
    font-size: 18px;
}

/* =========================
   CHART SECTION
========================= */

.charts-section {
    width: min(950px, 95vw);

    display: flex;
    flex-direction: column;

    gap: 70px;
}

.chart-card {
    width: 100%;

    background: rgba(14, 18, 35, 0.88);

    border: 1px solid rgba(120, 180, 255, 0.25);
    border-radius: 24px;

    padding: 24px;

    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.35),
        0 0 25px rgba(80, 150, 255, 0.12);
}

.chart-card h2 {
    margin-bottom: 28px;

    color: #8ecbff;

    font-size: 32px;

    text-shadow:
        0 0 12px rgba(80, 160, 255, 0.35);
}

.chart-box {
    width: 100%;
    height: 320px;

    padding: 20px;

    background: rgba(0, 0, 0, 0.35);

    border-radius: 16px;
}

.chart-card canvas {
    width: 100%;
    height: 300px;
}

/* =========================
   TEXT
========================= */

h1 {
    margin-bottom: 30px;

    color: #8ecbff;

    text-shadow:
        0 0 12px rgba(80, 160, 255, 0.35);
}

.label {
    margin-top: 20px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 18px;
}

.value {
    margin-top: 10px;

    font-size: 40px;
    font-weight: bold;

    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.12);
}

.status {
    margin-top: 30px;

    color: rgba(255, 255, 255, 0.5);

    font-size: 14px;
}

.sensor-status-label {
    display: block;

    margin-top: 6px;

    font-size: 0.6em;

    opacity: 0.95;
}

/* =========================
   MOTION COLORS
========================= */

.motion-active {
    color: #00ff88;

    text-shadow:
        0 0 12px rgba(0, 255, 136, 0.45);
}

.motion-inactive {
    color: #ff5555;

    text-shadow:
        0 0 12px rgba(255, 85, 85, 0.35);
}

/* =========================
   CONTROLS
========================= */

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: -35px;
}

.chart-controls input,
.chart-controls button {
    padding: 10px;

    border: none;
    border-radius: 10px;
}

.pdf-card {

    width: min(950px, 95vw);

    padding: 28px;

    margin-top: -25px;
}

.pdf-card h2 {

    margin-bottom: 22px;

    color: #8ecbff;

    font-size: 28px;

    text-shadow:
        0 0 12px rgba(80,160,255,0.35);
}

.chart-controls {

    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    align-items: center;

    gap: 16px;

    margin-top: 0;
}

.chart-controls select,
.chart-controls input,
.chart-controls button {

    height: 48px;

    padding: 0 16px;

    border: 1px solid rgba(120,180,255,0.25);
    border-radius: 12px;

    background: #8ecbff;

    color: black;

    font-size: 15px;

    backdrop-filter: blur(8px);

    box-shadow:
        0 0 12px rgba(80,160,255,0.08);
}

.chart-controls button {

    cursor: pointer;

    background: #8ecbff;

    color: black;

    font-weight: bold;

    transition: 0.2s;
}

.chart-controls button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 0 15px rgba(120,180,255,0.35);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .sensor-layout {
        padding: 110px 20px 60px 20px;
    }

    .sensor-card {
        width: min(360px, 95vw);
    }

    .charts-section {
        width: 95vw;
        gap: 45px;
    }

    .chart-card h2 {
        font-size: 24px;
    }

    .chart-controls {
        flex-direction: column;
        margin-top: -15px;
    }
}

