/* Custom CSS for Thấm Academy Prototype */

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #2D5F3F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1A3A28;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(45, 95, 63, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(45, 95, 63, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Focus Styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.2);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
    background-color: #2D5F3F;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1A3A28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.4);
}

.btn-secondary {
    background-color: #E67E50;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d06b3f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 80, 0.4);
}

/* Gradient Backgrounds */
.gradient-green {
    background: linear-gradient(135deg, #2D5F3F 0%, #4A8B5C 100%);
}

.gradient-cream {
    background: linear-gradient(135deg, #F5E6D3 0%, #ffffff 50%, #F5E6D3 100%);
}

.gradient-hero {
    background: linear-gradient(135deg, #F5E6D3 0%, #ffffff 50%, rgba(45, 95, 63, 0.05) 100%);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2D5F3F, #4A8B5C);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Chat Message Bubbles */
.chat-bubble-user {
    background-color: #2D5F3F;
    color: white;
    border-radius: 1rem;
    border-top-right-radius: 0.25rem;
}

.chat-bubble-ai {
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
}

/* Flowchart Connector Lines */
.connector-line {
    width: 4px;
    background-color: #2D5F3F;
}

.connector-line-inactive {
    background-color: #d1d5db;
}

/* Learning Path Node Styles */
.node-completed {
    background-color: #2D5F3F;
    color: white;
}

.node-current {
    background: linear-gradient(135deg, #E67E50, #f59e0b);
    color: white;
    animation: pulse-glow 2s infinite;
}

.node-locked {
    background-color: #e5e7eb;
    color: #9ca3af;
    opacity: 0.6;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
    }

    .text-responsive-2xl {
        font-size: 1.75rem;
    }

    .text-responsive-3xl {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .shadow-lg,
    .shadow-xl,
    .shadow-2xl {
        box-shadow: none;
    }
}

/* Prose Styles for AI Chat */
.prose p {
    margin-bottom: 0.75rem;
}

.prose strong {
    font-weight: 600;
    color: #1A3A28;
}

.prose li {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose ol {
    list-style-type: decimal;
}

.prose ul {
    list-style-type: disc;
}

/* Transition Utilities */
.transition-fast {
    transition: all 0.15s ease;
}

.transition-normal {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-green {
    background-color: rgba(45, 95, 63, 0.1);
    color: #2D5F3F;
}

.badge-gold {
    background-color: rgba(212, 175, 55, 0.1);
    color: #b8860b;
}

.badge-orange {
    background-color: rgba(230, 126, 80, 0.1);
    color: #E67E50;
}
