/* =========================
   NOTES SIDEBAR BASE (UPGRADED)
========================= */
#notes-sidebar {
    position: fixed;
    top: 0;
    right: -660px;
    width: min(630px, 92vw);
    height: 100vh;

    background:
        linear-gradient(180deg, rgba(22, 30, 39, 0.96), rgba(17, 24, 31, 0.98)),
        #11181f;
    backdrop-filter: blur(12px);

    color: #f7fafc;
    padding: 18px 18px calc(96px + env(safe-area-inset-bottom));
    overflow-y: auto;

    transition: right 0.35s ease;
    z-index: 1000002;

    box-shadow: -16px 0 36px rgba(2, 8, 23, 0.38);
    border-left: 1px solid rgba(148, 163, 184, 0.22);
}

/* open sidebar */
#notes-sidebar.active {
    right: 0;
}

/* =========================
   HEADER
========================= */

#notes-sidebar h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
}

.notes-header {
    position: sticky;
    top: -18px;
    z-index: 2;
    margin: -18px -18px 14px;
    padding: 14px 18px !important;
    background: rgba(15, 23, 31, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 8px 20px rgba(2, 8, 23, 0.18);
}

/* =========================
   NOTE LIST ITEM
========================= */

.note-item {
    margin-bottom: 10px;
}

/* =========================
   NOTE CARD (UPGRADED)
========================= */

.note-card {
    position: relative;
    background: #f8fafc;
    color: #1f2937;
    margin-bottom:5px;
    padding: 12px 12px 10px;
    border-radius: 8px;

    font-size: 13px;

    border: 1px solid rgba(203, 213, 225, 0.92);
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
/*
.note-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 12px 24px rgba(2, 8, 23, 0.24);
}
*/
/* =========================
   NOTE CONTENT
========================= */

.note-post {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 11px; 
    font-family: "Baloo 2";
    font-weight: 700;
    line-height: 1.35;
}

.note-text {
    color: #374151;
    font-size: 14px;
    line-height: 1.58;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}

.note-separator {
    height: 1px;
    margin: 11px 0;
    border: 0;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.note-page-highlight {
    padding: 1px 3px;
    border-radius: 3px;
    background: #fff176;
    color: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

::highlight(note-page-highlight) {
    background: #fff176;
    color: inherit;
}

/* =========================
   DELETE BUTTON (UPGRADED)
========================= */

.delete-note-btn {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;

    padding: 6px 9px;
    margin-top: 10px;

    border-radius: 7px;
    cursor: pointer;

    font-size: 12px;
    font-weight: 700;

    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.delete-note-btn:hover {
    background: #fecaca;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

#export-notes-btn {
    background: #0f766e !important;
    color: #fff;
    border: 1px solid rgba(94, 234, 212, 0.35) !important;
    border-radius: 7px !important;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
    font-weight: 700;
}

#export-notes-btn:hover {
    background: #115e59 !important;
}

/* =========================
   TOGGLE BUTTON
========================= */

#notes-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #b45309, #f97316);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    z-index: 99999;
}

#notes-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.35);
}

#notes-toggle-btn:active {
    transform: scale(0.95);
}

/* =========================
   OVERLAY
========================= */

#notes-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(2, 8, 23, 0.5);
    backdrop-filter: blur(2px);

    z-index: 1000001;
    display: none;
}

/* =========================
   SCROLLBAR (optional but nice)
========================= */

#notes-sidebar::-webkit-scrollbar {
    width: 6px;
}

#notes-sidebar::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 10px;
}

#notes-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#notes-toggle-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

/* =========================
   FULL NOTES PAGE
========================= */

.view-notes-page {
    width: min(980px, calc(100vw - 32px));
    margin: 24px auto 48px;
    color: #1f2937;
}

.view-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.view-notes-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
}

.view-notes-list {
    display: grid;
    gap: 14px;
}

.view-notes-page .note-item {
    margin-bottom: 0;
}

