/* Basic reset and typography setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* Beautiful sky blue gradient background */
body {
    background: linear-gradient(135deg, #e0f7fa 0%, #81d4fa 100%);
    color: #334155; /* Slate gray for highly readable text */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Locked to exactly the screen height */
    overflow: hidden; /* Hides the scrollbar entirely */
}

/* The main app card - tightened padding */
.container {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    padding: 30px 25px; /* Reduced vertical padding */
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

h1 {
    font-size: 2.2rem; /* Slightly smaller */
    color: #0288d1; /* Deep sky blue */
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 25px; /* Reduced from 40px */
}

/* Sleek, interactive button */
#recordButton {
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    color: #ffffff;
    font-size: 1.2rem; /* Slightly smaller */
    font-weight: 600;
    padding: 15px 30px; /* Reduced padding */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(2, 136, 209, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#recordButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(2, 136, 209, 0.3);
}

/* Red pulsing effect when recording */
#recordButton.recording {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    box-shadow: 0 0 20px rgba(239, 83, 80, 0.5);
    animation: pulse 1.5s infinite;
}

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

/* Status message styling */
#statusMessage {
    font-size: 0.95rem;
    margin-top: 15px; /* Reduced spacing */
    min-height: 25px;
    color: #0288d1;
    font-weight: 600;
}

/* Clean, modern output box */
.output-box {
    background-color: #f4fafe;
    padding: 20px; /* Reduced padding */
    border-radius: 16px;
    margin-top: 15px; /* Reduced margin */
    border: 1px solid #e1f0fa;
    text-align: left;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.output-box h3 {
    font-size: 0.85rem;
    color: #0288d1;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e1f0fa;
    padding-bottom: 8px;
}

#outputText {
    font-size: 1rem;
    line-height: 1.5;
    color: #1e293b;
}

/* Highlights the "Heard" and "Fluent" labels */
#outputText strong {
    color: #0288d1;
    font-weight: 600;
}