/* ---------- notes list ---------- */

.notes-list-hero {
    width: 100%;
    background:
            radial-gradient(800px 260px at 10% -10%, rgba(56, 189, 248, 0.12), transparent),
            radial-gradient(720px 260px at 100% 0%, rgba(139, 92, 246, 0.10), transparent),
            linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}

.notes-list-band {
    width: 100%;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f8ff 100%);
}

:root[data-theme="dark"] .notes-list-hero,
:root[data-theme="dark"] .note-single-hero {
    background:
            radial-gradient(800px 260px at 10% -10%, rgba(34, 211, 238, 0.12), transparent),
            radial-gradient(720px 260px at 100% 0%, rgba(167, 139, 250, 0.11), transparent),
            linear-gradient(180deg, #081b2b 0%, #06111d 100%);
}

:root[data-theme="dark"] .notes-list-band,
:root[data-theme="dark"] .note-single-band {
    background: linear-gradient(180deg, #06111d 0%, #10172f 100%);
}

.notes-list-container,
.note-single-container {
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.notes-list-hero .notes-list-container {
    padding-top: 72px;
    padding-bottom: 32px;
}

.notes-list-title {
    font-size: 64px;
    color: var(--text);
}

.notes-list-description {
    max-width: 820px;
}

.notes-list-band .notes-list-container {
    padding-top: 18px;
    padding-bottom: 88px;
}

.notes-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.notes-list-card {
    display: block;
    min-height: 220px;
    padding: 26px;
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    background:
            radial-gradient(220px 110px at 100% 0%, rgba(99, 102, 241, 0.07), transparent),
            linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow-soft);
    transition:
            transform 0.18s ease,
            box-shadow 0.18s ease,
            border-color 0.18s ease;
}

.notes-list-card:hover {
    transform: translateY(-4px);
    border-color: #c4b5fd;
    box-shadow: 0 16px 36px rgba(99, 102, 241, 0.10);
}

:root[data-theme="dark"] .notes-list-card {
    border-color: rgba(167, 139, 250, 0.17);
    background:
            radial-gradient(220px 110px at 100% 0%, rgba(168, 85, 247, 0.12), transparent),
            linear-gradient(180deg, rgba(20, 27, 50, 0.96), rgba(13, 20, 40, 0.96));
}

:root[data-theme="dark"] .notes-list-card:hover {
    border-color: rgba(196, 181, 253, 0.32);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.notes-list-card h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
}

.notes-list-summary {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.notes-list-card .tags {
    margin-top: 18px;
}

.notes-list-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
}

.notes-list-link::after {
    content: "→";
    margin-left: 8px;
    transition: transform 0.18s ease;
}

.notes-list-card:hover .notes-list-link::after {
    transform: translateX(4px);
}

/* ---------- note single ---------- */

.note-single-hero {
    width: 100%;
    background:
            radial-gradient(800px 260px at 10% -10%, rgba(56, 189, 248, 0.12), transparent),
            radial-gradient(720px 260px at 100% 0%, rgba(139, 92, 246, 0.10), transparent),
            linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}

.note-single-band {
    width: 100%;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f8ff 100%);
}

.note-single-hero .note-single-container {
    padding-top: 72px;
    padding-bottom: 32px;
}

.note-single-title {
    font-size: 56px;
    color: var(--text);
}

.note-single-description {
    max-width: 820px;
    font-size: 18px;
    line-height: 1.6;
}

.note-single-band .note-single-container {
    padding-top: 18px;
    padding-bottom: 88px;
}

.note-sheet {
    max-width: 1040px;
    padding: 26px 32px 32px;
    border-radius: 28px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.99));
    box-shadow:
            0 20px 50px rgba(15, 23, 42, 0.05),
            0 2px 6px rgba(15, 23, 42, 0.025);
}

:root[data-theme="dark"] .note-sheet {
    border-color: rgba(96, 165, 250, 0.16);
    background: linear-gradient(180deg, rgba(15, 27, 45, 0.96), rgba(8, 21, 35, 0.98));
    box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.22),
            0 2px 6px rgba(0, 0, 0, 0.12);
}

.note-content {
    max-width: 920px;
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}

:root[data-theme="dark"] .note-content {
    color: var(--text-muted);
}

.note-content > *:first-child {
    margin-top: 0;
}

.note-content p {
    margin: 0 0 14px;
}

.note-content h2,
.note-content h3 {
    margin: 32px 0 12px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.note-content h2 {
    font-size: 26px;
    line-height: 1.14;
}

.note-content h3 {
    font-size: 19px;
    line-height: 1.24;
}

.note-content ul,
.note-content ol {
    margin: 12px 0 0;
    padding-left: 22px;
}

.note-content li {
    margin-bottom: 8px;
}

.note-content hr {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

:root[data-theme="dark"] .note-content hr {
    border-top-color: rgba(148, 163, 184, 0.18);
}

.note-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.95em;
}

.note-content :not(pre) > code {
    padding: 0.16em 0.45em;
    border-radius: 8px;
    background: #eef2ff;
    color: #334155;
}

:root[data-theme="dark"] .note-content :not(pre) > code {
    background: rgba(96, 165, 250, 0.14);
    color: #dbeafe;
}

.note-content table {
    width: 100%;
    margin: 18px 0 20px;
    border-collapse: collapse;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

.note-content th,
.note-content td {
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    text-align: left;
    vertical-align: top;
}

.note-content th {
    background: rgba(239, 246, 255, 0.72);
    color: var(--text);
    font-weight: 700;
}

.note-content td {
    color: #334155;
}

:root[data-theme="dark"] .note-content table {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(8, 21, 35, 0.42);
}

:root[data-theme="dark"] .note-content th,
:root[data-theme="dark"] .note-content td {
    border-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .note-content th {
    background: rgba(96, 165, 250, 0.10);
}

:root[data-theme="dark"] .note-content td {
    color: var(--text-muted);
}

.note-content pre {
    overflow-x: auto;
    margin: 14px 0 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.note-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 13px;
    line-height: 1.6;
}

.note-content blockquote {
    margin: 20px 0;
    padding: 12px 16px;
    border-left: 3px solid #93c5fd;
    background: #f8fbff;
    color: #475569;
    border-radius: 0 14px 14px 0;
}

:root[data-theme="dark"] .note-content blockquote {
    border-left-color: #38bdf8;
    background: rgba(96, 165, 250, 0.08);
    color: var(--text-muted);
}

.note-content img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 28px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .note-content img {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 27, 45, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.note-theme-image {
    display: block;
    overflow: hidden;
    margin: 0 0 28px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.note-theme-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.note-theme-image-dark {
    display: none !important;
}

:root[data-theme="dark"] .note-theme-image {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 27, 45, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .note-theme-image-light {
    display: none !important;
}

:root[data-theme="dark"] .note-theme-image-dark {
    display: block !important;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .notes-list-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .notes-list-title {
        font-size: 42px;
        line-height: 1.02;
    }

    .notes-list-description,
    .note-single-description {
        font-size: 18px;
    }

    .notes-list-card h2 {
        font-size: 24px;
    }

    .note-single-title {
        font-size: 36px;
        line-height: 1.02;
    }

    .note-sheet {
        padding: 20px 16px 24px;
        border-radius: 22px;
    }

    .note-content {
        font-size: 14px;
        line-height: 1.65;
    }

    .note-content h2 {
        font-size: 24px;
    }

    .note-content h3 {
        font-size: 18px;
    }

    .note-content pre code {
        font-size: 12px;
    }
}
