/* Modern Styling for Tiếng Trung Khu Công Nghiệp App */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0d9488;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --pinyin-color: #dc2626;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Hanzi typography */
.hanzi {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 600;
}

/* Pinyin tag */
.pinyin-text {
    color: var(--pinyin-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Glassmorphism effects */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark-glass {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Active Nav Tab */
.nav-tab.active {
    background-color: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}
.nav-tab.active i {
    color: #ffffff !important;
}

.speech-filter-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* Voice Wave Animation */
.voice-wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}
.voice-wave span {
    width: 3px;
    background-color: currentColor;
    border-radius: 9999px;
    animation: waveAnim 1s ease-in-out infinite;
}
.voice-wave span:nth-child(2) { animation-delay: 0.2s; }
.voice-wave span:nth-child(3) { animation-delay: 0.4s; }
.voice-wave span:nth-child(4) { animation-delay: 0.6s; }

@keyframes waveAnim {
    0%, 100% { height: 4px; }
    50% { height: 18px; }
}

/* Pulse Glow for Microphone */
.mic-recording {
    animation: micPulse 1.5s infinite;
    background-color: #ef4444 !important;
    color: white !important;
}

@keyframes micPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Card hover animation */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Audio button play state */
.btn-speaker:active {
    transform: scale(0.92);
}

/* Chat bubble style */
.bubble-user {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 18px 18px 4px 18px;
}
.bubble-ai {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 18px 18px 18px 4px;
}

/* Badge glow */
.badge-kcn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* 3D Flip Card for Flashcard SRS */
.perspective-1000 {
    perspective: 1000px;
}
.transform-style-3d {
    transform-style: preserve-3d;
}
.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Print Styles for CV Builder */
@media print {
    body * {
        visibility: hidden;
    }
    #printableCV, #printableCV * {
        visibility: visible;
    }
    #printableCV {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 15mm 20mm !important;
        box-shadow: none !important;
        border: none !important;
    }
}

