html,
body {
    height: 100%;
    margin: 0;
}
body {
    font-family: "Inter", Arial, sans-serif;
    background: #f4f7fa;
    min-height: 100vh;
}

#container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: #fff;
    min-height: 100vh;
    position: sticky;
    top: 0;
    box-shadow:
        6px 0 24px -8px #e1e7ef,
        1px 0 0 #eee;
    overflow-y: auto;
    z-index: 100;
    padding-top: 2.2em;
    border-top-right-radius: 1.7em;
    border-bottom-right-radius: 1.7em;
    border-radius: 1.7em 0 0 1.7em;
    margin: 1.2em 0.8em 1.2em 1.2em;
    transition:
        box-shadow 0.15s,
        background 0.15s;
}
.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 0.4em 1em 0.2em 2em;
}
.sidebar-links a {
    text-decoration: none;
    color: #225b96;
    font-size: 1.12em;
    font-weight: 500;
    line-height: 1.38em;
    padding: 0.75em 1.2em;
    border-radius: 1.5em;
    transition:
        background 0.18s,
        color 0.17s,
        box-shadow 0.1s;
    background: #f7faff;
    display: flex;
    align-items: center;
    gap: 0.65em;
    box-shadow: 0 1px 4px rgba(160, 180, 210, 0.06);
    border: none;
}
.sidebar-links a .emoji {
    font-size: 1.14em;
    margin-right: 0.19em;
    background: #ebf0fa;
    padding: 0.12em 0.32em;
    border-radius: 2em;
    box-shadow: 0 1px 2px #e1e9f5;
}
.sidebar-links a:hover,
.sidebar-links a:focus {
    background: #e7f0ff;
    color: #13408f;
    outline: none;
    box-shadow:
        0 6px 18px -6px #ccdbf5,
        0 0 0 3px #d6e6fa;
}

/* MAIN area rounded card look */
#main {
    flex: 1;
    padding: 2.9rem 4vw 4em 4vw;
    background: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}
.main-content-card {
    width: 100%;
    max-width: 850px;
    background: #fff;
    box-shadow:
        0 6px 32px -10px #b1bfce66,
        0 2px 14px -8px #4461870d;
    border-radius: 1.85em;
    padding: 2.5em 2.8em 2em 2.8em;
    margin: 1.7em 0 0 0;
    display: flex;
    flex-direction: column;
}
#main h1 {
    font-size: 2.2em;
    margin-top: 0.15em;
    margin-bottom: 1.4em;
    color: #16213c;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}
#main nav {
    margin-bottom: 2em;
    font-size: 1.12em;
    display: flex;
    gap: 2.2em;
    justify-content: center;
}
#main nav a {
    text-decoration: none;
    color: #1563c8;
    font-weight: 600;
    background: #eef3fc;
    padding: 0.65em 2em;
    border-radius: 2em;
    transition:
        background 0.17s,
        color 0.14s,
        box-shadow 0.1s;
    box-shadow: 0 1px 3px #e3edf7;
}
#main nav a:hover,
#main nav a:focus {
    background: #dbe6fd;
    color: #114078;
    outline: none;
    box-shadow: 0 0 0 2.5px #c9daf7;
}
.main-content-card h2 {
    margin-top: 1.1em;
    font-size: 1.33em;
    color: #1257a2;
    border-radius: 1em;
    padding: 0.15em 1em;
    background: #f7fafd;
    box-shadow: 0 1.5px 7px #e1eaf933;
    display: inline-block;
}
.main-content-card p {
    font-size: 1.09em;
    color: #28324c;
    line-height: 1.62;
    margin-top: 1.25em;
    margin-bottom: 1em;
    background: #f9fcff;
    padding: 0.8em 1.3em;
    border-radius: 1em;
    box-shadow: 0 1px 6px #f2f6fb23;
    max-width: 650px;
    align-self: flex-start;
}
footer {
    color: #adb1ba;
    font-size: 0.99em;
    margin-top: 2.6em;
    border-top: 1px solid #ecf0f3;
    padding-top: 1.2em;
    text-align: center;
    width: 100%;
    border-radius: 0 0 1.7em 1.7em;
    background: #f7fafd;
    box-shadow: 0 0.5px 8px #eef3fc67;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: unset;
        box-shadow: none;
        border-radius: 1.5em 1.5em 0 0;
        margin: 0.55em 1.3em 0.7em 1.3em;
    }
    #container {
        flex-direction: column;
    }
    #main {
        padding: 0.5em 0 1.7em 0;
    }
    .main-content-card {
        max-width: 97vw;
        padding: 2em 5vw 2em 5vw;
    }
}
@media (max-width: 600px) {
    .sidebar {
        padding-top: 1.1em;
        border-radius: 1em 1em 0 0;
        margin: 0.4em 0.6em;
    }
    .main-content-card {
        border-radius: 1em;
        padding: 1.15em 2vw 1.1em 2vw;
    }
    #main nav {
        gap: 0.9em;
        font-size: 0.98em;
    }
}

/* ===== BACK BUTTON ===== */
/* Floating back button with glassmorphism effect */
.back-button {
    position: fixed; /* Always visible in top-left */
    top: 30px;
    left: 30px;
    z-index: 1000; /* Above all other content */
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px); /* Glassmorphism blur */
}

/* Arrow icon for back button */
.back-button::before {
    content: "←"; /* Left arrow character */
    font-size: 1.3em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

/* Back button hover effect - lifts up and changes gradient */
.back-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Arrow animation on hover */
.back-button:hover::before {
    transform: translateX(-5px);
    animation: bounce-left 0.6s ease-in-out;
}

/* Bounce animation for the back arrow */
@keyframes bounce-left {
    0%,
    100% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(-8px);
    }
}

.back-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

/* Mobile responsive back button - smaller size and position */
@media (max-width: 768px) {
    .back-button {
        top: 20px; /* Closer to top edge on mobile */
        left: 20px; /* Closer to left edge on mobile */
        padding: 12px 20px; /* Smaller padding */
        font-size: 1em; /* Smaller font size */
    }
}
