/* =========================================
   MODERN WHITE UIVERSE COMMAND PALETTE
========================================= */

:root{
  --bg-base:#ffffff;
  --bg-soft:#f8fafc;
  --bg-card:#ffffff;
  --bg-glass:rgba(255,255,255,.75);

  --border:#e2e8f0;
  --border-soft:#edf2f7;

  --text-primary:#0f172a;
  --text-secondary:#475569;
  --text-muted:#64748b;

  --accent:#2563eb;
  --accent-light:#60a5fa;
  --accent-soft:rgba(37,99,235,.10);

  --purple:#7c3aed;
  --pink:#ec4899;

  --shadow-sm:0 4px 12px rgba(15,23,42,.04);
  --shadow-md:0 12px 30px rgba(15,23,42,.08);
  --shadow-lg:0 24px 60px rgba(15,23,42,.10);

  --radius:28px;
}

/* =========================================
   GLOBAL
========================================= */

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
  font-family:"DM Sans",sans-serif;

  background:
    radial-gradient(circle at top left,#dbeafe 0%,transparent 28%),
    radial-gradient(circle at bottom right,#ede9fe 0%,transparent 24%),
    var(--bg-base);

  color:var(--text-primary);

  overflow-x: hidden;
}



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

button,
input{
  font:inherit;
}

button{
  cursor:pointer;
  border:none;
}

/* =========================================
   APP LAYOUT
========================================= */

.app-shell{
  min-height:100vh;
}

.page-shell{
  width:min(1450px,100%);
  margin:auto;
  padding:30px 0 60px;
}

/* =========================================
   TOPBAR
========================================= */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;

  padding:20px 26px;

  background:rgba(255,255,255,.72);

  border:1px solid rgba(255,255,255,.9);

  backdrop-filter:blur(20px);

  border-radius:28px;

  box-shadow:var(--shadow-sm);

  position:sticky;
  top:20px;
  z-index:100;
}

.topbar-menu,
.action-btn{
  width:56px;
  height:56px;

  border-radius:18px;

  display:flex;
  align-items:center;
  justify-content:center;

  color:var(--text-primary);

  background:#fff;

  border:1px solid var(--border);

  box-shadow:var(--shadow-sm);

  transition:.3s ease;
}

.topbar-menu:hover,
.action-btn:hover{
  transform:translateY(-3px);
  border-color:#bfdbfe;
}

.topbar-brand{
  display:flex;
  align-items:center;
  gap:14px;

  font-weight:800;
  font-size:1.05rem;
}

.brand-icon{
  width:48px;
  height:48px;

  display:grid;
  place-items:center;

  border-radius:18px;

  color:#fff;

  background:linear-gradient(
    135deg,
    var(--accent),
    var(--purple)
  );

  box-shadow:
    0 10px 24px rgba(37,99,235,.25);
}

.topbar-search{
  flex:1;

  display:flex;
  align-items:center;
  gap:14px;

  padding:14px 18px;

  background:#fff;

  border:1px solid var(--border);

  border-radius:18px;

  box-shadow:var(--shadow-sm);
}

.topbar-search input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text-primary);
}

/* =========================================
   HERO SECTION
========================================= */

.main-content{
  display:grid;
  gap:40px;
  padding-top:34px;
}

.hero-panel{
  display:grid;
  grid-template-columns:1.2fr .9fr;
  gap:40px;
  align-items:center;
}

.hero-copy{
  display:grid;
  gap:22px;
}

.hero-badge,
.pill{
  width:fit-content;

  display:inline-flex;
  align-items:center;
  gap:10px;

  padding:12px 18px;

  border-radius:999px;

  background:#eff6ff;

  color:var(--accent);

  border:1px solid #bfdbfe;

  font-weight:600;
}

.hero h1{
  margin:0;

  font-size:clamp(3rem,5vw,5rem);
  line-height:1;

  letter-spacing:-2px;

  max-width:720px;
}

.hero p{
  margin:0;

  max-width:640px;

  color:var(--text-secondary);

  line-height:1.8;

  font-size:1.05rem;
}

.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
}

.hero-actions button{
  padding:16px 24px;
  border-radius:18px;
  font-weight:700;
  transition:.3s ease;
}

