/* Aditya Pandey - Base layout and structure */
body {
    text-align: center;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f0f0;
}

header {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    margin-top: 20px;
    position: static;
    width: 100%;
}
 
/* Kartik Bisht - Canvas styling and animations */
canvas {
    border: 3px solid #333;
    background: linear-gradient(135deg, #e0e0e0, #ffffff);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    display: block;
    transition: transform 0.3s ease;
}
canvas:hover {
    transform: scale(1.05);
}

.node {
    font-weight: bold;
    font-size: 16px;
    fill: #333;
}

.edge-weight {
    font-weight: bold;
    font-size: 14px;
    fill: #ff5722;
}

/* Tanmay Sagar - Popup styling and button hover effects */
button {
    margin: 10px;
    padding: 10px 15px;
    cursor: pointer;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease;
}
button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
}

.control-panel {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.control-panel button {
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    transition: transform 0.2s ease, background 0.3s ease;
}
.control-panel button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

button.active {
    background: #FF5722;
    color: white;
}
/* Gaurang Joshi - Log section styling and responsive design */
#log {
    max-width: 600px;
    margin: 20px auto;
    text-align: left;
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 200px;
}

.popup {
    position: fixed;
    top: 50px;
    right: 20px;
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    font-size: 14px;
    display: none;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}
.popup.visible {
    display: block;
}
.popup.hidden {
    display: none;
}

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

/* Responsive Design for Mobile View */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    header {
        font-size: 20px;
        padding: 15px 0;
    }

    main {
        margin: 10px;
    }

    canvas {
        width: 90%;
        height: auto;
        margin: 10px auto;
    }

    button {
        font-size: 14px;
        padding: 8px 12px;
    }

    .control-panel {
        flex-direction: column;
        gap: 5px;
    }

    #log {
        max-width: 90%;
        font-size: 12px;
    }

    .popup {
        width: 90%;
        right: 5%;
        top: 20px;
    }
}