.view-notes-page .note-card {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.view-notes-page .note-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.view-notes-page .note-post a {
    color: inherit;
    text-decoration: none;
}

.view-notes-page .note-post a:hover {
    text-decoration: underline;
}

.note-date {
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.note-site-name {
    display: inline-block;
    margin-left: 8px;
    color: #0f766e;
    font-weight: 800;
}

.notes-export-btn {
    flex: 0 0 auto;
    background: #0f766e;
    color: #fff;
    border: 1px solid rgba(94, 234, 212, 0.35);
    border-radius: 7px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
}

.notes-export-btn:hover {
    background: #115e59;
}

.notes-empty-message {
    margin: 0;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.notes-print-root {
    display: none;
}

@media (max-width: 600px) {
    #notes-sidebar {
        right: -100vw;
        width: 100vw;
        padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
    }

    .notes-header {
        top: -14px;
        margin: -14px -14px 12px;
        padding: 12px 14px !important;
    }

    .note-card {
        padding: 11px;
    }

    .view-notes-page {
        width: min(100% - 24px, 980px);
        margin-top: 16px;
    }

    .view-notes-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .notes-export-btn {
        width: 100%;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    #notes-print-root,
    #notes-print-root * {
        visibility: visible !important;
    }

    #notes-print-root {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        margin: 0;
        padding: 0;
        color: #111827;
        background: #fff;
    }

    .notes-print-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #cbd5e1;
    }

    .notes-print-header h2 {
        margin: 0 0 6px;
        font-size: 22px;
        line-height: 1.25;
        font-weight: 700;
    }

    .notes-print-subject {
        color: #475569;
        font-size: 13px;
        font-weight: 700;
    }

    .notes-export-btn,
    .delete-note-btn,
    #notes-toggle-btn,
    #notes-sidebar,
    #notes-overlay,
    #subjects-toggle,
    #subjects-panel,
    #subjects-overlay {
        display: none !important;
    }

    #notes-print-root .note-item {
        margin-bottom: 12px;
    }

    #notes-print-root .note-card {
        break-inside: avoid;
        box-shadow: none;
    }

    #notes-print-root .note-post a {
        text-decoration: none;
    }
}



.notes-layout{
    display:flex;
    gap:24px;
    align-items:flex-start;
}

.notes-sidebar{
    width:250px;
    flex-shrink:0;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:10px;
    padding:15px;
    position:sticky;
    top:20px;
}

.subject-link{
    display:block;
    padding:10px 12px;
    margin-bottom:6px;
    text-decoration:none;
    color:#333;
    border-radius:6px;
    transition:.2s;
}

.subject-link:hover{
    background:#f3f4f6;
}

.notes-content{
    flex:1;
    min-width:0;
}

.subject-group{
    margin-bottom:35px;
}

.subject-heading{
    font-size:22px;
    font-weight:700;
    margin-bottom:15px;
    padding-bottom:10px;
    border-bottom:2px solid #e5e5e5;
    scroll-margin-top:20px;
}


























.view-notes-page{
    width:100%;
    max-width:none;
}



/* =========================
   FLOAT BUTTON
========================= */
.subjects-float-btn{
    position: fixed;

    top: 20px;
    left: 20px;

    z-index: 9999;

    padding: 12px 18px;

    border: none;
    border-radius: 50px;

    cursor: pointer;

    font-size: 15px;
    font-weight: 600;

    background: #111;
    color: #fff;

    box-shadow: 0 5px 20px rgba(0,0,0,.15);

    transition:
        transform .3s ease,
        opacity .3s ease;
}

.subjects-float-btn.hide{
    opacity: 0;
    transform: translateY(-80px);
    pointer-events: none;
}


/* =========================
   SLIDE PANEL
========================= */

.subjects-slide-panel{
    position: fixed;

    top: 0;
    left: 0;

    width: 320px;
    max-width: 85vw;
    height: 100vh;

    background: #fff;

    z-index: 9999;

    transform: translateX(-100%);

    transition: transform .3s ease;

    overflow-y: auto;

    box-shadow: 0 0 30px rgba(0,0,0,.15);
}

.subjects-slide-panel.active{
    transform: translateX(0);
}

/* =========================
   PANEL HEADER
========================= */

.subjects-panel-top{
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px;

    border-bottom: 1px solid #eee;

    font-size: 18px;
    font-weight: 700;

    position: sticky;
    top: 0;

    background: #fff;
}

/* =========================
   CLOSE BUTTON
========================= */

.subjects-close-btn{
    border: none;
    background: none;

    cursor: pointer;

    font-size: 24px;
    line-height: 1;
}

/* =========================
   SUBJECT LIST
========================= */

.subjects-list{
    padding: 15px;
}

.panel-link{
    display: block;

    padding: 12px 14px;

    margin-bottom: 8px;

    text-decoration: none;
    color: inherit;

    border-radius: 8px;

    transition: .2s;
}

.panel-link:hover{
    background: #f5f5f5;
}

/* =========================
   NOTES SECTIONS
========================= */

.subject-group{
    margin-bottom: 40px;
}

.subject-heading{
    font-size: 22px;
    font-weight: 700;

    margin-bottom: 15px;
    padding-bottom: 10px;

    border-bottom: 2px solid #e5e5e5;

    scroll-margin-top: 20px;
}





/* =================================
   DARK MODE — all_notes.css
   Existing all_notes.css ke baad link karein
================================= */

/* =========================
   NOTES SIDEBAR
========================= */

