﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A3933;
    --secondary-color: #6B5B52;
    --accent-color: #4CAF50;
    --bg-dark: #2C2420;
    --bg-darker: #1A1410;
    --text-light: #FFFFFF;
    --text-gray: #B0A8A0;
    --border-color: #3E342E;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--bg-darker) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100vw;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0;
}

/* Main Screen */
.main-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
}

.header-icons {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
}

.auth-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
    transform: translateY(-1px);
}

/* Tyler Section */
.tyler-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
}

.avatar-container {
    margin-bottom: 60px;
}

.avatar {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #7BA8E8 0%, #5A8DD6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.bear-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.ear {
    position: absolute;
    width: 45px;
    height: 45px;
    background: #C8C8C8;
    border-radius: 50%;
    top: 15px;
}

.ear-left {
    left: 20px;
}

.ear-right {
    right: 20px;
}

.face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 100px;
    background: #E8E8E8;
    border-radius: 45px 45px 50px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.eyes {
    display: flex;
    gap: 18px;
    margin-bottom: 12px;
}

.eye {
    width: 8px;
    height: 8px;
    background: #2C2420;
    border-radius: 50%;
}

.nose {
    width: 14px;
    height: 12px;
    background: #2C2420;
    border-radius: 50% 50% 50% 50%;
    margin-bottom: 8px;
}

.mouth {
    width: 24px;
    height: 12px;
    border: 2px solid #2C2420;
    border-top: none;
    border-radius: 0 0 16px 16px;
}

.call-info {
    text-align: center;
}

#call-duration {
    color: var(--text-gray);
    font-size: 14px;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 30px 0;
}

.language-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 32px;
}

.call-btn {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s;
}

.call-btn::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    opacity: 0;
    animation: ripple 2s ease-out infinite;
}

.call-btn::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    opacity: 0;
    animation: ripple 2s ease-out infinite 1s;
}

.call-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(76, 175, 80, 0.6);
}

.call-btn:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.audio-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: flex-end;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-darker);
    border-radius: 24px 24px 0 0;
    width: 100%;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-light);
    transition: background 0.2s;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option .flag {
    font-size: 28px;
}

/* Chat Screen */
.chat-container {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--bg-darker) 100%);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    gap: 12px;
}

.avatar-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7BA8E8 0%, #5A8DD6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bear-face-small {
    width: 24px;
    height: 24px;
    background: #E8E8E8;
    border-radius: 50%;
}

.chat-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.call-timer {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-gray);
}

.chat-header-icons {
    display: flex;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 120px;
    max-height: calc(100vh - 280px);
}

.message {
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease-in;
}

