:root{
  --bg: #f3f6f9;
  --panel: #ffffff;
  --muted: #6b7280;
  --accent: #0f7a75;
  --accent-2: #ff7a66;
  --glass: rgba(255,255,255,0.6);
  --shadow: 0 6px 18px rgba(16,24,40,0.06);
  --radius: 12px;
  --mono: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--mono);
  background:linear-gradient(180deg,var(--bg),#eef3f7);
  color:#0b1220;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* LANDING PAGE */
.landing-page{min-height:100vh;display:flex;flex-direction:column}

.landing-header{
  height:64px;
  display:flex;
  align-items:center;
  padding:12px 40px;
  background:rgba(255,255,255,0.5);
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(15,23,42,0.04);
  position:sticky;
  top:0;
  z-index:100;
}
.header-content{
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
  max-width:1400px;
  margin:0 auto;
}
.logo-brand{display:flex;align-items:center;gap:12px;font-weight:600;font-size:18px}
.logo-icon{font-size:24px}
.launch-btn{
  padding:8px 18px;
  border-radius:8px;
  border:1px solid rgba(15,23,42,0.06);
  background:rgba(255,255,255,0.8);
  cursor:pointer;
  font-family:inherit;
  transition:all .3s ease;
  font-weight:500;
}
.launch-btn:hover{
  background:var(--accent);
  color:white;
  border-color:var(--accent);
}

.hero{
  flex:1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  padding:80px 40px;
  max-width:1400px;
  margin:0 auto;
  width:100%;
  align-items:center;
}
.hero-content{animation:slideInLeft .8s cubic-bezier(.2,.9,.3,1)}
.hero-content h2{
  font-size:48px;
  line-height:1.2;
  margin:0 0 20px;
  font-weight:700;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.hero-content p{
  font-size:18px;
  color:var(--muted);
  line-height:1.6;
  margin:0 0 32px;
  max-width:480px;
}

.cta-button{
  padding:16px 32px;
  font-size:16px;
  font-weight:600;
  border:0;
  border-radius:10px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:white;
  cursor:pointer;
  font-family:inherit;
  transition:all .3s cubic-bezier(.2,.9,.3,1);
  box-shadow:0 8px 24px rgba(15,122,117,0.3);
}
.cta-button:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 36px rgba(15,122,117,0.4);
}
.cta-button:active{
  transform:translateY(0);
}

.cta-button-large{
  padding:18px 48px;
  font-size:18px;
  font-weight:600;
  border:0;
  border-radius:12px;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:white;
  cursor:pointer;
  font-family:inherit;
  transition:all .3s cubic-bezier(.2,.9,.3,1);
  box-shadow:0 12px 32px rgba(15,122,117,0.3);
}
.cta-button-large:hover{
  transform:translateY(-3px);
  box-shadow:0 16px 40px rgba(15,122,117,0.4);
}

.hero-visual{animation:slideInRight .8s cubic-bezier(.2,.9,.3,1)}
.demo-card{
  background:linear-gradient(180deg,rgba(255,255,255,0.9),rgba(250,250,252,0.9));
  border-radius:16px;
  padding:24px;
  box-shadow:0 20px 50px rgba(16,24,40,0.1);
  border:1px solid rgba(255,255,255,0.5);
  animation:float 3s ease-in-out infinite;
}
@keyframes float{
  0%, 100%{transform:translateY(0)}
  50%{transform:translateY(-12px)}
}

.demo-header{
  display:flex;
  gap:8px;
  margin-bottom:20px;
}
.demo-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(15,23,42,0.06);
}

.demo-content{display:flex;flex-direction:column;gap:8px}
.demo-line{
  height:8px;
  background:linear-gradient(90deg,rgba(15,122,117,0.1),rgba(255,122,102,0.05));
  border-radius:4px;
}
.demo-line.short{width:60%}

.features{
  padding:100px 40px;
  background:rgba(255,255,255,0.3);
}
.features h3{
  font-size:40px;
  text-align:center;
  margin:0 0 60px;
  font-weight:700;
}

.features-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:32px;
  max-width:1400px;
  margin:0 auto;
}

