/* CalcyAI - Tactile 3D / Playful Claymorphism Theme */

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

:root {
  /* Playful Color Palette */
  --bg-app: #F4F6F8; /* Soft cloud blue/gray */
  --bg-surface: #FFFFFF;
  --border: #E2E8F0;
  
  /* Text */
  --text-main: #0F172A;
  --text-muted: #64748B;
  
  /* Vibrant Chunky Colors */
  --primary: #6366F1; /* Indigo */
  --primary-shadow: #4338CA;
  --secondary: #10B981; /* Emerald */
  --secondary-shadow: #059669;
  --accent: #F43F5E; /* Rose */
  --warning: #F59E0B; /* Amber */
  
  /* 3D Shadows */
  --card-shadow: 0 8px 0 rgba(226, 232, 240, 0.8), 0 15px 20px rgba(0,0,0,0.04);
  --input-shadow: inset 0 3px 6px rgba(0,0,0,0.04);
  
  /* Layout */
  --sidebar-width: 280px;
  --max-content: 1000px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  /* Nunito gives that perfectly rounded, friendly, modern look */
  font-family: 'Nunito', system-ui, sans-serif; 
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

/* =========================================
   APP LAYOUT (SIDEBAR + MAIN)
   ========================================= */
.app-layout { display: flex; min-height: 100vh; }

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 3px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 3px solid var(--border);
}

.brand {
  display: flex; align-items: center; gap: 14px;
  font-weight: 900; font-size: 24px;
  letter-spacing: -0.02em; color: var(--text-main);
}

.brand-mark {
  width: 36px; height: 36px;
  background: var(--primary);
  color: white; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px; font-weight: 900;
  box-shadow: 0 4px 0 var(--primary-shadow);
  transform: rotate(-5deg);
}

.sidebar-body { padding: 24px 16px; overflow-y: auto; flex: 1; }

.nav-section-title {
  font-size: 14px; font-weight: 800; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px; padding-left: 12px;
  letter-spacing: 0.05em;
}

.nav-link {
  display: flex; align-items: center; padding: 12px 16px;
  border-radius: 16px; color: var(--text-muted);
  font-weight: 700; transition: all 0.2s;
  margin-bottom: 8px; border: 2px solid transparent;
}

.nav-link:hover {
  background: var(--bg-app); color: var(--text-main);
  transform: translateX(4px);
}

.nav-link.active {
  background: #EEF2FF; color: var(--primary);
  border: 2px solid #C7D2FE;
  box-shadow: 0 4px 0 #C7D2FE;
}

/* Main Content */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.mobile-header {
  display: none; padding: 16px 20px; background: var(--bg-surface);
  border-bottom: 3px solid var(--border); align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 30;
}

.content-container { max-width: var(--max-content); margin: 0 auto; width: 100%; padding: 40px; flex: 1; }

/* =========================================
   COMPONENTS (3D Cards & Inputs)
   ========================================= */
.card {
  background: var(--bg-surface);
  border: 3px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
  padding: 32px;
  position: relative;
}

.page-header { margin-bottom: 36px; text-align: center; }
.page-title { font-size: 44px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 12px; color: var(--text-main); }
.page-subtitle { color: var(--text-muted); font-size: 18px; font-weight: 600; max-width: 600px; margin: 0 auto; }

/* Forms */
.field { display: block; margin-bottom: 24px; }
.field-label { display: block; font-size: 16px; font-weight: 800; margin-bottom: 10px; color: var(--text-main); }
.input, .select, .textarea {
  width: 100%; padding: 16px 20px;
  background: var(--bg-app);
  border: 3px solid var(--border);
  border-radius: 18px;
  color: var(--text-main); font-family: inherit; font-size: 18px; font-weight: 700;
  box-shadow: var(--input-shadow); transition: all 0.2s;
}
.input:focus, .select:focus { 
  outline: none; background: #fff;
  border-color: var(--primary); 
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); 
}

/* =========================================
   BUTTONS (The "Push Down" Tactile Effect)
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; font-weight: 800; font-size: 18px;
  border-radius: 18px; cursor: pointer; border: none; 
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0); gap: 8px;
}

.btn-primary { 
  background: var(--primary); color: white; 
  box-shadow: 0 6px 0 var(--primary-shadow);
}
.btn-primary:active { transform: translateY(6px); box-shadow: 0 0 0 var(--primary-shadow); }

.btn-secondary { 
  background: var(--secondary); color: white; 
  box-shadow: 0 6px 0 var(--secondary-shadow);
}
.btn-secondary:active { transform: translateY(6px); box-shadow: 0 0 0 var(--secondary-shadow); }

.btn-ghost { 
  background: var(--bg-surface); color: var(--text-muted);
  border: 3px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}
.btn-ghost:active { transform: translateY(4px); box-shadow: 0 0 0 var(--border); }

.btn-small { padding: 10px 20px; font-size: 15px; border-radius: 14px; box-shadow: 0 4px 0 var(--primary-shadow); }
.btn-small:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
#embedBtn { box-shadow: 0 4px 0 var(--border); }

.badge {
  display: inline-flex; padding: 8px 16px; font-weight: 800;
  background: #EEF2FF; color: var(--primary); border: 2px solid #C7D2FE;
  border-radius: 99px; font-size: 14px; letter-spacing: 0.02em;
}

/* =========================================
   TOOL PAGE (SPLIT PANE)
   ========================================= */
.tool-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
.tool-actions { display: flex; gap: 16px; margin-top: 32px; padding-top: 32px; border-top: 3px dashed var(--border); }