/* AI Message New Layout */
.message-ai {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ai-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-avatar .bear-face-small {
    width: 22px;
    height: 22px;
    background: #E8E8E8;
    border-radius: 50%;
}

.ai-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.ai-message-content {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px 20px;
    width: 100%;
}

.message-text-large {
    font-size: 16px;
    line-height: 1.6;
    color: white;
    margin-bottom: 8px;
    font-weight: 400;
}

.message-phonetic-underline {
    font-size: 14px;
    color: #9BA8C4;
    margin-bottom: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(155, 168, 196, 0.3);
}

.message-translation-gray {
    font-size: 14px;
    color: #B8C6DB;
    line-height: 1.5;
    margin-bottom: 12px;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.replay-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.replay-icon-btn:hover {
    color: white;
    transform: scale(1.1);
}

.message-duration {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-ai {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-bubble {
    background: rgba(255, 255, 255, 0.1);
    padding: 14px 18px;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
}

.message-user .message-bubble {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.message-translation {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 6px;
}

.message-phonetic {
    font-size: 12px;
    color: #9BA8C4;
    margin-top: 4px;
    font-style: italic;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.suggested-response {
    background: rgba(138, 98, 175, 0.15);
    border: 1px dashed rgba(138, 98, 175, 0.4);
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.suggestion-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.suggested-response-text {
    flex: 1;
    font-size: 14px;
    color: #C8B6E8;
}

.suggestion-mic-btn {
    background: var(--accent-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    flex-shrink: 0;
}

.suggestion-mic-btn:hover {
    background: #9F7AEA;
    transform: scale(1.1);
}

.suggestion-mic-btn:active {
    transform: scale(0.95);
}

.suggested-topics {
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.topic-chip {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.topic-chip:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.chat-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.control-buttons-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.control-btn {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mic-btn-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.recording-timer {
    position: absolute;
    top: -30px;
    background: rgba(229, 57, 53, 0.95);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in;
    letter-spacing: 0.5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mic-btn {
    width: 76px;
    height: 76px;
    background: var(--accent-color);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.mic-btn.recording {
    animation: pulse 1.5s infinite;
    background: #E53935;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(229, 57, 53, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 30px rgba(229, 57, 53, 0.6);
    }
}

.control-btn:active {
    transform: scale(0.95);
}

/* Settings Menu */
.settings-menu {
    position: fixed;
    bottom: -300px;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    border-radius: 24px 24px 0 0;
    padding: 20px;
    transition: bottom 0.3s ease-out;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.settings-menu.active {
    bottom: 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item span {
    font-size: 16px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #FF6B9D;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* End Call Modal */
.end-call-modal {
    padding: 0;
    border-radius: 16px 16px 0 0;
}

.modal-divider {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 12px auto 20px;
}

.end-call-text {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    padding: 0 20px;
}

.call-duration-info {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 24px;
    padding: 0 20px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    padding: 20px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.confirm-btn {
    background: var(--accent-color);
    color: white;
}

.modal-btn:active {
    transform: scale(0.97);
}

/* AI Notice */
.ai-notice {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.ai-notice.show {
    opacity: 1;
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 375px) {
    .title {
        font-size: 32px;
    }
    
    .avatar {
        width: 160px;
        height: 160px;
    }
    
    .call-btn {
        width: 72px;
        height: 72px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 480px;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* User Settings Modal */
.user-settings-modal {
    max-width: 500px;
    padding: 25px;
}

.setting-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setting-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.setting-chip.selected {
    background: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

/* Alarm Settings Modal */
.alarm-settings-modal {
    max-width: 450px;
    padding: 25px;
}

.day-chips {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.day-chip {
    padding: 10px 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.day-chip.selected {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.alarm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-color);
}

.alarm-info {
    flex: 1;
}

.alarm-time {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.alarm-days {
    font-size: 12px;
    color: #9BA8C4;
}

.alarm-message {
    font-size: 13px;
    color: #B8C6DB;
    margin-top: 2px;
}

.alarm-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-left: 15px;
}

.alarm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.alarm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

.alarm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .alarm-slider {
    background-color: var(--accent-color);
}

input:checked + .alarm-slider:before {
    transform: translateX(20px);
}

.delete-alarm-btn {
    background: rgba(229, 57, 53, 0.2);
    border: 1px solid rgba(229, 57, 53, 0.4);
    color: #E53935;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.delete-alarm-btn:hover {
    background: rgba(229, 57, 53, 0.3);
    transform: scale(1.1);
}

/* Voice Style Modal */
.voice-style-modal {
    max-width: 450px;
    padding: 25px;
}

.voice-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.voice-chip {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.voice-chip.selected {
    background: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

.voice-icon {
    font-size: 18px;
}

.confirm-voice-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #1a1a2e;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-voice-btn:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.confirm-voice-btn:active {
    transform: scale(0.98);
}

/* User Message Actions */
.user-message-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.edit-btn svg {
    flex-shrink: 0;
}

/* Feedback Modal */
.feedback-modal {
    max-width: 520px;
    padding: 20px;
}

.feedback-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.feedback-tab {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.feedback-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.feedback-tab-content {
    min-height: 300px;
}

.feedback-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.feedback-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.feedback-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: white;
}

.feedback-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.feedback-text {
    flex: 1;
    font-size: 15px;
    color: white;
    line-height: 1.6;
}

.feedback-text.native-text {
    color: #EC4899;
    font-weight: 500;
}

.feedback-speaker {
    background: var(--accent-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s;
}

.feedback-speaker:hover {
    background: #9F7AEA;
    transform: scale(1.1);
}

.feedback-korean {
    font-size: 14px;
    color: #B8C6DB;
    line-height: 1.6;
    margin-top: 6px;
    padding-left: 2px;
}

#nativeSection .feedback-korean {
    margin-top: 8px;
}

.feedback-tip {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px dashed rgba(139, 92, 246, 0.3);
}

.feedback-tip p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #C8B6E8;
}

/* Pronunciation Score */
.score-circle-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.score-text {
    position: absolute;
    text-align: center;
}

.score-number {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.score-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.score-item p {
    margin: 0;
    font-size: 14px;
    color: #9BA8C4;
    margin-left: 20px;
}

/* Feedback Message Styles */
.message-feedback {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    animation: fadeInUp 0.4s ease-out;
}

.feedback-bubble {
    max-width: 85%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feedback-bubble[style*="rgba(76, 175, 80"] {
    /* ?꾨꼍??寃쎌슦 - ?뱀깋 */
    background: rgba(76, 175, 80, 0.25) !important;
    border-left-color: #66BB6A !important;
}

.feedback-bubble[style*="rgba(255, 193, 7"] {
    /* 媛쒖꽑 ?꾩슂??寃쎌슦 - ?몃???*/
    background: rgba(255, 193, 7, 0.25) !important;
    border-left-color: #FFB300 !important;
}

.feedback-bubble > div > div {
    color: #FFFFFF !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Realistic Female Avatar ==================== */
.character-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%), rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.4s ease-out;
}

.character-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.realistic-avatar {
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.character-face {
    position: relative;
    width: 280px;
    height: 280px;
}

.character-head {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: linear-gradient(145deg, #8B6F47 0%, #6B5335 100%);
    border-radius: 50%;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 -5px 15px rgba(0, 0, 0, 0.2);
}

/* 洹 */
.character-ear {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #8B6F47 0%, #6B5335 100%);
    border-radius: 50%;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 -3px 8px rgba(0, 0, 0, 0.3);
}

.character-ear-left {
    top: 20px;
    left: 10px;
    animation: earWiggle 2s ease-in-out infinite;
}

.character-ear-right {
    top: 20px;
    right: 10px;
    animation: earWiggle 2s ease-in-out infinite 0.5s;
}

/* ?덉뜾 */
.character-eyebrow {
    position: absolute;
    width: 35px;
    height: 6px;
    background: #3E2A1A;
    border-radius: 3px;
    top: 55px;
}

.character-eyebrow-left {
    left: 45px;
    transform: rotate(-8deg);
    animation: eyebrowMove 3s ease-in-out infinite;
}

.character-eyebrow-right {
    right: 45px;
    transform: rotate(8deg);
    animation: eyebrowMove 3s ease-in-out infinite 0.2s;
}

/* ??*/
.character-eye {
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    top: 70px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.character-eye-left {
    left: 50px;
}

.character-eye-right {
    right: 50px;
}

.character-pupil {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #2A1810;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: eyeLook 4s ease-in-out infinite;
}

.character-pupil::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

/* 肄?*/
.character-nose {
    position: absolute;
    width: 25px;
    height: 20px;
    background: #2A1810;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: 105px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* ??*/
.character-mouth {
    position: absolute;
    width: 50px;
    height: 30px;
    top: 135px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.character-mouth-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #2A1810;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    transform-origin: top center;
    animation: mouthTalk 0.15s ease-in-out infinite;
}

.character-mouth.talking .character-mouth-inner {
    animation: mouthTalk 0.15s ease-in-out infinite;
}

/* ??*/
.character-hand {
    position: absolute;
    font-size: 50px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    cursor: pointer;
    user-select: none;
}

.character-hand-left {
    top: 180px;
    left: -50px;
    animation: handWave 2s ease-in-out infinite;
}

.character-hand-right {
    top: 180px;
    right: -50px;
    animation: handWave 2s ease-in-out infinite 1s;
}

/* 留먰뭾??*/
.character-speech-bubble {
    position: relative;
    background: white;
    color: #2A1A3E;
    padding: 20px 30px;
    border-radius: 20px;
    max-width: 400px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: bubblePop 0.3s ease-out;
}

.character-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid white;
}

/* ==================== Character Animations ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes earWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes eyebrowMove {
    0%, 100% {
        transform: translateY(0) rotate(-8deg);
    }
    50% {
        transform: translateY(-3px) rotate(-10deg);
    }
}

@keyframes eyeLook {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    25% {
        transform: translate(-45%, -50%);
    }
    75% {
        transform: translate(-55%, -50%);
    }
}

@keyframes mouthTalk {
    0%, 100% {
        transform: scaleY(0.3);
    }
    50% {
        transform: scaleY(1);
    }
}

@keyframes handWave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-15deg);
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(15deg);
    }
}

@keyframes bubblePop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.character-overlay.hiding {
    animation: fadeOut 0.3s ease-out forwards;
}

.character-overlay.hiding .character-avatar {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(50px);
    }
}

/* *   = = = = = = = = = = = = = = = = = = = =   R e a l i s t i c   F e m a l e   A v a t a r   -   ? 占쏙옙占쏙옙? ? = = = = = = = = = = = = = = = = = = = =   * / 
