/* 
 * Premium UI Enhancements for Learning T-Map - V4 (Ultimate)
 * Import Modern Google Fonts: Prompt for Thai, Inter for English
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --dark-bg: #0F172A;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --font-primary: 'Prompt', 'Inter', sans-serif;
}

body {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    color: #334155;
    background-color: #F8FAFC;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────
   GLASSMORPHISM & PREMIUM UTILITIES
───────────────────────────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 1.5rem;
}

.hover-shadow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-5px);
}

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

/* ─────────────────────────────────────────────────────────
   PREMIUM BUTTONS
───────────────────────────────────────────────────────── */
.btn-premium {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}
.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
    color: white;
}

.btn-primary-glow {
    background: linear-gradient(135deg, #4F46E5, #3B82F6);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}
.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
    color: white;
}

/* ─────────────────────────────────────────────────────────
   IMAGE & GLOW EFFECTS
───────────────────────────────────────────────────────── */
.premium-image-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 1.5rem;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 100%;
    z-index: 2;
}
.premium-image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
}
.premium-image-glow {
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    background: linear-gradient(45deg, rgba(79,70,229,0.4), rgba(236,72,153,0.4), rgba(16,185,129,0.4));
    border-radius: 2rem;
    z-index: -1;
    filter: blur(25px);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rotateGlow 10s linear infinite;
}
.premium-image-wrapper:hover .premium-image-glow {
    opacity: 0.8;
}
@keyframes rotateGlow {
    0% { filter: hue-rotate(0deg) blur(25px); }
    100% { filter: hue-rotate(360deg) blur(25px); }
}
.premium-image {
    border-radius: 1rem;
    width: 100%;
    height: auto;
    display: block;
}

/* ─────────────────────────────────────────────────────────
   SPARKLES EFFECT
───────────────────────────────────────────────────────── */
@keyframes floatSparkle {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    50% { opacity: 0.8; transform: translateY(-80px) scale(1.2); }
    100% { transform: translateY(-160px) scale(0); opacity: 0; }
}
.sparkle-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFF;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8), 0 0 20px 5px rgba(245, 158, 11, 0.4);
    animation: floatSparkle 4s infinite ease-in-out;
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────
   CATEGORY CARDS & ANIMATIONS
───────────────────────────────────────────────────────── */
.hover-glow {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}
.hover-glow:hover {
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
    transform: translateY(-10px);
    border-color: rgba(79, 70, 229, 0.3) !important;
}

.reveal-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.reveal-element.active {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   NAVBAR (assuming included)
───────────────────────────────────────────────────────── */
.navbar.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE DATA TABLES (For Frontend/Admin)
───────────────────────────────────────────────────────── */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
}
.premium-table th {
    background-color: transparent;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border: none;
}
.premium-table tbody tr {
    background-color: #FFF;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.premium-table tbody tr:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.1);
    transform: scale(1.005);
}
.premium-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}
.premium-table td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.5);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.premium-table td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.5);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ─────────────────────────────────────────────────────────
   DARK MODE
───────────────────────────────────────────────────────── */
body.dark-mode {
    background-color: var(--dark-bg);
    color: #E2E8F0;
}
body.dark-mode .glass-panel,
body.dark-mode .navbar.glass-nav {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .premium-table tbody tr {
    background-color: #1E293B;
}
body.dark-mode .premium-table td {
    border-color: #334155;
    color: #CBD5E1;
}
body.dark-mode .card,
body.dark-mode .bg-white {
    background-color: #1E293B !important;
    border-color: #334155;
    color: #E2E8F0;
}
body.dark-mode .text-dark {
    color: #F8FAFC !important;
}
