* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a3a5f 0%, #2c5282 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #4fd1c5;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

h2 {
    font-size: 1.8rem;
    margin: 25px 0 15px;
    color: #81e6d9;
}

p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.screen {
    display: none;
    animation: fadeIn 1s ease;
    padding: 20px;
}

.active {
    display: block;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 30px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4fd1c5 0%, #81e6d9 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.button {
    background: linear-gradient(90deg, #4fd1c5 0%, #81e6d9 100%);
    color: #2d3748;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.4);
    transition: all 0.3s ease;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(79, 209, 197, 0.6);
}

.button:active {
    transform: translateY(1px);
}

.sensor {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #4fd1c5 0%, #81e6d9 100%);
    border-radius: 20px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 5px 20px rgba(79, 209, 197, 0.5);
    position: relative;
    overflow: hidden;
}

.sensor::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.result {
    font-size: 2.5rem;
    font-weight: bold;
    color: #81e6d9;
    margin: 20px 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.heart-rate {
    font-size: 3rem;
    color: #fc8181;
    animation: pulse 1s infinite;
}

.emotion {
    font-size: 2.2rem;
    font-weight: bold;
    color: #f6e05e;
    margin: 20px 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.temperature {
    font-size: 3rem;
    font-weight: bold;
    color: #f56565;
    margin: 20px 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s infinite;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.report-table th,
.report-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-table th {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

@keyframes thermometer {
    0% { transform: scaleY(0.1); }
    50% { transform: scaleY(0.8); }
    100% { transform: scaleY(1); }
}

.thermometer {
    width: 50px;
    height: 200px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border: 3px solid white;
}

.mercury {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #f56565 0%, #fc8181 100%);
    border-radius: 20px;
    height: 70%;
    animation: thermometer 2s ease-out;
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    p { font-size: 1rem; }
    .sensor { width: 120px; height: 120px; }
    .result { font-size: 2rem; }
    .thermometer { height: 150px; width: 40px; }
}

/* --- Sensor ready state (user prompted to click Avançar) --- */
.screen .actions .button.ready {
  position: relative;
  outline: 3px solid rgba(0, 150, 0, 0.25);
  box-shadow: 0 0 0 3px rgba(0, 150, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: btn-ready-pulse 1.6s ease-in-out infinite;
}
.screen .actions .button.ready:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(0, 150, 0, 0.18);
}
@keyframes btn-ready-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* --- Novos estilos para as telas adicionadas --- */

/* Tela de identificação */
.identification-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto 30px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #81e6d9;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4fd1c5;
}

/* Teclado Virtual */
.virtual-keyboard {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.key {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 15px 10px;
    min-width: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 70px;
}

.key:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.key:active {
    background: rgba(79, 209, 197, 0.5);
    transform: translateY(0);
}

.key[data-key="BACKSPACE"],
.key[data-key="CLEAR"] {
    background: rgba(245, 101, 101, 0.3);
    flex: 2;
    max-width: 120px;
}

.key[data-key=" "] {
    flex: 4;
    max-width: 200px;
}

/* Tela de emoções */
.emotion-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.emotion-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    min-width: 120px;
}

.emotion-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.emotion-option.selected {
    background: rgba(79, 209, 197, 0.3);
    border: 2px solid #4fd1c5;
}

.emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Tela de resultados */
.results-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: bold;
    color: #81e6d9;
}

.result-value {
    font-size: 1.2rem;
    color: #fff;
}