/* ===== Full-viewport Frosted Notes (toolbar responsive + scrollbar polish) ===== */

.hidden { display: none !important; }

:root{
  --header-height:72px;
  --bg: #f4f7f8;
  --surface: rgba(255,255,255);
  --surface-strong: rgba(255,255,255,0.76);
  --muted: #6b7280;
  --text: #0f1724;
  --accent: #4fb3b3;
  --border: rgba(15,23,36,0.08);
  --paper-bg: rgba(255, 255, 255, 0.95);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(18,20,24,0.06);
  --gap: 20px;
  --toolbar-height:64px;
  --sidebar-width: 320px;
  --mobile-break: 1000px;
}

body.dark-mode{
  --bg: #071017;
  --surface: rgba(18,22,28);
  --surface-strong: rgba(24,28,34,0.62);
  --muted: #9aa6b2;
  --text: #e6eef1;
  --accent: #3fb0b0;
  --border: rgba(255,255,255,0.06);
  --paper-bg: rgba(24,28,34,0.86);
  --shadow: 0 14px 50px rgba(0,0,0,0.6);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* topbar */
.topbar{
  height:var(--header-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px calc(1.5 * var(--gap));
  border-bottom:1px solid var(--border);
  z-index: 50;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:40px;height:40px; padding: 0.3rem; border-radius:10px;background:var(--surface-strong);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--accent);box-shadow:var(--shadow);border:1px solid var(--border)}
.logosvg{stroke: var(--accent); stroke-width: 3.5rem;}
.brand-name{font-weight:700;font-size:16px}
.brand-sub{font-size:12px;color:var(--muted);margin-top:2px}
.icon-btn{transition: 200ms; border:1px solid var(--border);background:var(--surface);padding:8px 10px;border-radius:10px;cursor:pointer;margin-left:8px;color:var(--muted)}
.icon-btn:hover{transform:translateY(-1px);color:var(--text); border-color: var(--muted);}

/* hamburger */
.hamburger{display:none;background:transparent;border:none;padding:6px;margin-right:4px;cursor:pointer}
.hamburger span{display:block;width:20px;height:2px;background:var(--muted);margin:4px 0;border-radius:2px}

/* app area */
.app {
  margin: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  display: flex;
  gap: var(--gap);
  align-items: stretch;
  padding: 20px;
  overflow: hidden;
  box-sizing: border-box;
}


/* sidebar */
.sidebar{
  width: var(--sidebar-width);
  background:var(--surface);
  border-radius:12px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  height:100%;
  overflow:auto;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

/* mobile off-canvas */
.root.mobile-sidebar-open .sidebar{
  transform: translateX(0);
  position: fixed;
  left: 12px;
  top: calc(var(--header-height) + 12px);
  bottom: 12px;
  z-index: 120;
  width: min(86vw, 380px);
}
.sidebar { transform: translateX(0); }

/* overlay for mobile */
.mobile-overlay{ position: fixed; inset:0; background: rgba(0,0,0,0.35); z-index:110; backdrop-filter: blur(4px); transition: opacity 160ms ease; }

/* search & buttons */
.search-wrap{display:flex;align-items:center;gap:8px;background:transparent;padding:6px;border-radius:10px}
.search{border:none;background:transparent;outline:none;font-size:14px;color:var(--muted);width:100%}
.sidebar-actions{display:flex;gap:8px;margin-top:6px}
.btn{transition: 200ms; padding:8px 10px;border-radius:10px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-weight:600;display:inline-flex;align-items:center;gap:8px; color: var(--text);}
.btn.primary{background:linear-gradient(180deg,var(--surface-strong),var(--surface));color:var(--text)}
.btn.ghost{background:transparent}
.small{font-size:13px;color:var(--muted)}
.btn:hover{transform:translateY(-1px);color:var(--text); border: 1px solid var(--muted);}

/* notes list */
.note-list{overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:6px}
.note-item{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;cursor:pointer;align-items:flex-start;border:1px solid transparent;background:transparent}
.note-item:hover{background:rgba(0,0,0,0.02)}
.note-item.active{background:var(--surface-strong);border:1px solid var(--border);box-shadow:0 8px 20px rgba(0,0,0,0.04)}
.note-meta{flex:1;min-width:0}
.note-title{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.note-snippet{font-size:13px;color:var(--muted);margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* editor column */
.editor-area{flex:1;display:flex;flex-direction:column;height:100%;}
.paper-wrap{display:flex;flex-direction:column;height:100%}
.paper{
  border-radius:12px;overflow:hidden;border:1px solid var(--border);box-shadow:var(--shadow);display:flex;flex-direction:column;height:100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.paper :focus{outline: none;}

/* toolbar: default single-row (wide screens). On small screens it will stack into two rows */
.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border-bottom:1px solid var(--border);
  background:var(--surface);
  flex-wrap:wrap;
}

/* tools row is a group of buttons (wraps if needed) */
.tools-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex:1}
.tool-btn{transition: 200ms; background:transparent;border: 1px solid transparent;padding:8px;border-radius:8px;cursor:pointer;color:var(--muted);min-width:38px;display:inline-flex;align-items:center;justify-content:center}
.tool-btn:hover{transform:translateY(-1px);color:var(--text); border: 1px solid var(--muted);}
.tool-btn .fa{font-size:15px}
.tool-btn.active{ background: var(--accent); color: #fff; }

.title-row{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:12px}
.title-wrap{display:flex;align-items:center;padding:6px}
.note-title-input{border:1px solid var(--border);padding:8px 10px;border-radius:8px;background:var(--paper-bg);outline:none;font-weight:700;color:var(--text);min-width:220px;max-width:560px}

/* paper & editor */
.editor-wrapper{padding:20px;flex:1;display:flex;flex-direction:column;overflow:hidden}
.editor{line-height: normal; background:var(--paper-bg);border-radius:10px;flex:1;padding:28px;overflow:auto;box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);border:1px solid rgba(0,0,0,0.02);font-size:16px;min-height:200px}

/* heading styles */
.editor h1{font-size:2rem;margin:0 0 0 0}
.editor h2{font-size:1.65rem;margin:0 0 0 0}
.editor h3{font-size: 1.2rem;margin: 0 0 0 0;}
.editor p{margin:0 0 0 0}

/* lists: marker bold */
ol li::marker { font-weight:700; color: var(--muted); }
ul li::marker { font-weight:700; color: var(--muted); }

/* dash-list */
.dash-list{list-style:none;padding-left:18px;margin:0}
.dash-list li{position:relative;padding-left:18px;margin:6px 0}
.dash-list li::before{content:"-";position:absolute;left:0;top:0;color:var(--muted);font-weight:700}

/* statusbar */
.statusbar{display:flex;align-items:center;justify-content:space-between;padding:12px;border-top:1px solid var(--border);background:transparent}
.statusbar .hint{opacity:0.85}

/* empty state */
.empty-state{display:flex;align-items:center;justify-content:center;height:100%}
.empty-card{background:var(--surface-strong);border:1px solid var(--border);padding:28px;border-radius:12px;box-shadow:var(--shadow);text-align:center}
.empty-card h3{margin:0;font-size:18px}
.empty-card p{margin:8px 0 0 0;color:var(--muted)}

/* confirm modal */
.confirm-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,10,12,0.35);backdrop-filter:blur(6px);z-index:120}
.confirm-card{width:360px;background:var(--surface-strong);padding:18px;border-radius:12px;border:1px solid var(--border);box-shadow:0 20px 50px rgba(0,0,0,0.35)}
.confirm-title{font-weight:700;margin-bottom:8px}
.confirm-body{color:var(--muted);margin-bottom:16px}
.confirm-actions{display:flex;gap:8px;justify-content:flex-end}

/* settings overlay */
.settings-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(8,10,12,0.35);backdrop-filter:blur(6px);z-index:90}
.settings{width:420px;border-radius:12px;padding:18px;background:var(--surface-strong);border:1px solid var(--border);box-shadow:0 20px 50px rgba(0,0,0,0.25)}
.setting-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.shortcut-row{display:flex;align-items:center;gap:8px;justify-content:space-between}
.shortcut-input{padding:8px;border-radius:8px;background:transparent;border:1px solid var(--border);min-width:180px; color: var(--text);}

