/* ===== GLOBAL STYLES & VARIABLES ===== */
:root {
    --background-color: #0f172a;
    --surface-color-rgba: 30, 41, 59;
    --primary-color: #38bdf8;
    --secondary-color: #818cf8;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --font-family-body: 'Inter', sans-serif;
    --font-family-heading: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    background-size: 500px;
    animation: pan-background 120s linear infinite;
    z-index: -1;
}

@keyframes pan-background {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 3rem 0; }
h1, h2, h3 { font-family: var(--font-family-heading); color: var(--primary-color); line-height: 1.3; margin-bottom: 1rem; font-weight: 700; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; }
a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-color); }

/* ===== HEADER & NAVIGATION ===== */
.site-header { padding: 1rem 0; position: sticky; top: 0; z-index: 1001; background: rgba(var(--background-color), 0.8); backdrop-filter: blur(10px); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; padding: 0 5%; width: 100%; }
.site-logo { font-family: var(--font-family-heading); font-size: 1.8rem; font-weight: 700; color: var(--text-color); }
.main-nav { display: none; } /* Hidden on mobile */
.hamburger-menu { display: flex; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; cursor: pointer; z-index: 1100; }
.hamburger-menu .bar { width: 100%; height: 3px; background-color: var(--primary-color); border-radius: 2px; transition: all 0.3s ease; }

/* Mobile Menu Styles */
.mobile-nav { display: flex; flex-direction: column; align-items: center; justify-content: center; position: fixed; top: 0; left: 100%; width: 100%; height: 100%; background: rgba(var(--background-color), 0.95); backdrop-filter: blur(15px); transition: left 0.3s ease-in-out; z-index: 1000; }
.mobile-nav.is-open { left: 0; }
.mobile-nav ul { list-style-type: none; text-align: center; }
.mobile-nav li { margin: 2rem 0; }
.mobile-nav a { color: var(--text-color); font-size: 2rem; font-weight: 700; font-family: var(--font-family-heading); }
.hamburger-menu.is-open .bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger-menu.is-open .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.is-open .bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* ===== GLASSMORPHISM PANELS & CARDS ===== */
.glass-panel, .glass-card { background: rgba(var(--surface-color-rgba), 0.7); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 2rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }

/* ===== HOMEPAGE HERO SECTION ===== */
.hero { text-align: center; padding: 4rem 0; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem auto; color: var(--text-muted); }
.cta-button { display: inline-block; background: var(--secondary-color); color: white; padding: 1rem 2.5rem; border-radius: 50px; font-weight: 700; transition: transform 0.2s, box-shadow 0.2s; }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(129, 140, 248, 0.2); color: white; }

/* ===== BLOG & GALLERY GRID ===== */
.content-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.glass-card { padding: 0; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.glass-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); }
.glass-card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 1.5rem; }

/* ===== AUTHENTICATION PAGE STYLES ===== */
.auth-form-container { max-width: 450px; margin: 2rem auto; }
.auth-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 500; margin-bottom: 0.5rem; color: var(--text-muted); }
.form-group input { background-color: var(--background-color); color: var(--text-color); border: 1px solid #334155; border-radius: 8px; padding: 12px; font-family: var(--font-family); font-size: 1rem; }
.auth-form button { background: var(--secondary-color); color: white; padding: 1rem; border-radius: 8px; font-weight: 700; border: none; cursor: pointer; margin-top: 1rem; }
.auth-form p { text-align: center; color: var(--text-muted); }
.error-message { color: #ff5e78; background-color: rgba(228, 63, 90, 0.1); border: 1px solid #ff5e78; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; display: none; }

/* ===== DONATIONS PAGE STYLES ===== */
.donation-box { text-align: center; padding: 2.5rem; margin-bottom: 2rem; }
.donation-button { display: inline-block; background-color: var(--secondary-color); color: white; padding: 1rem 2.5rem; border-radius: 50px; font-weight: 700; font-size: 1.1rem; transition: transform 0.2s, box-shadow 0.2s; margin-top: 1rem; }
.donation-button:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(129, 140, 248, 0.2); color: white; }
.supporter-list { list-style-type: none; }
.supporter-item { display: flex; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid #334155; }
.supporter-item:last-child { border-bottom: none; }
.supporter-name { font-weight: 500; }
.supporter-amount { font-weight: 700; color: var(--primary-color); }

/* ===== FOOTER ===== */
.site-footer { text-align: center; padding: 3rem 0; margin-top: 3rem; border-top: 1px solid #334155; color: var(--text-muted); }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-section { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE DESIGN FOR DESKTOP ===== */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    .hamburger-menu { display: none; }
    .main-nav { display: block; }
    .main-nav ul { display: flex; list-style-type: none; gap: 2rem; }
    .main-nav a { color: var(--text-muted); font-weight: 500; padding: 0.5rem 0; position: relative; }
    .main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: var(--secondary-color); transform: scaleX(0); transition: transform 0.3s ease; }
    .main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
    .main-nav a.active { color: var(--text-color); }
    .content-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* ===== AI ASSISTANT PAGE STYLES ===== */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 450px; background-color: rgba(var(--surface-color-rgba), 0.7); backdrop-filter: blur(20px); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1); padding: 1rem; }
.chat-log { flex-grow: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 15px; }
.message { max-width: 85%; padding: 12px 18px; border-radius: 18px; line-height: 1.6; word-wrap: break-word; }
.user-message { background-color: var(--primary-color); color: #0f172a; align-self: flex-end; }
.model-message { background-color: #334155; align-self: flex-start; }
.input-area { display: flex; gap: 10px; align-items: flex-end; padding-top: 1rem; border-top: 1px solid #334155; }
textarea { flex-grow: 1; min-height: 52px; background-color: var(--background-color); color: var(--text-color); border: 1px solid #334155; border-radius: 12px; padding: 15px; font-size: 16px; resize: vertical; font-family: var(--font-family-body); }
.button-container { display: flex; gap: 10px; align-items: center; height: 52px; }
#submit-button { background-color: var(--secondary-color); width: 52px; height: 52px; border: none; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#clear-button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; }