/* General styles */
body {
    font-family: "Arial", sans-serif;
    background: url('https://cdn.game-assets.online/apps/relyovo/r.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Particle container */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Each particle */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0.8;
    animation: floatParticles linear infinite;
}

/* Particle animation */
@keyframes floatParticles {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(0.8);
        opacity: 0;
    }
}

/* Container for the sensor data */
.sensor-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 1; /* Ensure cards appear above particles */
}

/* Card styling */
.sensor-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3);
    padding: 25px;
    text-align: center;
    width: 100%;
    max-width: 360px;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.8s ease-in-out, floatCard 6s ease-in-out infinite alternate;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.sensor-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.4);
}

/* Headings and text */
.sensor-card h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 12px;
}
.sensor-name {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}
.sensor-values p {
    font-size: 16px;
    margin: 5px 0;
    font-weight: bold;
    color: #444;
}
.sensor-time {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}
.no-data {
    background: rgba(255, 100, 100, 0.85);
    color: white;
    font-weight: bold;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .sensor-card {
        padding: 15px;
        width: 95%;
        max-width: 320px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes floatCard {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}
