/* =========================================================
   FUTUREVERSE — SUBJECT NOTES
   subject-notes.css
   ========================================================= */


/* =========================================================
   01. ROOT VARIABLES
   ========================================================= */

:root {
    --bg-main: #070914;
    --bg-secondary: #0b0f1d;

    --text-primary: #f5f7ff;
    --text-secondary: #a7aec4;
    --text-muted: #6f7892;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);

    --accent: #7c5cff;
    --accent-light: #9c86ff;
    --accent-blue: #4e8cff;

    --accent-soft: rgba(124, 92, 255, 0.14);

    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.28);

    --shadow-glow: 0 0 45px rgba(124, 92, 255, 0.16);

    --radius-large: 24px;
    --radius-medium: 18px;
    --radius-small: 12px;

    --header-height: 72px;
}


/* =========================================================
   02. RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-primary);

    background:
        radial-gradient(
            circle at 15% 5%,
            rgba(124, 92, 255, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(60, 130, 255, 0.07),
            transparent 25%
        ),
        var(--bg-main);

    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}


/* =========================================================
   03. PAGE
   ========================================================= */

.subject-page {
    min-height: 100vh;
    position: relative;
}


/* =========================================================
   04. HEADER
   ========================================================= */

.subject-header {
    width: 100%;
    height: var(--header-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(7, 9, 20, 0.84);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 800;

    background: linear-gradient(
        135deg,
        #7c5cff,
        #4e8cff
    );

    box-shadow:
        0 8px 25px rgba(124, 92, 255, 0.28);
}

.brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.brand-text h1 {
    font-size: 15px;
    line-height: 1.1;
    font-weight: 750;
}

.brand-text span {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
    letter-spacing: 0.4px;
}


/* =========================================================
   05. HEADER BUTTONS
   ========================================================= */

.back-btn,
.header-search-btn {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: var(--text-secondary);

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid var(--border);

    transition: 0.25s ease;
}

.back-btn {
    font-size: 22px;
}

.header-search-btn {
    font-size: 22px;
}

.back-btn:hover,
.header-search-btn:hover {
    color: var(--text-primary);

    background: rgba(255, 255, 255, 0.08);

    border-color: var(--border-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-btn {
    width: 38px;
    height: 38px;

    padding: 2px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #7c5cff,
        #4e8cff
    );

    box-shadow:
        0 6px 20px rgba(124, 92, 255, 0.2);
}

.profile-btn span {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #11162a;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   06. MAIN
   ========================================================= */

.subject-main {
    width: min(1050px, calc(100% - 32px));

    margin: 0 auto;

    padding: 25px 0 55px;
}


/* =========================================================
   07. BREADCRUMB
   ========================================================= */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-muted);

    font-size: 10px;
}

.breadcrumb button {
    color: var(--accent-light);

    background: transparent;

    font-size: 10px;
    font-weight: 650;
}

.breadcrumb span:last-child {
    color: var(--text-secondary);
}


/* =========================================================
   08. SUBJECT HERO
   ========================================================= */

.subject-hero {
    position: relative;

    margin-top: 17px;

    min-height: 190px;

    display: flex;
    align-items: center;

    gap: 16px;

    padding: 24px;

    overflow: hidden;

    border-radius: var(--radius-large);

    background: linear-gradient(
        135deg,
        rgba(124, 92, 255, 0.17),
        rgba(42, 55, 105, 0.08)
    );

    border: 1px solid var(--border);

    box-shadow: var(--shadow-card);
}

.subject-hero::before {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    right: -100px;
    top: -120px;

    border-radius: 50%;

    background: rgba(124, 92, 255, 0.13);

    filter: blur(20px);
}

.subject-hero::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    left: -100px;
    bottom: -120px;

    border-radius: 50%;

    background: rgba(78, 140, 255, 0.07);

    filter: blur(25px);
}


/* =========================================================
   09. SUBJECT HERO ICON
   ========================================================= */

.subject-hero-icon {
    position: relative;
    z-index: 2;

    width: 64px;
    height: 64px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2);

    font-size: 30px;
}


/* =========================================================
   10. SUBJECT HERO CONTENT
   ========================================================= */

.subject-hero-content {
    position: relative;
    z-index: 2;

    min-width: 0;

    flex: 1;
}