.primary-btn{
  color:#fff;

  background:linear-gradient(
    135deg,
    var(--accent),
    var(--purple)
  );

  box-shadow:
    0 12px 24px rgba(37,99,235,.22);
}

.outline-btn{
  background:#fff;
  color:var(--text-primary);

  border:1px solid var(--border);

  box-shadow:var(--shadow-sm);
}

.primary-btn:hover,
.outline-btn:hover{
  transform:translateY(-4px);
}

/* =========================================
   HERO PREVIEW
========================================= */

.palette-modal{
  border-radius:32px;

  padding:28px;

  background:rgba(255,255,255,.85);

  backdrop-filter:blur(20px);

  border:1px solid rgba(255,255,255,.9);

  box-shadow:var(--shadow-lg);
}

.palette-header{
  display:flex;
  align-items:center;
  justify-content:space-between;

  margin-bottom:18px;

  color:var(--text-secondary);
}

.palette-header kbd{
  padding:10px 14px;
  border-radius:12px;

  background:#fff;

  border:1px solid var(--border);

  box-shadow:var(--shadow-sm);
}

.palette-search-panel,
.preview-search{
  display:flex;
  align-items:center;
  gap:14px;

  padding:16px 18px;

  border-radius:20px;

  background:#fff;

  border:1px solid var(--border);

  box-shadow:var(--shadow-sm);
}

.palette-search-panel input,
.preview-search input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
}

/* =========================================
   COMPONENT GRID
========================================= */

.component-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:26px;
}

.component-card{
  position:relative;

  display:flex;
  flex-direction:column;

  padding:26px;

  border-radius:32px;

  background:rgba(255,255,255,.8);

  border:1px solid rgba(255,255,255,.95);

  backdrop-filter:blur(20px);

  box-shadow:var(--shadow-md);

  transition:.4s ease;

  overflow:hidden;
}

.component-card::before{
  content:"";

  position:absolute;
  inset:0;

  background:
    linear-gradient(
      135deg,
      rgba(96,165,250,.08),
      rgba(168,85,247,.04),
      transparent
    );

  opacity:0;

  transition:.4s ease;
}

.component-card:hover{
  transform:translateY(-12px);

  box-shadow:
    0 24px 60px rgba(37,99,235,.12);
}

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

.card-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;

  margin-bottom:16px;
}

.card-label{
  font-weight:800;
  font-size:1rem;
}

.tag{
  padding:8px 14px;
  border-radius:999px;

  background:#eff6ff;

  color:var(--accent);

  font-size:.82rem;
  font-weight:700;

  border:1px solid #bfdbfe;
}

.card-preview{
  margin:18px 0;

  padding:22px;

  border-radius:26px;

  background:#f8fafc;

  border:1px solid var(--border-soft);
}

.component-card p{
  color:var(--text-secondary);
  line-height:1.7;
}

/* =========================================
   COMMAND ROWS
========================================= */

.command-row,
.ai-suggestion,
.shortcut-row{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:12px;

  padding:14px 16px;

  border-radius:16px;

  background:#fff;

  border:1px solid transparent;

  transition:.25s ease;
}

.command-row:hover,
.ai-suggestion:hover{
  transform:translateX(4px);
  border-color:#dbeafe;
}

.command-row.active,
.ai-suggestion.active{
  background:#eff6ff;
  border-color:#bfdbfe;
}

.command-row kbd,
.shortcut-row kbd{
  padding:7px 10px;
  border-radius:10px;

  background:#fff;

  border:1px solid var(--border);

  font-size:.8rem;
}

/* =========================================
   BUTTONS
========================================= */

.card-actions{
  display:flex;
  gap:12px;
  margin-top:auto;
}

.card-actions button{
  flex:1;

  padding:14px 18px;

  border-radius:16px;

  font-weight:700;

  transition:.3s ease;
}

.card-actions button:first-child{
  color:#fff;

  background:linear-gradient(
    135deg,
    var(--accent),
    var(--purple)
  );
}

.card-actions button:last-child{
  background:#fff;

  border:1px solid var(--border);

  color:var(--text-primary);
}

.card-actions button:hover{
  transform:translateY(-3px);
}

/* =========================================
   FEATURES SECTION
========================================= */

.premium-features{
  padding:40px 0 10px;
}