.feature-card{
  padding:32px 24px;
  border-radius:16px;
  background:rgba(255,255,255,0.7);
  border:1px solid rgba(15,23,42,0.05);
  text-align:center;
  transition:all .3s ease;
  animation:fadeInUp .6s ease both;
}
.feature-card:nth-child(1){animation-delay:.1s}
.feature-card:nth-child(2){animation-delay:.2s}
.feature-card:nth-child(3){animation-delay:.3s}
.feature-card:nth-child(4){animation-delay:.4s}
.feature-card:nth-child(5){animation-delay:.5s}
.feature-card:nth-child(6){animation-delay:.6s}

.feature-card:hover{
  transform:translateY(-8px);
  box-shadow:0 20px 50px rgba(16,24,40,0.1);
  background:rgba(255,255,255,0.95);
}

.feature-icon{
  font-size:48px;
  margin-bottom:16px;
}
.feature-card h4{
  font-size:18px;
  font-weight:600;
  margin:0 0 12px;
}
.feature-card p{
  font-size:14px;
  color:var(--muted);
  line-height:1.6;
  margin:0;
}

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

@keyframes slideInLeft{
  from{
    opacity:0;
    transform:translateX(-40px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}

@keyframes slideInRight{
  from{
    opacity:0;
    transform:translateX(40px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}

.showcase{
  padding:100px 40px;
}
.showcase h3{
  font-size:40px;
  text-align:center;
  margin:0 0 60px;
  font-weight:700;
}

.showcase-content{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  max-width:1400px;
  margin:0 auto;
  align-items:center;
}

.showcase-image{
  animation:slideInLeft .8s cubic-bezier(.2,.9,.3,1);
}

.browser-frame{
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,0.7);
  border:1px solid rgba(15,23,42,0.1);
  box-shadow:0 20px 50px rgba(16,24,40,0.15);
}

.browser-header{
  height:40px;
  background:linear-gradient(90deg,#f3f6f9,#eef3f7);
  border-bottom:1px solid rgba(15,23,42,0.06);
  display:flex;
  align-items:center;
  padding:0 16px;
  gap:12px;
}
.browser-buttons{
  display:flex;
  gap:8px;
}
.browser-buttons span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(15,23,42,0.1);
}
.browser-url{
  margin-left:auto;
  font-size:13px;
  color:var(--muted);
  font-weight:500;
}

.browser-content{
  padding:16px;
  display:grid;
  grid-template-columns:120px 1fr 200px;
  gap:12px;
  min-height:300px;
  background:linear-gradient(180deg,rgba(255,255,255,0.9),rgba(250,250,252,0.9));
}

.sidebar-preview{display:flex;flex-direction:column;gap:8px}
.item{
  height:32px;
  background:linear-gradient(90deg,rgba(15,122,117,0.05),transparent);
  border-radius:8px;
  animation:pulse 2s ease-in-out infinite;
}
.item:nth-child(2){animation-delay:.3s}
.item:nth-child(3){animation-delay:.6s}

@keyframes pulse{
  0%, 100%{opacity:0.6}
  50%{opacity:1}
}

.main-preview{display:flex;flex-direction:column;gap:12px}
.card{
  height:60px;
  background:linear-gradient(180deg,rgba(255,255,255,0.9),rgba(250,250,252,0.9));
  border:1px solid rgba(15,23,42,0.04);
  border-radius:10px;
  animation:pulse 2s ease-in-out infinite;
}
.card:nth-child(2){animation-delay:.3s}

.editor-preview{display:flex;flex-direction:column;gap:8px;padding:12px;background:rgba(15,122,117,0.05);border-radius:8px}
.editor-line{
  height:6px;
  background:rgba(15,122,117,0.2);
  border-radius:3px;
}
.editor-line:last-child{width:80%}

.showcase-text{animation:slideInRight .8s cubic-bezier(.2,.9,.3,1)}
.showcase-text h4{
  font-size:28px;
  font-weight:700;
  margin:0 0 16px;
}
.showcase-text p{
  font-size:16px;
  color:var(--muted);
  line-height:1.6;
  margin:0 0 24px;
}

.feature-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.feature-list li{
  padding:8px 0;
  padding-left:28px;
  position:relative;
  color:var(--muted);
  font-size:15px;
}
.feature-list li:before{
  content:'✓';
  position:absolute;
  left:0;
  color:var(--accent);
  font-weight:700;
}

.cta-section{
  padding:120px 40px;
  text-align:center;
  background:linear-gradient(135deg,rgba(15,122,117,0.05),rgba(255,122,102,0.03));
}
.cta-section h3{
  font-size:44px;
  font-weight:700;
  margin:0 0 16px;
}
.cta-section p{
  font-size:18px;
  color:var(--muted);
  margin:0 0 32px;
}

.landing-footer{
  padding:32px 40px;
  text-align:center;
  border-top:1px solid rgba(15,23,42,0.04);
  color:var(--muted);
  font-size:14px;
}

/* APP PAGE */
.app-page{
  height:100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  height:64px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:12px 20px;
  background:rgba(255,255,255,0.6);
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(15,23,42,0.04);
  flex-wrap:wrap;
}
.brand{display:flex;align-items:center;gap:12px}
.brand h1{font-size:18px;margin:0;font-weight:600}

.search-wrap{flex:1;display:flex;justify-content:center;min-width:200px}
.search{
  width:60%;
  max-width:640px;
  min-width:220px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,0.06);
  background:transparent;
  outline:none;
  transition:box-shadow .18s ease, transform .12s ease;
  font-family:inherit;
}
.search:focus{box-shadow:0 6px 18px rgba(15,23,42,0.06);transform:translateY(-1px)}

.controls{display:flex;gap:8px;align-items:center}
.icon-btn{background:transparent;border:0;padding:8px;border-radius:8px;cursor:pointer;font-size:16px;transition:background .18s}
.icon-btn:hover{background:rgba(15,23,42,0.04)}
.ghost{background:transparent;border:1px solid rgba(15,23,42,0.06);padding:8px 12px;border-radius:8px;cursor:pointer;transition:all .18s;font-family:inherit}
.ghost:hover{border-color:rgba(15,23,42,0.12);background:rgba(15,23,42,0.02)}
.small{padding:6px 8px;border-radius:8px;font-family:inherit;cursor:pointer;border:1px solid rgba(15,23,42,0.06);background:transparent;transition:all .18s}
.small:hover{background:rgba(15,23,42,0.04)}

.layout{display:grid;grid-template-columns:260px 1fr 420px;gap:18px;padding:18px;align-items:start;flex:1;overflow:auto}
.sidebar{background:var(--panel);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow);height:calc(100vh - 120px);overflow:auto}
.notes-pane{height:calc(100vh - 120px);overflow:auto}
.editor-pane{background:var(--panel);border-radius:var(--radius);padding:12px;box-shadow:var(--shadow);height:calc(100vh - 120px);display:flex;flex-direction:column}

.sidebar-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.notebook-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.notebook-list li{padding:8px;border-radius:8px;cursor:pointer;color:var(--muted);display:flex;justify-content:space-between;align-items:center;transition:all .18s}
.notebook-list li:hover{background:rgba(15,23,42,0.04)}
.notebook-list li.active{background:linear-gradient(90deg,rgba(15,122,117,0.06),rgba(255,122,102,0.03));color:var(--accent);font-weight:600}

.tag-cloud{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.tag{background:rgba(15,23,42,0.06);padding:6px 8px;border-radius:999px;font-size:13px;color:var(--muted);cursor:pointer;transition:all .18s;user-select:none}
.tag:hover{background:rgba(15,23,42,0.1)}
.tag.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:white}

.notes-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.notes-list{display:grid;gap:12px}
.notes-list.grid-view{grid-template-columns:repeat(2,1fr)}
.notes-list.list-view{grid-template-columns:1fr}
.note-card{
  background:linear-gradient(180deg,rgba(255,255,255,0.9),rgba(250,250,252,0.9));
  padding:14px;border-radius:12px;cursor:pointer;box-shadow:0 6px 18px rgba(16,24,40,0.04);
  transition:transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .18s;
  min-height:110px;display:flex;flex-direction:column;gap:8px;
}
.note-card:hover{transform:translateY(-6px);box-shadow:0 18px 40px rgba(16,24,40,0.08)}
.note-meta{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.note-title{font-weight:600;flex:1}
.note-time{font-size:12px;white-space:nowrap}
.note-body{color:var(--muted);font-size:14px;flex:1;overflow:hidden}
.note-tags{display:flex;gap:6px;flex-wrap:wrap}
.note-tags .tag{font-size:12px;padding:4px 6px}

.editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.title-input{font-size:18px;padding:8px;border:0;outline:none;font-weight:600;width:60%;font-family:inherit}
.tags-input{padding:8px;border-radius:8px;border:1px solid rgba(15,23,42,0.06);font-family:inherit;flex:1;min-width:150px}
.editor-toolbar-actions{display:flex;gap:8px;align-items:center;flex:1}
.editor-body{display:flex;gap:12px;margin-top:12px;flex:1;min-height:320px}
.editor-text{flex:1;padding:12px;border-radius:10px;border:1px solid rgba(15,23,42,0.04);resize:none;min-height:300px;font-family:inherit}
.preview{flex:1;padding:12px;border-radius:10px;border:1px dashed rgba(15,23,42,0.04);background:linear-gradient(180deg,rgba(255,255,255,0.6),transparent);overflow:auto;font-size:14px}
.preview h1,.preview h2,.preview h3{margin:12px 0 8px;line-height:1.4}
.preview h1{font-size:24px}
.preview h2{font-size:20px}
.preview h3{font-size:16px}
.preview p{margin:8px 0}
.preview ul{margin:8px 0;padding-left:20px}
.preview li{margin:4px 0}
.preview pre{background:rgba(15,23,42,0.04);padding:12px;border-radius:8px;overflow:auto;margin:8px 0}
.preview code{font-family:monospace;font-size:13px}
.preview blockquote{border-left:4px solid var(--accent);padding-left:12px;margin:8px 0;color:var(--muted);font-style:italic}
.preview a{color:var(--accent);text-decoration:none}
.preview a:hover{text-decoration:underline}
.preview del{color:var(--muted);text-decoration:line-through}
.editor-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:12px}
.editor-buttons{display:flex;gap:8px}
.primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:white;padding:8px 12px;border-radius:8px;border:0;cursor:pointer;font-family:inherit;transition:opacity .18s}
.primary:hover{opacity:.9}
.danger{background:#fff0f0;border:1px solid #ffd6d6;padding:8px 12px;border-radius:8px;color:#b91c1c;cursor:pointer;font-family:inherit;transition:all .18s}
.danger:hover{background:#ffe6e6}

.modal{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1000;align-items:center;justify-content:center;animation:fadeIn .18s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal-content{background:var(--panel);border-radius:var(--radius);max-width:600px;width:90%;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 18px 60px rgba(16,24,40,0.2)}
.modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid rgba(15,23,42,0.04)}
.modal-header h2{margin:0;font-size:18px}
.modal-body{overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:20px}
.shortcut-group h3{margin:0 0 12px;font-size:14px;font-weight:600;color:var(--accent)}
.shortcut{display:flex;gap:12px;align-items:center;padding:6px 0;font-size:14px}
.shortcut code{background:rgba(15,23,42,0.04);padding:4px 8px;border-radius:4px;font-family:monospace;white-space:nowrap;font-weight:600}
.shortcut span{color:var(--muted)}

.fab{
  position:fixed;right:28px;bottom:28px;width:64px;height:64px;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:white;border:0;font-size:28px;box-shadow:0 12px 30px rgba(15,23,42,0.18);cursor:pointer;
  display:flex;align-items:center;justify-content:center;font-family:inherit;transition:transform .18s;z-index:100;
}
.fab:hover{transform:scale(1.08)}

@media(max-width:1200px){
  .layout{grid-template-columns:240px 1fr;grid-template-rows:auto 1fr}
  .editor-pane{grid-column:1 / -1}
  .notes-list.grid-view{grid-template-columns:repeat(2,1fr)}
  .hero{grid-template-columns:1fr;gap:40px}
  .showcase-content{grid-template-columns:1fr}
}

@media(max-width:900px){
  .layout{grid-template-columns:200px 1fr}
  .search-wrap{min-width:120px}
  .notes-list.grid-view{grid-template-columns:1fr}
  .features-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
}

@media(max-width:700px){
  .search{width:100%}
  .layout{grid-template-columns:1fr;gap:12px}
  .sidebar{height:auto;margin-bottom:12px}
  .notes-pane{height:auto}
  .editor-pane{height:auto}
  .editor-toolbar{flex-direction:column;align-items:stretch}
  .title-input{width:100%}
  .editor-body{flex-direction:column}
  .editor-text,.preview{min-height:200px}
  .editor-toolbar-actions{flex-direction:column}
  .tags-input{width:100%}
  .hero{padding:40px 20px}
  .hero-content h2{font-size:36px}
  .features{padding:60px 20px}
  .features h3{font-size:32px;margin-bottom:40px}
  .showcase{padding:60px 20px}
  .showcase h3{font-size:32px;margin-bottom:40px}
  .showcase-content{gap:40px}
  .cta-section{padding:60px 20px}
  .cta-section h3{font-size:32px}
  .landing-header{padding:12px 20px}
  .header-content{gap:12px}
}

:root.dark{
  --bg:#0b1220;
  --panel:#0f1724;
  --muted:#9aa4b2;
  --accent:#2dd4bf;
  --accent-2:#ff7a66;
  --glass:rgba(255,255,255,0.04);
  background:linear-gradient(180deg,#07101a,#07121a);
  color:#e6eef3;
}
:root.dark .search{border:1px solid rgba(255,255,255,0.06);background:rgba(255,255,255,0.02)}
:root.dark .note-card{background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));box-shadow:0 6px 18px rgba(2,6,23,0.6)}
:root.dark .preview{border-color:rgba(255,255,255,0.04);background:rgba(255,255,255,0.01)}
:root.dark .editor-text{border-color:rgba(255,255,255,0.04);background:rgba(255,255,255,0.01)}
:root.dark .preview code{background:rgba(255,255,255,0.06)}
:root.dark .modal-content{background:var(--panel);color:var(--muted)}
:root.dark .modal-header{border-bottom-color:rgba(255,255,255,0.04)}
:root.dark .icon-btn:hover{background:rgba(255,255,255,0.06)}
:root.dark .small:hover{background:rgba(255,255,255,0.06)}
:root.dark .ghost:hover{background:rgba(255,255,255,0.06);border-color:rgba(255,255,255,0.12)}
:root.dark .notebook-list li:hover{background:rgba(255,255,255,0.04)}
:root.dark .tag:hover{background:rgba(255,255,255,0.1)}
:root.dark .feature-card{background:rgba(15,23,42,0.4);border-color:rgba(255,255,255,0.05)}
:root.dark .feature-card:hover{background:rgba(15,23,42,0.6)}
:root.dark .launch-btn{background:rgba(255,255,255,0.05);border-color:rgba(255,255,255,0.06)}
:root.dark .browser-frame{background:rgba(15,23,42,0.4);border-color:rgba(255,255,255,0.05)}
:root.dark .browser-content{background:linear-gradient(180deg,rgba(15,23,42,0.3),rgba(15,23,42,0.2))}
:root.dark .browser-header{background:linear-gradient(90deg,rgba(15,23,42,0.4),rgba(15,23,42,0.3))}
:root.dark .demo-card{background:linear-gradient(180deg,rgba(15,23,42,0.3),rgba(15,23,42,0.2))}
/* GitHub Link */
        .github-link {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 100;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #333;
            border-radius: 50%;
            transition: all 0.3s ease;
            text-decoration: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .github-link:hover {
            background: #555;
            transform: scale(1.15);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        }

        .github-link svg {
            width: 28px;
            height: 28px;
            fill: white;
        }