/* toggle */
.switch{position:relative;display:inline-block;width:50px;height:28px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#cfcfcf;transition:.25s;border-radius:28px}
.slider:before{position:absolute;content:"";height:20px;width:20px;left:4px;bottom:4px;background-color:white;transition:.25s;border-radius:50%}
.switch input:checked + .slider{background-color:var(--accent)}
.switch input:checked + .slider:before{transform:translateX(22px)}

/* scrollbars */

/* width */
::-webkit-scrollbar {
  width: 0;
}

/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: transparent;
}

/* responsive: when small, toolbar becomes two rows (tools then title) */
@media (max-width:1000px){
  .hamburger{display:inline-block}
  .app{padding:12px;height:calc(100vh - var(--header-height))}
  .sidebar{transform: translateX(-120%); position: fixed; left: 12px; top: calc(var(--header-height) + 12px); bottom: 12px; z-index:120; width: min(86vw, 380px);}
  .editor-area{margin-left:0;height:100%}
  .root.mobile-sidebar-open .mobile-overlay{display:block}
  .mobile-overlay{display:none}

  .toolbar{flex-direction:column; align-items:stretch; padding:10px}
  .title-row{justify-content:flex-end; margin-top:6px}
  .note-title-input{width:100%; max-width:100%}
  .note-list{max-height:calc(100vh - var(--header-height) - 220px)}
  .editor-wrapper{padding:14px}
  .editor{padding:18px}
}

.text-anim{padding: 2rem 0rem 0.5rem 0rem;}
.text-anim h3{color: var(--text); text-align: left; font-weight: 400; font-size: 1rem;}
.text-anim span{color: var(--text); text-align: left; font-weight: 400;}

.text-anim-settings{padding: 0rem 0rem;}
.text-anim-settings h3{color: var(--text); text-align: left; font-weight: 400; font-size: 1rem;}
.text-anim-settings span{color: var(--text); text-align: left; font-weight: 700;}

.text-mark{padding: 1rem 0rem 0.5rem 0rem;}
.text-mark h3{color: var(--text); text-align: left; font-weight: 400; font-size: 1rem;}

.text-mark-settings{padding: 0rem 0rem 1rem 0rem;}
.text-mark-settings h3{color: var(--text); text-align: left; font-weight: 400; font-size: 1rem;}

/* tighter line gap for selected blocks */
.tight-lines {
  line-height: 1.1 !important;
}


.footer{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  padding: 2rem 0rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin: 0;
}

.footer-heading{
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.footer-links{
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.footer-link{
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 200ms;
}

.footer-link:hover{
  color: var(--text);
  text-decoration: underline;
}

.footer p{
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}



/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-links {
    align-items: center;
  }
}



