/* =====================
   Reset & Global Styles
   ===================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e5e7eb;
    background-color: #0f172a;
}

/* =====================
   Main Content
   ===================== */

main {
    max-width: 100vw;
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: auto;
}

.main-page {
    width: 100%;
    background-color: #1a1f35;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #2d3748;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    background: #1a1f35;
}

.side-bar {
    width: 100%;
    background-color: #0f172a;
    border-radius: 0;
    color: #e5e7eb;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #2d3748;
}

.menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1rem;
}

.title {
    text-align: center;
    margin-top: 10px;
    color: #3b82f6;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.links a {
    font-size: 1rem;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.links a.active,
.links a[aria-current="page"] {
    background-color: rgba(59, 130, 246, 0.15);
    color: #dbeafe;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.links a .material-symbols-outlined {
    font-size: 1.35rem;
}

.menu-label {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin-left: 0;
    transition:
        max-width 0.2s ease,
        opacity 0.2s ease,
        margin-left 0.2s ease;
}

.links a:hover .menu-label,
.links a.active .menu-label,
.links a[aria-current="page"] .menu-label,
.links a:focus-visible .menu-label {
    max-width: 180px;
    opacity: 1;
    margin-left: 0.6rem;
}

.links a:hover {
    background-color: #2d3748;
    color: #3b82f6;
    transform: translateX(0);
}

.links span {
    font-size: 1.3rem;
    opacity: 0.8;
}

.links a:hover span {
    opacity: 1;
}

.links a.active span,
.links a[aria-current="page"] span {
    opacity: 1;
}

/* =====================
   Responsive Design
   ===================== */

@media (max-width: 768px) {
    main {
        height: auto;
        padding: 0;
    }

    .side-bar {
        width: 100%;
        border-radius: 0;
        padding: 0.75rem 1rem;
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    .links {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .links a {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .menu-label {
        max-width: none;
        opacity: 1;
        margin-left: 0;
        overflow: visible;
    }

    .main-page {
        width: 100%;
        border-radius: 0;
        height: auto;
        min-height: 60vh;
    }

    .title {
        margin-top: 10px;
        font-size: 1.3rem;
    }
}
