body {
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 100%);
    color: #e0e0e0;
}
.status-bar {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    background: rgba(40, 40, 40, 0.9);
    position: fixed;
    top: 0;
    z-index: 1000;
}
.status-bar p#status {
    font-size: 14px;
    color: #a0a0a0;
    font-style: italic;
    margin: 0;
    transition: all 0.3s ease;
}
.status-bar p#status.recording {
    font-size: 18px;
    color: #ff4d4d;
    animation: pulseText 1.5s infinite ease-in-out;
}
.chat-container {
    width: 85%;
    max-width: 700px;
    margin-top: 40px;
    margin-bottom: 140px;
    padding: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
    box-sizing: border-box;
}
.chat-message {
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}
.chat-message p {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}
.chat-message.user p { color: #d0d0d0; font-weight: 500; }
.chat-message.ai p { color: #4a90e2; font-weight: 600; }
.button-container {
    padding: 20px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    background: rgba(26, 26, 26, 0.8);
    z-index: 1000;
}
button#recordButton {
    font-size: 24px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff4040);
    color: #fff;
    border: 4px solid #ff9999;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 64, 64, 0.6), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: glowIdle 2s infinite ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
button#recordButton:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(255, 64, 64, 0.8), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5);
}
button#recordButton.recording {
    background: linear-gradient(135deg, #ff4040, #cc0000);
    border-color: #ff6666;
    animation: glowActive 1s infinite ease-in-out;
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.9), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}
button#recordButton::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    pointer-events: none;
}
button#recordButton:active::before {
    transform: translate(-50%, -50%) scale(1);
}
audio { display: none; }
#permissionPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#permissionPopup div {
    background: #2d2d2d;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: popupFadeIn 0.3s ease;
}
#permissionPopup p {
    font-size: 18px;
    color: #e0e0e0;
    margin: 0 0 20px;
}
#permissionPopup button {
    font-size: 16px;
    padding: 12px 30px;
    border-radius: 25px;
    background: linear-gradient(45deg, #4a90e2, #63b3ed);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
}
#permissionPopup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes pulseText { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes glowIdle { 0% { box-shadow: 0 10px 20px rgba(255, 64, 64, 0.6), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } 50% { box-shadow: 0 15px 30px rgba(255, 64, 64, 0.8), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } 100% { box-shadow: 0 10px 20px rgba(255, 64, 64, 0.6), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } }
@keyframes glowActive { 0% { box-shadow: 0 15px 30px rgba(255, 0, 0, 0.9), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } 50% { box-shadow: 0 20px 40px rgba(255, 0, 0, 1), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } 100% { box-shadow: 0 15px 30px rgba(255, 0, 0, 0.9), inset 0 5px 15px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.5); } }
@keyframes popupFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }