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

:root {
    --bg: #f8f9fa; --header-bg: #ffffff; --footer-bg: #f1f5f9;
    --text: #0a192f; --text-light: #64748b; --primary: #0a192f; --accent: #c5a059; --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; line-height: 1.6; transition: opacity 0.3s ease; }
body.loading { overflow: hidden; opacity: 0; height: 100vh; }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary); font-weight: 600; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.flex-center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; }

#loader-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: linear-gradient(rgba(10, 25, 47, 0.95), rgba(10, 25, 47, 0.98)); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; }

#landing-page { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: linear-gradient(135deg, var(--primary) 0%, #1a365d 100%); z-index: 1000; color: white; overflow-y: auto; }
.landing-header { position: absolute; top: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 2rem; }
.landing-hero { text-align: center; padding: 2rem; margin-top: 50px; }
.giant-title { font-size: 4.5rem; color: white !important; letter-spacing: 4px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); margin-bottom: 10px; }
.subtitle { color: var(--accent) !important; margin-bottom: 20px; }
.landing-hero p { max-width: 600px; margin: 0 auto; color: #e2e8f0; }

#dashboard-watermark { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-size: cover; background-position: center; opacity: 0.15; z-index: -1; pointer-events: none; }

#auth-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(10, 25, 47, 0.85); z-index: 2000; display: flex; justify-content: center; align-items: center; }
#auth-modal .modal-content { background: #ffffff !important; color: #0a192f !important; padding: 2rem; border-radius: 12px; width: 90%; max-width: 420px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto; }
#auth-modal input { background: #f8fafc; color: #0a192f; border: 1px solid var(--border); }
.close-modal { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; width: auto; }

input, select, textarea { width: 100%; padding: 14px; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: 'Inter', sans-serif; outline: none; transition: border 0.3s; background: #fff; color: #000;}
input:focus, select:focus { border-color: var(--primary); }
button { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; font-family: 'Inter', sans-serif; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-logout { background: transparent; border: none; color: var(--text-light); width: auto; font-size: 0.9rem; cursor: pointer; }

.card { background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; box-shadow: 0 4px 20px rgba(10, 25, 47, 0.05); position: relative; z-index: 2; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; background-color: var(--header-bg); border-radius: 0 0 12px 12px; position: relative; z-index: 2; }
.app-nav { display: flex; gap: 1.5rem; margin-bottom: 3rem; border-bottom: 1px solid var(--border); padding: 0 2rem 10px 2rem; position: relative; z-index: 2; justify-content: center; flex-wrap: wrap; }
.app-nav button { width: auto; background: transparent; color: var(--text-light); border-radius: 0; border-bottom: 3px solid transparent; padding: 10px 0; margin-bottom: -11px; font-weight: 600; }
.app-nav button.active { color: var(--primary); border-bottom: 3px solid var(--primary); }

.carousel-container { display: flex; overflow-x: auto; gap: 1.5rem; padding: 1rem; scroll-snap-type: x mandatory; }
.carousel-card { min-width: 300px; flex: 0 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; scroll-snap-align: start; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.tool-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; cursor: pointer; transition: transform 0.2s; position: relative; z-index: 2; }
.tool-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.tool-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.dna-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; position: relative; z-index: 2; max-width: 900px; margin-left: auto; margin-right: auto; }
.dna-card { background: #fff; padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); border-top: 4px solid var(--accent); }
.tool-form { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin-top: 1.5rem; position: relative; z-index: 2; max-width: 600px; margin-left: auto; margin-right: auto; }
#chat-box { height: 260px; overflow-y: auto; background: #f8fafc; border: 1px solid var(--border); padding: 1rem; border-radius: 8px; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 10px; }

.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 8px; font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; }
.chat-bubble.user { align-self: flex-end; background: var(--primary); color: #fff; }
.chat-bubble.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text); }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.plan-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: left; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-align: center; position: relative; z-index: 2; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.85rem; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #f8fafc; font-weight: 600; }
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 5px; }
.site-footer { background-color: var(--footer-bg); padding: 3rem 2rem 2rem 2rem; margin-top: 4rem; border-top: 1px solid var(--border); text-align: center; border-radius: 12px 12px 0 0; color: var(--text-light); position: relative; z-index: 2; }

@media (max-width: 768px) {
    .app-header { flex-direction: column; gap: 1rem; text-align: center; }
    .giant-title { font-size: 2.5rem; }
    .subtitle { font-size: 1.2rem; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
}
