
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Container for Centered Content */
.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1, h2, h3 {
    color: #0056b3;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Paragraphs */
p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* Code and Preformatted Text */
code, pre {
    font-family: "Courier New", Courier, monospace;
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    color: #d63384;
}

pre {
    display: block;
    white-space: pre-wrap;
    margin: 15px 0;
}

/* Links */
a {
    color: #0056b3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px 0;
}

/* Lists */
ul, ol {
    margin: 15px 0;
    padding-left: 20px;
}

/* Buttons */
button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #004494;
}

.demo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.menu-icon {
    width: 50px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
    transition: transform 0.3s;
}

.menu-icon div {
    height: 6px;
    background-color: #0056b3;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Use input checkbox for toggling animations */
.menu-wrapper {
    position: relative;
}

.menu-wrapper input[type="checkbox"] {
    display: none;
}

/* Demonstration 1: Simple hamburger to cross */
.menu-icon.demo1 div {
    width: 100%;
}

.menu-wrapper.demo1 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-wrapper.demo1 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(2) {
    opacity: 0;
}

.menu-wrapper.demo1 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Demonstration 2: Hamburger to vertical lines */
.menu-icon.demo2 div {
    width: 100%;
}

.menu-wrapper.demo2 input[type="checkbox"]:checked ~ .menu-icon div {
    transform: rotate(90deg);
}

/* Demonstration 3: Line shrink and expand */
.menu-icon.demo3 div {
    width: 100%;
}

.menu-wrapper.demo3 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(1) {
    width: 50%;
}

.menu-wrapper.demo3 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(2) {
    width: 75%;
}

.menu-wrapper.demo3 input[type="checkbox"]:checked ~ .menu-icon div:nth-child(3) {
    width: 100%;
}

/* Demonstration 4: Fade-in and rotate */
.menu-icon.demo4 div {
    width: 100%;
}

.menu-wrapper.demo4 input[type="checkbox"]:checked ~ .menu-icon div {
    transform: rotate(360deg);
    opacity: 0.5;
}

/* Demonstration 5: Diner-inspired bouncing effect */
.menu-icon.demo5 div {
    width: 100%;
    animation: none;
}

.menu-wrapper.demo5 input[type="checkbox"]:checked ~ .menu-icon div {
    animation: bounce 0.6s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