.features-header{
  display:flex;
  justify-content:space-between;
  gap:20px;

  margin-bottom:32px;
}

.features-header h2{
  margin:0;

  font-size:clamp(2.2rem,4vw,3rem);

  letter-spacing:-1px;
}

.features-header p{
  max-width:560px;
  color:var(--text-secondary);
  line-height:1.7;
}

.feature-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}

.feature-card{
  position:relative;

  padding:30px;

  border-radius:28px;

  background:#fff;

  border:1px solid var(--border);

  box-shadow:var(--shadow-sm);

  overflow:hidden;

  transition:.35s ease;
}

.feature-card:hover{
  transform:translateY(-10px);

  box-shadow:
    0 24px 50px rgba(37,99,235,.10);
}

.feature-card i{
  width:64px;
  height:64px;

  display:grid;
  place-items:center;

  border-radius:22px;

  font-size:1.4rem;

  color:#fff;

  background:linear-gradient(
    135deg,
    var(--accent),
    var(--purple)
  );

  margin-bottom:18px;
}

.feature-card h3{
  margin:0 0 12px;
  font-size:1.2rem;
}

.feature-card p{
  margin:0;
  color:var(--text-secondary);
  line-height:1.7;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width:1130px){

  .hero-panel,
  .footer-inner,
  .component-grid,
  .feature-grid{
    grid-template-columns:1fr;
  }

}

@media (max-width: 900px) {
  .main-home {
    margin-left: 0;
    margin-top: 60px;
    width: 100%;
    max-width: 100% !important;
    padding: 0;
    gap: 32px;
  }
  
  .main-home section {
    width: 96vw;
    margin: 0 auto;
  }

  .hero-left, .hero-right {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .hero-title, .hero h1 {
    font-size: clamp(26px, 7vw, 42px) !important;
    letter-spacing: -1px !important;
    line-height: 1.15 !important;
    margin-bottom: 2rem !important;
  }

  .hero-desc, .hero > p {
    line-height: 1.6 !important;
  }
  
  .hero-stats {
    width: 100% !important;
  }

  .navbar {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 0 14px !important;
  }

  .menu-toggle {
    order: 1 !important;
    display: flex !important;
    flex-shrink: 0 !important;
    margin-right: 10px !important;
  }
 
  .navbar .logo {
    order: 2 !important;
    flex: 1 !important; 
    display: block !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
  }

  .search-bar {
    order: 3 !important;
    margin-left: auto !important;
    flex: 0 !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
  }

  .search-bar input,
  .search-kbd {
    display: none !important;
  }
 
  .search-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    color: var(--text-primary) !important;
  }

  .nav-right {
    order: 4 !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
  }

  .outline-nav-btn,
  .primary-nav-btn {
    display: none !important;
  }
  .theme-toggle {
    display: flex !important;
  }
 
  .search-bar.expanded {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 260px !important;
    height: 38px !important;
    border-radius: 40px !important;
    padding: 0 14px !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: visible !important;
  }
 
  .search-bar.expanded input {
    display: block !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
 
  .search-bar.expanded .search-icon {
    pointer-events: none !important;
  }

  .footer-links {
    gap: 2rem;
  }

}

@media (max-width: 480px) {

  .navbar { height: 54px !important; padding: 0 10px !important; }
  .navbar .logo { font-size: 15px !important; }

  .hero { padding: 28px 16px !important; }
  .hero-title, .hero h1 { font-size: clamp(22px, 7vw, 32px) !important; }

  .hero-stats {
    flex-direction: column !important;
    gap: 10px !important;
    border-radius: 12px !important;
    padding: 14px !important;
  }
  .stat { flex-direction: row !important; gap: 8px !important; padding: 0 !important; }
  .stat-divider { width: 50% !important; height: 1px !important; margin: 0 auto !important; }

  .hero-actions { flex-direction: column !important; align-items: stretch !important; }
  .btn-primary, .btn-ghost {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .categories-grid { grid-template-columns: repeat(2, 1fr) !important; }

  .footer-container { grid-template-columns: 1fr !important; }
  .newsletter-form { flex-direction: column !important; }
  .newsletter-form input, .newsletter-form button { width: 100% !important; }

  .cta-content h2 { font-size: 20px !important; }
}