body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Ensure the body takes the full height of the viewport */
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

.login-container h1 {
    font-size: 2.5rem;
    color: #6c63ff;
    animation: fadeIn 1s ease-in;
}

form {
    display: flex;
    flex-direction: column;
    width: 300px;
}

input {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 10px;
    background-color: #6c63ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #5753d9;
    transform: translateY(-2px);
}

button:active {
    transform: scale(0.95);
}

.error-message {
    color: red;
    display: none;
    margin-top: 10px;
}

.shake {
    animation: shake 0.3s;
}

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

.sidebar {
    width: 250px;
    background-color: #6c63ff;
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 1000; /* Ensure sidebar is above other content */
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: block;
    padding: 10px;
    border-radius: 5px;
    position: relative;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.subpages-list {
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 10px;
    display: block;
    animation: slideIn 0.5s forwards;
}

.subpages-list li {
    margin: 10px 0;
}

.subpages-list li a {
    font-size: 0.9rem;
    padding: 8px 15px;
    position: relative;
    transition: color 0.3s ease;
}

.subpages-list li a:hover {
    color: #ffd700; /* Add a hover effect for better UX */
}

.subpages-list li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subpages-list li a:hover::before {
    opacity: 1;
}

.main-content {
    margin-left: 270px; /* Ensures main content does not overlap with sidebar */
    padding: 20px 40px; /* Adds more padding for better spacing */
    animation: fadeIn 1s ease-in;
    transition: margin-left 0.3s ease;
    flex: 1; /* Ensure main content takes up remaining space */
    display: flex;
    flex-direction: column;
}

.main-content.full-width {
    margin-left: 0;
}

.main-content.full-height {
    height: 100vh; /* Ensure main content takes full height when sidebar is collapsed */
}

.chart-container {
    margin: 20px 0;
    position: relative;
    height: 300px; /* Adjust as needed */
}
.chart-container canvas {
    width: 100%;
    height: 100%;
}

.pagination {
    margin-top: 20px;
}

.pagination button {
    padding: 10px;
    background-color: #6c63ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.pagination button:hover {
    background-color: #5753d9;
    transform: translateY(-2px);
}

.pagination button:active {
    transform: scale(0.95);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.subpage-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 80%; /* Adjust to span 80% of the main-content width */
    margin: 0 auto; /* Center the container */
}

.subpage {
    width: 100%; /* Full width for better viewing */
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subpage:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.add-new-subpage {
    width: 100%; /* Full width for consistency */
    background-color: #6c63ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    margin-top: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.add-new-subpage:hover {
    background-color: #5753d9;
    transform: translateY(-3px);
}

.add-new-subpage:active {
    transform: scale(0.95);
}

.add-new-subpage .plus-sign {
    font-size: 2rem;
    font-weight: bold;
}

.status-message {
    font-size: 1.2rem;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.status-message.running {
    color: green;
}

.status-message.lost {
    color: red;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.info-cards {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.info-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px; /* Increased padding */
    margin: 15px 0; /* Increased margin */
    width: 48%; /* Adjust as needed */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    margin: 0 0 15px; /* Increased margin */
    font-size: 1.2rem;
}

.info-card p {
    margin: 10px 0; /* Increased margin */
    font-size: 1rem;
}

/* Media query for mobile screens */
@media (max-width: 768px) {
    .info-cards {
        flex-direction: column; 
        align-items: center; 
    }

    .info-card {
        width: 90%; 
        margin-bottom: 10px; 
    }
}

.chart-card {
    background-color: #fff;
    padding: 20px;
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subpage-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    background-color: #F44336;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toggle-sidebar {
    display: none; /* Hide by default */
    position: fixed;
    top: 20px;
    right: 40px; /* Adjusted to the right side */
    background: #6c63ff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s ease;
}

.toggle-sidebar:hover {
    background: #5753d9;
}

.image-container {
    width: 80%;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    width: 650px; /* Set the width to a landscape orientation */
    height: 400px; /* Set the height accordingly */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .image-container img {
        width: 100%;
        height: auto;
    }
}