@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7SUc.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: url('imgs/escritorio.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: Arial, sans-serif;
}

#container {
    display: block;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: transparent;
    position: relative;
}

#avatar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#controls {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    z-index: 10;
}

#text-input-container {
    margin-top: 15px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    width: 95vw;
    max-width: 900px;
    justify-content: center;
}

#send-btn, #start-btn, #music-btn, #settings-btn, #user-input {
    box-sizing: border-box;
    height: 40px;
    border: none;
    border-radius: 5px;
    background: rgba(52, 152, 219, 0.2);
    color: #004686;
}

#user-input {
    flex: 1;
    padding: 10px;
    background: rgb(255 255 255 / 51%);
}

#send-btn, #start-btn, #music-btn, #settings-btn {
    flex: 0 0 auto;
    width: 60px;
    padding: 0;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

#music-btn.active {
    background-color: color(a98-rgb 0.4 0.68 0.4 / 0.2) !important;
    color: white !important;
}

/* Layout para Telemóvel / Mobile */
@media (max-width: 600px) {
    #text-input-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-areas:
            "input input input input input"
            "send start music settings .";
        gap: 5px;
        width: 90vw;
        max-width: 90vw;
    }

    #user-input {
        grid-area: input;
        width: 100%;
        flex: none;
    }

    #send-btn {
        grid-area: send;
        width: 100%;
        flex: none;
    }

    #start-btn {
        grid-area: start;
        width: 100%;
        flex: none;
    }

    #music-btn {
        grid-area: music;
        width: 100%;
        flex: none;
    }

    #settings-btn {
        grid-area: settings;
        width: 100%;
        flex: none;
    }
}

#start-btn.recording-pulse {
    background-color: #e74c3c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}



#ai-response-container {
    position: absolute;
    top: 52px;
    left: 2%;
 
    padding: 15px 30px;
    background: rgba(52, 73, 94, 0.85);
    border-radius: 20px;
    max-width: 80%;
    text-align: center;
    display: none;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#ai-response {
    color: #ecf0f1;
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
}

#ai-response a {
    color: #4fc3f7;
    text-decoration: underline;
}


#replay-btn {
    display: none;
    margin-top: 12px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #ecf0f1;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

#replay-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

#replay-btn i {
    margin-right: 6px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: #2c3e50de;
    border-radius: 15px;
    padding: 25px 30px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #ecf0f1;
    font-size: 22px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #ecf0f1;
}

.modal-body label {
    display: block;
    color: #bdc3c7;
    font-size: 14px;
    margin-bottom: 5px;
    margin-top: 15px;
}

.modal-body label:first-child {
    margin-top: 0;
}

.modal-body select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    transition: background 0.2s;
}

.modal-body select:hover {
    background: rgba(255, 255, 255, 0.18);
}

.modal-body select option {
    background: #2c3e50;
    color: #ecf0f1;
}


#nav-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: #0f172ae3;
    padding: 3px 33px;
    box-sizing: border-box;
}

#nav-header a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

#nav-logo {
    width: 42px;
    height: auto;
    border-radius: 50%;
}

#nav-name {
    white-space: nowrap;
    font-size: 22px;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.nav-bold {
    font-weight: 700;
    color: #e5e7eb;
}

.nav-light {
    font-weight: 300;
    color: #60a5fa;
}
