/* GIỮ NGUYÊN CÁC PHẦN CŨ (ROOT, BODY, HEADER...) */
/* THÊM MỚI BÊN DƯỚI: */

:root {
    --primary: #6C5CE7;
    --primary-dark: #4834D4;
    --accent: #00CEC9;
    --bg-body: #DFE6E9;
    --bg-app: #F8F9FA;
    --text-main: #2D3436;
    --text-sub: #636E72;
    --glass: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ... (Copy lại phần cũ từ V4 nếu cần, hoặc chèn thêm đoạn này) ... */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-body);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-frame {
    width: 100%;
    max-width: 414px;
    height: 100%;
    max-height: 900px;
    background: var(--bg-app);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media(min-width: 450px) {
    .mobile-frame {
        height: 90vh;
        border-radius: 40px;
        border: 8px solid #2d3436;
        box-shadow: var(--shadow-lg);
    }
}

/* HEADER & NAV (GIỮ NGUYÊN) */
.app-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 10;
}

.header-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar-ring {
    position: relative;
    width: 48px;
    height: 48px;
    padding: 2px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #fff;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
}

.header-text .greeting {
    font-size: 0.75rem;
    color: var(--text-sub);
    display: block;
}

.header-text .username {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 800;
}

.streak-pill {
    background: #FFEAA7;
    color: #D35400;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    gap: 6px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

#app-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 100px 24px;
}

.glass-nav {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
    height: 70px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-btn {
    background: none;
    border: none;
    color: #B2BEC3;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 10px;
    transition: 0.3s;
}

.nav-btn.active {
    color: var(--text-main);
}

.fab-btn {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transform: translateY(-20px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.fab-btn:active {
    transform: translateY(-18px) scale(0.95);
}

/* --- STYLE MỚI CHO V5 --- */

/* ONBOARDING SCREEN */
.onboarding-content {
    width: 100%;
    height: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 200;
    overflow-y: auto;
}

.icon-brand {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.select-options {
    display: flex;
    gap: 10px;
}

.select-options.vertical {
    flex-direction: column;
}

.opt-btn {
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-sub);
    flex: 1;
    transition: 0.2s;
    text-align: left;
}

.opt-btn.selected {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
}

.btn-primary-lg {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: auto;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

/* PROFILE DNA CARD */
.dna-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
}

.dna-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dna-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    gap: 8px;
    align-items: center;
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #eee;
    color: var(--text-sub);
}

.tag.bad {
    background: #FF7675;
    color: white;
}

.tag.good {
    background: #00B894;
    color: white;
}

.skill-bar {
    margin-bottom: 12px;
}

.skill-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-sub);
}

.bar-track {
    width: 100%;
    height: 8px;
    background: #F1F2F6;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
}

/* PRACTICE MODAL UI (GIỮ NGUYÊN) */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.overlay.hidden {
    transform: translateY(100%);
}

.practice-header {
    padding: 40px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-badge {
    background: #FF7675;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.btn-icon {
    background: #F1F2F6;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
}

.practice-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.practice-controls {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: linear-gradient(to top, #fff 80%, transparent);
}

.chat-msg {
    background: #F1F2F6;
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 1rem;
}

.chat-msg.ai {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
}

.chat-msg.user {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: var(--primary);
    color: white;
}

.mic-huge {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    position: relative;
    box-shadow: 0 15px 35px rgba(108, 92, 231, 0.4);
    transition: 0.3s;
}

.mic-huge.listening {
    background: #FF7675;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
    opacity: 0;
    animation: none;
}

.mic-huge.listening .pulse-ring {
    animation: pulse 2s infinite;
    border-color: #FF7675;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Topic items */
.hero-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 24px;
    padding: 24px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.hero-btn {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.topic-item {
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
    cursor: pointer;
}

.topic-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--bg-app);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-btn {
    font-size: 0.85rem;
    color: var(--primary);
    cursor: pointer;
}