/* Sticky Result Pane */
.result-pane { 
  position: sticky; top: 40px; 
  background: #F8FAFC; border: 4px solid var(--primary);
  box-shadow: 0 8px 0 rgba(99, 102, 241, 0.2);
}
.result-pane .card-title { 
  font-size: 20px; font-weight: 900; color: var(--primary);
  border-bottom: 3px solid var(--border); padding-bottom: 16px; margin-bottom: 24px; 
  display: flex; justify-content: space-between; align-items: center; 
}

.kv { display: flex; flex-direction: column; gap: 16px; }
.kv-row { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 2px dashed var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-key { font-weight: 700; font-size: 16px; color: var(--text-muted); }
.kv-val { font-weight: 900; font-size: 24px; color: var(--text-main); text-align: right; }

/* Viral Action Bar */
.viral-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 3px dashed var(--border); }

/* =========================================
   GRID & SEO SECTIONS
   ========================================= */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.tool-tile {
  background: var(--bg-surface); border: 3px solid var(--border); border-radius: 24px; padding: 28px;
  box-shadow: 0 6px 0 var(--border); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; cursor: pointer; position: relative;
  top: 0;
}
.tool-tile:hover { 
  border-color: var(--primary); box-shadow: 0 8px 0 var(--primary-shadow); top: -4px; 
}
.tile-title { font-weight: 800; font-size: 20px; margin-bottom: 8px; color: var(--text-main); }
.tile-desc { font-weight: 600; font-size: 15px; line-height: 1.5; flex: 1; color: var(--text-muted); }

.seo-section { margin-top: 72px; padding-top: 48px; border-top: 3px dashed var(--border); }
.seo-section h2 { font-size: 28px; font-weight: 900; margin-bottom: 28px; color: var(--text-main); }
.faq-item { 
  margin-bottom: 20px; border: 3px solid var(--border); border-radius: 20px; 
  padding: 24px; background: var(--bg-surface); box-shadow: 0 4px 0 var(--border); 
}
.faq-q { font-weight: 800; margin-bottom: 12px; font-size: 18px; color: var(--text-main); }
.faq-a { font-weight: 600; line-height: 1.7; color: var(--text-muted); font-size: 16px; }
.how-to-list { padding-left: 24px; font-weight: 600; line-height: 1.7; font-size: 16px; color: var(--text-muted); }
.how-to-list li { margin-bottom: 12px; }

/* Ad Zones */
.ad-zone {
  background: #F8FAFC; border: 3px dashed #CBD5E1;
  display: flex; align-items: center; justify-content: center;
  color: #94A3B8; font-size: 14px; font-weight: 800; text-transform: uppercase;
  border-radius: 20px; margin: 40px 0;
}
.ad-leaderboard { width: 100%; height: 90px; }
.ad-square { width: 100%; height: 250px; }

/* Mobile */
@media (max-width: 900px) { .tool-split { grid-template-columns: 1fr; } .result-pane { position: static; margin-top: 32px; } }
@media (max-width: 768px) { .app-sidebar { display: none; } .mobile-header { display: flex; } .content-container { padding: 20px; } }
/* =========================================
   LANDING PAGE (HERO SECTION)
   ========================================= */
   .hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #818CF8 100%);
    border-radius: 32px;
    padding: 64px 40px;
    text-align: center;
    color: white;
    margin-bottom: 48px;
    border: 4px solid var(--border);
    box-shadow: 0 12px 0 var(--primary-shadow), inset 0 4px 20px rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
  }
  
  .hero-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 0 rgba(0,0,0,0.1);
  }
  
  .hero-subtitle {
    font-size: 20px;
    font-weight: 600;
    max-width: 600px;
    margin: 0 auto 36px auto;
    opacity: 0.9;
  }
  
  .hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Special Hero Buttons */
  .btn-hero-primary {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
  }
  .btn-hero-primary:hover {
    background: #F8FAFC;
  }
  .btn-hero-primary:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 rgba(0,0,0,0.1);
  }
  
  .btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 3px solid white;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
  }
  .btn-hero-secondary:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 rgba(0,0,0,0.15);
  }
  
  /* Trust Badges */
  .trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    border-top: 2px dashed rgba(255,255,255,0.3);
    padding-top: 32px;
  }
  
  .trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
  }
  
  @media (max-width: 768px) {
    .hero-section { padding: 40px 24px; border-radius: 24px; }
    .hero-title { font-size: 40px; }
    .trust-badges { flex-direction: column; gap: 16px; align-items: center; }
  }
  /* =========================================
   AI MAGIC FEATURES
   ========================================= */
.magic-prompt-container { 
  display: flex; gap: 12px; max-width: 700px; margin: 0 auto; margin-top: 32px; 
}
.magic-input { 
  border: 3px solid rgba(255,255,255,0.5); 
  background: rgba(255,255,255,0.95); 
  font-size: 18px; padding: 18px 24px; border-radius: 20px; 
  box-shadow: 0 8px 32px rgba(0,0,0,0.15); flex: 1;
}
.magic-input:focus { border-color: var(--bg-surface); }

.ai-action-plan { 
  margin-top: 24px; padding: 24px; 
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); 
  border: 3px dashed var(--primary); border-radius: 24px; 
  animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.ai-action-plan h4 { 
  color: var(--primary); font-weight: 900; font-size: 20px; 
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px; 
}
.ai-plan-text { color: var(--text-main); font-weight: 700; line-height: 1.6; font-size: 16px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .magic-prompt-container { flex-direction: column; }
}