.subject-label {
    color: var(--accent-light);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.subject-hero-content h2 {
    margin-top: 6px;

    font-size: clamp(25px, 6vw, 42px);

    line-height: 1.05;

    letter-spacing: -1px;

    font-weight: 800;
}

.subject-hero-content p {
    max-width: 580px;

    margin-top: 8px;

    color: var(--text-secondary);

    font-size: 10px;
    line-height: 1.6;
}


/* =========================================================
   11. SUBJECT COUNT
   ========================================================= */

.subject-note-count {
    position: relative;
    z-index: 2;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 55px;
}

.subject-note-count strong {
    font-size: 24px;

    background: linear-gradient(
        90deg,
        #9d86ff,
        #62a0ff
    );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.subject-note-count span {
    margin-top: 1px;

    color: var(--text-muted);

    font-size: 8px;
}


/* =========================================================
   12. SEARCH
   ========================================================= */

.subject-search-section {
    margin-top: 18px;
}

.subject-search-box {
    width: 100%;
    height: 54px;

    display: flex;
    align-items: center;

    padding: 0 14px;

    border-radius: 15px;

    background: rgba(15, 19, 35, 0.88);

    border: 1px solid var(--border);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.15);

    transition: 0.25s ease;
}

.subject-search-box:focus-within {
    border-color: rgba(124, 92, 255, 0.55);

    box-shadow:
        0 0 0 4px rgba(124, 92, 255, 0.08);
}

.search-icon {
    margin-right: 10px;

    color: var(--text-muted);

    font-size: 22px;
}

.subject-search-box input {
    width: 100%;

    min-width: 0;

    border: none;
    outline: none;

    background: transparent;

    color: var(--text-primary);

    font-size: 12px;
}

.subject-search-box input::placeholder {
    color: var(--text-muted);
}

.clear-subject-search {
    width: 28px;
    height: 28px;

    display: none;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    color: var(--text-muted);

    background: rgba(255, 255, 255, 0.05);

    font-size: 18px;
}


/* =========================================================
   13. NOTES LIST HEADER
   ========================================================= */

.notes-list-header {
    margin-top: 32px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;
}

.section-label {
    color: var(--accent-light);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.notes-list-header h3 {
    margin-top: 6px;

    font-size: 23px;

    letter-spacing: -0.5px;
}

.visible-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.visible-count strong {
    font-size: 20px;

    color: var(--text-primary);
}

.visible-count span {
    margin-top: 1px;

    color: var(--text-muted);

    font-size: 8px;
}


/* =========================================================
   14. NOTES LIST
   ========================================================= */

.notes-list {
    margin-top: 17px;

    display: flex;
    flex-direction: column;

    gap: 11px;
}


/* =========================================================
   15. NOTE CARD
   ========================================================= */

.note-card {
    position: relative;

    display: flex;
    align-items: center;

    gap: 14px;

    min-height: 88px;

    padding: 15px;

    overflow: hidden;

    border-radius: var(--radius-medium);

    background: linear-gradient(
        145deg,
        rgba(18, 23, 42, 0.92),
        rgba(11, 15, 29, 0.94)
    );

    border: 1px solid var(--border);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.note-card::before {
    content: "";

    position: absolute;

    width: 120px;
    height: 120px;

    right: -80px;
    top: -70px;

    border-radius: 50%;

    background: rgba(124, 92, 255, 0.07);

    filter: blur(5px);

    transition: 0.3s ease;
}

.note-card:hover {
    transform: translateY(-3px);

    border-color: rgba(124, 92, 255, 0.25);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.28);
}

.note-card:hover::before {
    transform: scale(1.5);
}


/* =========================================================
   16. NOTE NUMBER
   ========================================================= */

.note-number {
    position: relative;
    z-index: 2;

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    color: var(--accent-light);

    background: var(--accent-soft);

    border:
        1px solid rgba(124, 92, 255, 0.16);

    font-size: 10px;
    font-weight: 800;
}


/* =========================================================
   17. NOTE CONTENT
   ========================================================= */

.note-content {
    position: relative;
    z-index: 2;

    min-width: 0;

    flex: 1;
}

.note-content h4 {
    color: var(--text-primary);

    font-size: 14px;
    line-height: 1.35;

    font-weight: 750;
}

.note-content p {
    margin-top: 5px;

    color: var(--text-secondary);

    font-size: 9px;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-box-orient: vertical;
   

    overflow: hidden;
}


/* =========================================================
   18. READ NOTE BUTTON
   ========================================================= */

.read-note-btn {
    position: relative;
    z-index: 2;

    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #ffffff;

    background: linear-gradient(
        135deg,
        rgba(124, 92, 255, 0.9),
        rgba(78, 140, 255, 0.9)
    );

    box-shadow:
        0 8px 20px rgba(124, 92, 255, 0.15);

    font-size: 17px;

    transition: 0.25s ease;
}

.read-note-btn:hover {
    transform: translateX(3px);

    box-shadow:
        0 10px 25px rgba(124, 92, 255, 0.28);
}


/* =========================================================
   19. FREE LABEL
   ========================================================= */

.note-free {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;

    margin-top: 6px;

    padding: 3px 6px;

    border-radius: 999px;

    color: #9c86ff;

    background: rgba(124, 92, 255, 0.08);

    font-size: 7px;
    font-weight: 800;

    letter-spacing: 0.5px;
}


/* =========================================================
   20. NO RESULTS
   ========================================================= */

.subject-no-results {
    margin-top: 20px;

    padding: 42px 20px;

    text-align: center;

    border-radius: var(--radius-medium);

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid var(--border);
}

.no-results-icon {
    font-size: 30px;
}

.subject-no-results h3 {
    margin-top: 11px;

    font-size: 17px;
}

.subject-no-results p {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   21. FREE BANNER
   ========================================================= */

.subject-free-banner {
    position: relative;

    margin-top: 22px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 17px;

    overflow: hidden;

    border-radius: var(--radius-medium);

    background: linear-gradient(
        135deg,
        rgba(124, 92, 255, 0.13),
        rgba(78, 140, 255, 0.06)
    );

    border:
        1px solid rgba(124, 92, 255, 0.16);
}

.free-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: var(--accent-light);

    background: var(--accent-soft);

    font-size: 17px;
}

.free-content {
    min-width: 0;
}

.free-content span {
    color: var(--accent-light);

    font-size: 7px;
    font-weight: 800;

    letter-spacing: 1px;
}

.free-content h3 {
    margin-top: 4px;

    font-size: 13px;
}

.free-content p {
    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 8px;
    line-height: 1.5;
}

.free-badge {
    margin-left: auto;

    flex-shrink: 0;

    padding: 6px 9px;

    border-radius: 999px;

    color: #ffffff;

    background: linear-gradient(
        135deg,
        #7c5cff,
        #4e8cff
    );

    font-size: 7px;
    font-weight: 800;

    letter-spacing: 0.6px;
}


/* =========================================================
   22. FOOTER
   ========================================================= */

.subject-footer {
    width: min(1050px, calc(100% - 32px));

    margin: 0 auto;

    padding: 18px 0 32px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 8px;
}

.footer-brand {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.footer-brand strong {
    color: var(--text-secondary);

    font-size: 10px;
}

.footer-info {
    font-size: 7px;
}


/* =========================================================
   23. TABLET
   ========================================================= */

@media (min-width: 600px) {

    .subject-header {
        padding: 0 28px;
    }

    .subject-main {
        width: min(1050px, calc(100% - 48px));

        padding-top: 35px;
    }

    .subject-hero {
        min-height: 220px;

        padding: 32px;
    }

    .subject-hero-icon {
        width: 76px;
        height: 76px;

        font-size: 35px;
    }

    .subject-hero-content h2 {
        font-size: 40px;
    }

    .subject-hero-content p {
        font-size: 11px;
    }

    .subject-note-count strong {
        font-size: 27px;
    }

    .notes-list {
        gap: 13px;
    }

    .note-card {
        min-height: 96px;

        padding: 17px;
    }

    .note-number {
        width: 46px;
        height: 46px;
    }

    .note-content h4 {
        font-size: 15px;
    }

    .note-content p {
        font-size: 10px;
    }

    .read-note-btn {
        width: 42px;
        height: 42px;
    }

    .subject-footer {
        width: min(1050px, calc(100% - 48px));

        flex-direction: row;

        align-items: center;
        justify-content: space-between;
    }
}


/* =========================================================
   24. DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    :root {
        --header-height: 78px;
    }

    .subject-header {
        padding: 0 40px;
    }

    .subject-main {
        padding-top: 45px;
    }

    .subject-hero {
        min-height: 240px;

        padding: 38px;
    }

    .subject-hero-icon {
        width: 82px;
        height: 82px;

        border-radius: 21px;

        font-size: 38px;
    }

    .subject-label {
        font-size: 9px;
    }

    .subject-hero-content h2 {
        font-size: 44px;
    }

    .subject-hero-content p {
        font-size: 12px;
    }

    .subject-note-count strong {
        font-size: 30px;
    }

    .subject-search-box {
        height: 58px;
    }

    .subject-search-box input {
        font-size: 13px;
    }

    .notes-list-header {
        margin-top: 38px;
    }

    .notes-list-header h3 {
        font-size: 27px;
    }

    .note-card {
        min-height: 105px;

        padding: 18px 20px;
    }

    .note-number {
        width: 50px;
        height: 50px;

        border-radius: 14px;
    }

    .note-content h4 {
        font-size: 16px;
    }

    .note-content p {
        font-size: 10px;
    }

    .read-note-btn {
        width: 44px;
        height: 44px;
    }

    .subject-free-banner {
        padding: 21px;
    }
}


/* =========================================================
   25. LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

    .subject-main {
        padding-top: 52px;
    }

    .subject-hero {
        min-height: 255px;
    }

    .subject-hero-content h2 {
        font-size: 48px;
    }
}


/* =========================================================
   26. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}






























/* =========================================================
   FIX — LONG SUBJECT TITLE / NOTE COUNT OVERLAP
   ========================================================= */

@media (max-width: 768px) {

    #subjectTitle {
        padding-right: 85px;
        box-sizing: border-box;
    }

}