/* Estilos modernos para funcionalidades interactivas */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #0f172a;
    color: #f8fafc;
}

/* Cabeçalho interativo */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4338ca, #3b82f6);
    color: white;
    padding: 15px 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

header:hover {
    box-shadow: 0 4px 30px rgba(99, 102, 241, 0.4);
}

#logo {
    text-decoration: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#logo:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* Menu interativo */
#openMenu, #closeMenu {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
}

#openMenu:hover, #closeMenu:hover {
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: white;
    padding: 12px 15px;
    display: block;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(79, 70, 229, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    width: max-content;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

nav ul li:hover ul {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

nav ul li ul li a {
    padding: 10px 20px;
    border-radius: 0;
}

nav ul li ul li a:hover {
    background: rgba(99, 102, 241, 0.6);
    padding-left: 25px;
}

.arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

nav ul li:hover .arrow {
    transform: rotate(180deg);
}

/* Layout principal */
.main-content {
    display: flex;
    flex: 1;
    margin: 20px 5%;
    gap: 20px;
}

main {
    flex: 3;
    padding: 30px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

aside {
    flex: 1;
    padding: 25px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: justify;
    color: #f8fafc;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

aside:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

aside aside {
    padding: 20px;
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.7), rgba(16, 185, 129, 0.7));
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

aside aside:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Seções de conteúdo com efeitos interativos */
.sec, .seca {
    background: rgba(99, 102, 241, 0.3);
    color: #f8fafc;
    padding: 20px 25px;
    border-radius: 12px;
    text-align: justify;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sec:hover, .seca:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(99, 102, 241, 0.4);
}

.degr, .degra {
    background: linear-gradient(90deg, #6366f1, #10b981);
    padding: 12px 20px;
    border-radius: 30px;
    text-align: center;
    color: white;
    font-weight: 600;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.degr:hover, .degra:hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    transform: scale(1.02);
}

.degra {
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    text-align: right;
}

/* Formulários e caixas de diálogo modernos */
#senha-form, #erro-acesso {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#senha-form h3, #erro-acesso h3 {
    color: #f0abfc;
    margin-top: 10px;
}

#senha-form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#senha-form input[type="password"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

#senha-form button[type="submit"], #erro-acesso button {
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#senha-form button[type="submit"]:hover, #erro-acesso button:hover {
    background: linear-gradient(90deg, #4f46e5, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.5);
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #f8fafc;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #f87171;
    transform: scale(1.1) rotate(90deg);
}

/* Lista expansível moderna e interativa */
.expandable-list {
    display: none; 
    list-style-type: none;
    padding: 0;
    margin: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expandable-list li {
    margin: 8px 0;
    transition: all 0.3s ease;
}

.expandable-list li a {
    display: block;
    padding: 10px 15px;
    color: #f8fafc;
    text-decoration: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.expandable-list li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header {
    cursor: pointer;
    padding: 15px;
    margin: 10px 0;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.header:hover {
    background: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header::after {
    content: "▼";
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.header.open::after {
    transform: rotate(180deg);
}

/* Responsividade */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 80%;
        max-width: 300px;
        background: rgba(67, 56, 202, 0.95);
        backdrop-filter: blur(10px);
        padding: 60px 20px 20px;
        z-index: 1000;
        overflow-y: auto;
        transition: transform 0.3s ease;
        transform: translateX(100%);
    }

    nav.show {
        transform: translateX(0);
        display: flex;
    }

    #openMenu {
        display: block;
    }

    #closeMenu {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li ul {
        position: static;
        width: 100%;
        background: rgba(99, 102, 241, 0.5);
        margin-top: 5px;
        margin-bottom: 5px;
        border-radius: 8px;
    }

    nav ul li ul li a {
        padding-left: 30px;
    }

    nav ul li a .arrow {
        float: right;
    }

    #menu.show {
        display: flex;
    }

    .main-content {
        flex-direction: column;
    }

    aside {
        order: -1;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }

    #logo {
        font-size: 20px;
    }

    #openMenu, #closeMenu {
        font-size: 20px;
    }

    .main-content {
        margin: 10px;
        gap: 10px;
    }

    main, aside {
        padding: 15px;
    }
}