* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
}

.app-header {
    background-color: #2d73b4; /* Primary Blue */
    color: white;
    padding: 20px;
    z-index: 1;
}

.header-info h1 { font-size: 1.3rem; font-weight: 600; }
.header-info p { font-size: 0.9rem; opacity: 0.9; margin-top: 4px; }

.selector-container {
    background-color: #ffffff;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.exam-dropdown {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #333;
    outline: none;
    cursor: pointer;
}

.exam-dropdown:focus { border-color: #97be13; /* Secondary Lime Green */ }

.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.message-wrapper.hidden { display: none; }

.message-bubble {
    background-color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2d73b4;
    width: 100%;
    margin-bottom: 15px;
}

.message-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    white-space: pre-wrap; /* Mantém as quebras de linha \n */
}
.message-text strong { font-weight: 600; color: #111; }

.actions-container {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:active { opacity: 0.8; }
.btn-download { background-color: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.btn-share { background-color: #97be13; color: #ffffff; }

.loading-indicator {
    text-align: center;
    padding: 20px;
    font-size: 0.95rem;
    color: #6b7280;
}
.loading-indicator.hidden { display: none; }

@media (min-width: 601px) {
    .app-container { height: 90vh; border-radius: 12px; border: 1px solid #eaeaea; }
}