@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0d0d12;
    color: #ffffff;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* CĂN GIỮA MỌI THIẾT BỊ DÙ DÙNG PC HAY MOBILE */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Background Glow Effects */
.bg-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}
.top-glow { top: -5%; left: 50%; transform: translateX(-50%); }
.bottom-glow { bottom: -5%; right: -10%; }

/* =========================================
   1. MÀN HÌNH CHÀO (SPLASH SCREEN)
========================================= */
#splash-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #0d0d12;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    text-align: center;
}

#splash-screen.hidden {
    opacity: 0;
    transform: scale(1.15);
    pointer-events: none;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

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

.main-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    animation: pulseLogo 2s infinite ease-in-out alternate;
    margin-bottom: 20px;
}

@keyframes pulseLogo {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
    100% { transform: scale(1.08); box-shadow: 0 0 50px rgba(139, 92, 246, 0.9); }
}

.main-title {
    color: #c4b5fd;
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
}

.subtitle {
    color: #9ca3af;
    font-size: 15px;
    margin-bottom: 30px;
}

.btn-home {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 16px 35px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}
.btn-home:active {
    transform: scale(0.95);
}

/* =========================================
   2. KHUNG NỘI DUNG CHÍNH (MAIN APP)
========================================= */
#main-app {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

#main-app.fade-in {
    opacity: 1;
}

.stagger-item {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.stagger-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.section-box {
    background-color: #16161e;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Viền phát sáng nhẹ theo nhịp thở - dấu ấn riêng của theme neon */
.animated-border {
    animation: sectionGlow 4s ease-in-out infinite;
}
@keyframes sectionGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(139, 92, 246, 0); }
    50% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.18); }
}

.profile-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.small-avatar { width: 50px; height: 50px; border-radius: 50%; border: 2px solid rgba(139, 92, 246, 0.3); }
.profile-info h2 { font-size: 18px; color: #d8b4fe; font-weight: 600; }
.profile-info p { font-size: 13px; color: #9ca3af; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.status-dot { width: 8px; height: 8px; background-color: #22c55e; border-radius: 50%; display: inline-block; }
.profile-bio { font-size: 14px; line-height: 1.5; color: #9ca3af; }
.profile-bio .highlight { color: #d8b4fe; font-weight: 600; }

.section-title { text-align: center; font-size: 12px; font-weight: 600; color: #9ca3af; letter-spacing: 1px; margin-bottom: 20px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.section-title i { color: #d4d4d8; }

/* Grid Responsive */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
@media (min-width: 481px) {
    .grid-container { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

.card {
    background-color: #1a1a24;
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.5);
}

.card-icon-wrapper, .card-img-wrapper { width: 70px; height: 70px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; position: relative; }
.card-icon-wrapper { background: radial-gradient(circle, rgba(139,92,246,0.3) 0%, rgba(139,92,246,0) 70%); }
.card-img-wrapper img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.glow-purple { box-shadow: 0 0 25px rgba(139, 92, 246, 0.3); border: 2px solid rgba(139, 92, 246, 0.4); }

.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; color: #e4e4e7; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.card-desc { font-size: 11px; color: #71717a; margin-bottom: 12px; min-height: 30px; }
.card-link { color: #c4b5fd; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; transition: color 0.2s; }
.card-link:hover { color: #fff; }

.list-container { display: flex; flex-direction: column; gap: 12px; }
.list-item { display: flex; align-items: center; background-color: #1a1a24; padding: 15px; border-radius: 12px; text-decoration: none; color: white; transition: background-color 0.2s; }
.list-item:hover { background-color: #272736; }
.item-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 20px; margin-right: 15px; }
.icon-yt { background-color: #7f1d1d; color: #f87171; }
.icon-tl { background-color: #1e3a8a; color: #60a5fa; }
.icon-zl { background-color: #312e81; color: #818cf8; }
.item-info { flex-grow: 1; }
.item-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.item-info p { font-size: 12px; color: #9ca3af; }
.arrow-icon { color: #71717a; font-size: 14px; }

.video-container { position: relative; background-color: #1a1a24; border-radius: 16px; overflow: hidden; height: 200px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #27272a 0%, #18181b 100%); }
.live-badge { position: absolute; top: 15px; left: 15px; background-color: #ef4444; color: white; font-size: 11px; font-weight: bold; padding: 4px 8px; border-radius: 4px; letter-spacing: 1px; }
.play-btn { width: 60px; height: 60px; background-color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: black; font-size: 20px; padding-left: 5px; cursor: pointer; transition: transform 0.2s; }
.play-btn:hover { transform: scale(1.1); }
.video-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 15px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); font-size: 12px; color: #e4e4e7; }
.controls-right { display: flex; gap: 15px; font-size: 14px; }

footer { text-align: center; padding: 20px 0 40px; color: #71717a; font-size: 12px; }

.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1a1a24;
    border: 2px solid #8b5cf6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #c4b5fd;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s;
}
.fab:active { transform: scale(0.9); }

/* Trạng thái focus rõ ràng khi dùng bàn phím */
a:focus-visible,
button:focus-visible,
.fab:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 3px;
}

/* Tôn trọng lựa chọn giảm hiệu ứng chuyển động của người dùng */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
