/* Modern UI styling for KCU Portal */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --font-primary: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    touch-action: manipulation;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    touch-action: manipulation;
}

/* Prevent iOS Safari Auto-Zoom on Input Focus */
input, select, textarea, #search-input {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* Hide scrollbar for horizontal category scroller on mobile */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Headings & Titles: 500 */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    font-weight: 500 !important;
    letter-spacing: -0.01em;
}

.font-extrabold, .font-bold, .font-semibold {
    font-weight: 500 !important;
}

/* Body & Buttons & Content: 400 */
.font-medium, .font-normal, button, .btn, a, p, span, strong, b, label, input, select {
    font-weight: 400 !important;
}

.font-light {
    font-weight: 300 !important;
}

/* Glassmorphism Styles */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    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);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .glass-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Ambient Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.45;
    animation: blob-bounce 10s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    pointer-events: none;
}

.dark .blob {
    opacity: 0.25;
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, 40px) scale(1.1);
    }
}

/* Animated Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark .gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* Pulse Glow */
.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}
