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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #2d3748;
    --text-muted: #718096;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f7fafc;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main) !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: #764ba2 !important;
}

.btn-login {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.4);
    color: white !important;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px;
    position: relative;
    background: radial-gradient(circle at top right, #fff1eb 0%, #ace0f9 100%);
    background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
    /* Mesh Gradient Fallback */
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(-15deg);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

h1.display-3 {
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #30cfd0 0%, #330867 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    line-height: 1.4;
    display: inline-block;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #4a5568;
}

/* Cards */
.activity-card {
    border: none !important;
    border-radius: 20px;
    background: white;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

.activity-card:hover::before {
    opacity: 1;
}

.date-badge {
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-outline-primary {
    border: 2px solid #764ba2;
    color: #764ba2;
    border-radius: 50px;
    font-weight: 600;
    padding: 8px 24px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

/* Animations */
.animate-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

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

/* Footer */
footer {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Admin Panel Overrides */
.bg-dark {
    background: #1a202c !important;
}

/* Sidebar Styles */
.sidebar-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: #f8f9fa;
    color: #764ba2;
    text-decoration: none;
}

.sidebar-link.active {
    background-color: #f1f5f9;
    color: #764ba2;
    border-left-color: #764ba2;
    font-weight: 600;
}

.sidebar-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}