body.dark-mode #notes-sidebar {
  background:
    linear-gradient(180deg, rgba(10, 14, 20, 0.97), rgba(8, 11, 17, 0.99)),
    #080b11;
  border-left-color: rgba(100, 116, 139, 0.18);
  box-shadow: -16px 0 36px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
}

body.dark-mode #notes-sidebar h3 {
  color: #f1f5f9;
}

/* =========================
   SIDEBAR HEADER
========================= */

body.dark-mode .notes-header {
  background: rgba(8, 11, 17, 0.97);
  border-bottom-color: rgba(100, 116, 139, 0.18) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* =========================
   NOTE CARD
========================= */

body.dark-mode .note-card {
  background: #1a2030;
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

/* =========================
   NOTE POST BADGE
========================= */

body.dark-mode .note-post {
  background: #0c2d48;
  color: #7dd3fc;
}

/* =========================
   NOTE TEXT
========================= */

body.dark-mode .note-text {
  color: #b8c5d6;
}

/* =========================
   NOTE SEPARATOR
========================= */

body.dark-mode .note-separator {
  background: linear-gradient(90deg, transparent, #2e3a50, transparent);
}

/* =========================
   PAGE HIGHLIGHT
========================= */

body.dark-mode .note-page-highlight {
  background: #7c6f00;
  color: #fef9c3;
}

/* =========================
   DELETE BUTTON
========================= */

body.dark-mode .delete-note-btn {
  background: #2d1515;
  color: #fca5a5;
  border-color: #4a1f1f;
}

body.dark-mode .delete-note-btn:hover {
  background: #3d1a1a;
  border-color: #7f2020;
}

/* =========================
   EXPORT BUTTON (SIDEBAR)
========================= */

body.dark-mode #export-notes-btn {
  background: #0f766e !important;
  border-color: rgba(94, 234, 212, 0.25) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

body.dark-mode #export-notes-btn:hover {
  background: #0d5e57 !important;
}

/* =========================
   OVERLAY
========================= */

body.dark-mode #notes-overlay {
  background: rgba(0, 0, 0, 0.65);
}

/* =========================
   SCROLLBAR
========================= */

body.dark-mode #notes-sidebar::-webkit-scrollbar-thumb {
  background: #334155;
}

body.dark-mode #notes-sidebar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* =========================
   FULL NOTES PAGE
========================= */

body.dark-mode .view-notes-page {
  color: #cbd5e1;
}

body.dark-mode .view-notes-header {
  border-bottom-color: #1e2a3a;
}

body.dark-mode .view-notes-header h2 {
  color: #e2e8f0;
}

body.dark-mode .view-notes-page .note-card {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

body.dark-mode .view-notes-page .note-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

body.dark-mode .view-notes-page .note-post a {
  color: inherit;
}

body.dark-mode .note-date {
  color: #64748b;
}

body.dark-mode .note-site-name {
  color: #2dd4bf;
}

body.dark-mode .notes-export-btn {
  background: #0f766e;
  border-color: rgba(94, 234, 212, 0.25);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

body.dark-mode .notes-export-btn:hover {
  background: #0d5e57;
}

body.dark-mode .notes-empty-message {
  background: #141a24;
  border-color: #2e3a50;
  color: #64748b;
}

/* =========================
   LAYOUT SIDEBAR (subjects)
========================= */

body.dark-mode .notes-sidebar {
  background: #141a24;
  border-color: #1e2a3a;
}

body.dark-mode .subject-link {
  color: #b8c5d6;
}

body.dark-mode .subject-link:hover {
  background: #1e2a3a;
}

body.dark-mode .subject-heading {
  color: #e2e8f0;
  border-bottom-color: #1e2a3a;
}

/* =========================
   FLOAT BUTTON
========================= */

body.dark-mode .subjects-float-btn {
  background: #1e2a3a;
  color: #e2e8f0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.45);
}

/* =========================
   SLIDE PANEL
========================= */

body.dark-mode .subjects-slide-panel {
  background: #141a24;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.55);
}

body.dark-mode .subjects-panel-top {
  background: #141a24;
  border-bottom-color: #1e2a3a;
  color: #e2e8f0;
}

body.dark-mode .subjects-close-btn {
  color: #94a3b8;
}

body.dark-mode .subjects-close-btn:hover {
  color: #e2e8f0;
}

body.dark-mode .panel-link {
  color: #b8c5d6;
}

body.dark-mode .panel-link:hover {
  background: #1e2a3a;
}








/* =========================
   MOBILE
========================= */
@media (max-width: 768px){

    .subjects-slide-panel{
        width: 280px;
    }

    .subjects-float-btn{
        top: 15px;
        left: 15px;
    }
.note-text{
    font-size:18px !important;
}
.note-post{
    font-size:17px  !important;
 }
 
}










