*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{

    font-family: Arial, sans-serif;

    background: #f4f7f9;

    color: #333;

    line-height: 1.6;
}

/* =========================================
   CONTAINER
========================================= */

.container{

    width: 90%;

    max-width: 1200px;

    margin: auto;

    padding: 20px;
}

/* =========================================
   HEADER
========================================= */

header{

    text-align: center;

    margin-bottom: 30px;
}

header h1{

    color: #2e7d32;

    margin-bottom: 10px;

    font-size: 36px;
}

header p{

    color: #666;

    font-size: 16px;
}

/* =========================================
   STATUS CARD
========================================= */

.status-card{

    background: white;

    padding: 20px;

    border-radius: 10px;

    margin-bottom: 20px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-card h2{

    margin-bottom: 10px;
}

#system-status{

    font-weight: bold;

    color: green;
}

/* =========================================
   SENSOR GRID
========================================= */

.sensor-grid{

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;

    margin-bottom: 30px;
}

.card{

    background: white;

    padding: 20px;

    border-radius: 10px;

    text-align: center;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    transition: 0.3s;
}

.card:hover{

    transform: translateY(-5px);

    box-shadow:
        0 5px 15px rgba(0,0,0,0.15);
}

.card h3{

    margin-bottom: 15px;

    color: #2e7d32;
}

.card p{

    font-size: 24px;

    font-weight: bold;
}

/* =========================================
   CAMERA SECTION
========================================= */

.camera-section{

    background: white;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    margin-bottom: 30px;
}

.camera-section h2{

    margin-bottom: 20px;

    text-align: center;

    color: #2e7d32;
}

#latest-image{

    width: 100%;

    max-height: 500px;

    border-radius: 10px;

    object-fit: cover;
}

/* =========================================
   NAVBAR
========================================= */

.navbar{

    width: 100%;

    background: #2e7d32;

    color: white;

    padding: 15px 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

    position: sticky;

    top: 0;

    z-index: 1000;
}

.navbar h2{

    font-size: 24px;
}

.nav-links{

    display: flex;

    gap: 20px;
}

.nav-links a{

    color: white;

    text-decoration: none;

    font-weight: bold;

    transition: 0.3s;
}

.nav-links a:hover{

    opacity: 0.8;
}

/* =========================================
   CHART SECTION
========================================= */

.chart-section{

    background: white;

    margin-top: 30px;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-section h2{

    margin-bottom: 20px;

    text-align: center;

    color: #2e7d32;
}

/* Chart Canvas */
.chart-container{

    position: relative;

    width: 100%;

    height: 400px;
}

.chart-container canvas{

    width: 100% !important;

    height: 100% !important;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media(max-width: 768px)
{
    .navbar{

        flex-direction: column;

        gap: 15px;

        text-align: center;
    }

    .nav-links{

        flex-direction: column;

        gap: 10px;
    }

    header h1{

        font-size: 28px;
    }

    .card p{

        font-size: 20px;
    }

    #latest-image{

        max-height: 300px;

        object-fit: cover;
    }

    .container{

        width: 95%;
    }
    
    .chart-container{

        height: 300px;
    }
}

/* =========================================
   GALLERY
========================================= */

.gallery-grid{

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));

    gap: 20px;

    margin-top: 30px;
}

.gallery-card{

    background: white;

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    transition: 0.3s;
}

.gallery-card:hover{

    transform: translateY(-5px);

    box-shadow:
        0 5px 15px rgba(0,0,0,0.15);
}

.gallery-card img{

    width: 100%;

    height: 250px;

    object-fit: cover;
}

.gallery-info{

    padding: 15px;
}

.gallery-info p{

    margin-bottom: 8px;

    font-size: 14px;
}

/* =========================================
   HISTORY TABLE
========================================= */

.history-section{

    background: white;

    margin-top: 30px;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-section h2{

    margin-bottom: 20px;

    text-align: center;

    color: #2e7d32;
}

.table-container{

    overflow-x: auto;
}

table{

    width: 100%;

    border-collapse: collapse;
}

table th,
table td{

    padding: 12px;

    border-bottom: 1px solid #ddd;

    text-align: center;
}

table th{

    background: #2e7d32;

    color: white;
}

table tr:hover{

    background: #f5f5f5;
}
