/* Resposta global e prevenção de barras de rolagem indesejadas */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: #ffffff;
    font-family: Arial, sans-serif;
    background: radial-gradient(circle at center, #04092f -250%, #000000 70%);
}

/* Cabeçalho fixado no topo */
.site-header {
    background-color: #0b0b0b;
    border-bottom: 1px solid #222;
    width: 100%;
    height: 50px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.logo-text {
    color: #00ffcc;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo-text:hover {
    text-decoration: underline;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation a {
    color: #00ffcc;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.main-navigation a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Área central para os geradores e visualizadores 3D */
.container, #canvas-container, .viewer-3d, #webgl-container {
    width: 100vw;
    height: calc(100vh - 95px); /* Desconta a altura do cabeçalho + rodapé */
    position: absolute;
    top: 50px;
    left: 0;
    z-index: 1;
    overflow: hidden;
    background-color: transparent;
}

canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Painel de controlo lil-gui dentro da área 3D */
.lil-gui.root {
    top: 15px !important;
    right: 15px !important;
    position: absolute !important;
    z-index: 20;
    max-height: calc(100% - 30px);
    overflow-y: auto;
}

/* Rodapé fixado na extremidade inferior do ecrã */
.site-footer {
    width: 100%;
    height: 45px;
    background-color: rgba(0, 0, 0, 0.92);
    border-top: 1px solid #00ffcc;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

.footer-content {
    display: flex;
    gap: 25px;
    align-items: center;
    font-size: 0.75rem;
    color: #00ffcc;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.footer-content p, .footer-content a {
    margin: 0;
    color: #00ffcc;
    text-decoration: none;
}

.footer-content a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Títulos das páginas */
.page-title {
    font-family: 'Caveat', cursive;
    font-size: 3rem;
    font-weight: 100;
    margin: 0;
    background: linear-gradient(to bottom, #ffffff, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: #b0b0b0;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to bottom, #ffffff, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .site-footer {
        height: auto;
        padding: 8px 10px;
    }

    .footer-content {
        gap: 8px;
        font-size: 0.65rem;
        flex-direction: column;
    }
}