@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,0,1;wght@300;400;500;600;700;900&display=swap');
@import url('header.css');
@import url('navbar.css');
@import url('subject-card.css');
@import url('footer.css');
@import url('table.css');
@import url('toc.css');
@import url('breadcrumbs.css');
@import url('subtopic.css');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #059669;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --radius-sm: .25rem;
    --radius-md: .375rem;
    --radius-lg: .5rem
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Improved responsive base font size */
}

/* Enhanced responsive font scaling */
@media (max-width: 320px) {
    html {
        font-size: 14px; /* Very small phones */
    }
}

@media (min-width: 321px) and (max-width: 480px) {
    html {
        font-size: 15px; /* Small phones */
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    html {
        font-size: 16px; /* Tablets portrait */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 16px; /* Tablets landscape */
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    html {
        font-size: 17px; /* Desktop */
    }
}

@media (min-width: 1441px) {
    html {
        font-size: 18px; /* Large desktop */
    }
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-color);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 68px;
    display: flex;
    flex-direction: column;
    font-size: 1rem; /* Base font size using rem units */
}

.text-xs {
    font-size: .75rem;
    line-height: 1rem
}

.text-sm {
    font-size: .875rem;
    line-height: 1.25rem
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .75rem;
    letter-spacing: -.025em
}

h1 {
    font-size: 2.25rem;
    line-height: 2.5rem
}

h2 {
    font-size: 1.875rem;
    line-height: 2.25rem
}

h3 {
    font-size: 1.5rem;
    line-height: 2rem
}

h4 {
    font-size: 1.25rem;
    line-height: 1.75rem
}

h5 {
    font-size: 1.125rem;
    line-height: 1.75rem
}

h6 {
    font-size: 1rem;
    line-height: 1.5rem
}

/* Enhanced responsive typography for better readability */
@media (max-width: 480px) {
    body {
        font-size: 1rem; /* Remove override, use html base size */
        line-height: 1.6
    }

    h1 {
        font-size: 2rem; /* Larger than before for better readability */
        line-height: 2.25rem
    }

    h2 {
        font-size: 1.75rem; /* Larger than before */
        line-height: 2rem
    }

    h3 {
        font-size: 1.5rem; /* Larger than before */
        line-height: 1.75rem
    }

    h4 {
        font-size: 1.25rem; /* Larger than before */
        line-height: 1.5rem
    }

    h5 {
        font-size: 1.125rem;
        line-height: 1.5rem
    }

    h6 {
        font-size: 1rem;
        line-height: 1.375rem
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    h1 {
        font-size: 2.125rem;
        line-height: 2.375rem
    }

    h2 {
        font-size: 1.875rem;
        line-height: 2.125rem
    }

    h3 {
        font-size: 1.625rem;
        line-height: 1.875rem
    }

    h4 {
        font-size: 1.375rem;
        line-height: 1.625rem
    }

    h5 {
        font-size: 1.125rem;
        line-height: 1.5rem
    }

    h6 {
        font-size: 1rem;
        line-height: 1.375rem
    }
}

@media (min-width:481px) and (max-width:768px) {
    body {
        font-size: .95rem;
        line-height: 1.65
    }

    h1 {
        font-size: 2rem;
        line-height: 2.25rem
    }

    h2 {
        font-size: 1.625rem;
        line-height: 2rem
    }

    h3 {
        font-size: 1.375rem;
        line-height: 1.75rem
    }

    h4 {
        font-size: 1.125rem;
        line-height: 1.5rem
    }

    h5 {
        font-size: 1rem;
        line-height: 1.375rem
    }

    h6 {
        font-size: .9375rem;
        line-height: 1.25rem
    }

    p {
        font-size: .95rem;
        line-height: 1.6
    }
}

@media (min-width:769px) and (max-width:1024px) {
    h1 {
        font-size: 2.125rem;
        line-height: 2.375rem
    }

    h2 {
        font-size: 1.75rem;
        line-height: 2.125rem
    }

    h3 {
        font-size: 1.4375rem;
        line-height: 1.875rem
    }

    h4 {
        font-size: 1.1875rem;
        line-height: 1.625rem
    }

    h5 {
        font-size: 1.0625rem;
        line-height: 1.5rem
    }

    h6 {
        font-size: .9375rem;
        line-height: 1.375rem
    }
}

@media (min-width:1440px) {
    h1 {
        font-size: 2.5rem;
        line-height: 2.75rem
    }

    h2 {
        font-size: 2rem;
        line-height: 2.5rem
    }

    h3 {
        font-size: 1.625rem;
        line-height: 2.125rem
    }

    h4 {
        font-size: 1.375rem;
        line-height: 1.875rem
    }

    h5 {
        font-size: 1.1875rem;
        line-height: 1.75rem
    }

    h6 {
        font-size: 1.0625rem;
        line-height: 1.5rem
    }
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary)
}

@media (min-width:1025px) {
    p {
        margin-bottom: 1.25rem;
        font-size: 1.0625rem;
        line-height: 1.8
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin-top: 2.5rem;
        margin-bottom: 1rem
    }

    h1:first-child,
    h2:first-child,
    h3:first-child {
        margin-top: 0
    }

    ul,
    ol {
        margin-bottom: 1.5rem
    }

    li {
        margin-bottom: .5rem;
        line-height: 1.8
    }

    .content-section {
        margin-bottom: 3rem
    }

    .main-content {
        background: var(--background-color);
        border-radius: var(--radius-lg);
        padding: 2.5rem;
        box-shadow: var(--shadow-sm);
        margin: 2rem auto;
        max-width: 1200px;
        width: 100%;
        line-height: 1.8;
        font-size: 1.0625rem;
        word-break: break-word;
        display: block;
        position: relative
    }

    @media (max-width:1024px) {
        .main-content {
            max-width: 98vw;
            padding: 1.5rem;
            font-size: 1rem
        }
    }

    @media (max-width:600px) {
        .main-content {
            max-width: 100vw;
            padding: 1rem .5rem;
            font-size: .97rem;
            border-radius: var(--radius-md)
        }
    }

    .table-responsive-wrapper {
        margin: 2rem 0;
        border-radius: var(--radius-md);
        overflow: hidden;
        box-shadow: var(--shadow-sm)
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color .15s ease
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline
}

.language-switcher {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center
}

.language-switcher h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600
}

.language-dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem
}

.language-dropdown-container label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem
}

.language-dropdown {
    padding: .75rem 1rem !important;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background: white !important;
    font-size: 1rem !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    transition: all .3s ease;
    min-width: 220px !important;
    font-family: inherit !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important
}

.language-dropdown:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, .2) !important
}

.language-dropdown:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .2) !important
}

.language-dropdown option {
    padding: .5rem !important;
    font-size: 1rem !important;
    background: white !important;
    color: var(--text-primary) !important;
    display: block !important
}

@media (max-width:768px) {
    .language-dropdown {
        min-width: 100%;
        max-width: 300px;
        justify-content: center
    }
}

.page-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column
}

.page-content-wrapper main {
    flex: 1
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box
}

@media (min-width:1025px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 3rem
    }

    .content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box
    }

    .content-with-sidebar {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 3rem;
        max-width: 1200px;
        margin: 0 auto
    }
}

.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-subtle)
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -.025em
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 48rem;
    margin: 0 auto 2rem
}

.hero-actions {
    margin-top: 2rem
}

.page-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 3rem
}

.page-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
    letter-spacing: -.025em
}

.page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 48rem
}

.static-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem
}

.static-page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border-subtle)
}

.static-page-content h3 {
    margin-top: 1.5rem;
    margin-bottom: .75rem
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

::-webkit-scrollbar-track {
    background: var(--surface-color)
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm)
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted)
}

body.dark-theme {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-subtle: #1e293b
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all .2s ease-in-out;
    gap: .5rem
}

.btn-primary {
    background: linear-gradient(120deg, #5b86e5 0%, #36d1c4 100%);
    color: white;
    border: none;
    animation: gradientShift 4s ease infinite;
    background-size: 200% 200%
}

.btn-primary:hover {
    background: linear-gradient(120deg, #4f7ae6 0%, #2bc7bb 100%);
    border: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    animation: gradientShift 3s ease infinite
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color)
}

.btn-secondary:hover {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--text-secondary)
}

.quiz-section {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--surface-color) 0%, #f0f9ff 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center
}

.quiz-button-container h3 {
    color: var(--text-primary);
    margin-bottom: .75rem;
    font-size: 1.5rem;
    font-weight: 600
}

.quiz-button-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem
}

.quiz-btn {
    font-size: 1.125rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm)
}

.quiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg)
}

body.dark-theme .quiz-section {
    background: linear-gradient(135deg, var(--surface-color) 0%, #0f172a 100%);
    border-color: var(--border-color)
}

@media (max-width:768px) {
    .quiz-section {
        margin-top: 2rem;
        padding: 1.5rem
    }

    .quiz-button-container h3 {
        font-size: 1.25rem
    }

    .quiz-btn {
        font-size: 1rem;
        padding: .875rem 1.5rem;
        width: 100%
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.8)
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1)
}

.scroll-to-top:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 20px -3px rgba(37, 99, 235, .3), 0 8px 10px -4px rgba(37, 99, 235, .2);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%)
}

.scroll-to-top:active {
    transform: translateY(0) scale(.95)
}

.scroll-to-top span {
    display: block;
    line-height: 1
}

@media (max-width:768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.125rem
    }
}

@media (max-width:480px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem
    }
}

body.dark-theme .scroll-to-top {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .3), 0 4px 6px -4px rgba(0, 0, 0, .2)
}

body.dark-theme .scroll-to-top:hover {
    box-shadow: 0 12px 20px -3px rgba(37, 99, 235, .4), 0 8px 10px -4px rgba(37, 99, 235, .3)
}

/* Dark Theme Language Dropdown */
body.dark-theme .language-switcher {
    background: var(--surface-color);
    border-color: var(--border-color);
}

body.dark-theme .language-switcher h3 {
    color: var(--text-primary);
}

body.dark-theme .language-dropdown-container label {
    color: var(--text-primary);
}

body.dark-theme .language-dropdown {
    background: var(--surface-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.dark-theme .language-dropdown:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, .3) !important;
}

body.dark-theme .language-dropdown:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .3) !important;
}

body.dark-theme .language-dropdown option {
    background: var(--surface-color) !important;
    color: var(--text-primary) !important;
}

.definition-list {
    margin: 1rem 0;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color)
}

.definition-list dt {
    margin-top: 1rem;
    margin-bottom: .5rem;
    color: var(--primary-color);
    font-size: 1.1em
}

.definition-list dt:first-child {
    margin-top: 0
}

.definition-list dd {
    margin-left: 1rem;
    margin-bottom: .5rem;
    color: var(--text-secondary);
    line-height: 1.6
}

.formula {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    box-shadow: var(--shadow-md)
}

.formula-explanation {
    font-style: italic;
    color: var(--text-secondary);
    margin-top: .5rem;
    text-align: center;
    font-size: .95em
}

.subtopic-content h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: .5rem
}

.subtopic-content h5 {
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    font-size: 1.15em
}

.subtopic-content ul,
.subtopic-content ol {
    margin: 1rem 0;
    padding-left: 2rem
}

.subtopic-content li {
    margin-bottom: .5rem;
    line-height: 1.6
}

.subtopic-content ol li {
    margin-bottom: .75rem
}

.subtopic-content h4:has-text("Example") {
    background: linear-gradient(135deg, var(--accent-color) 0%, #047857 100%);
    color: white;
    padding: .75rem 1rem;
    border-radius: var(--radius-md);
    border-bottom: none;
    margin-top: 2rem
}

body.dark-theme .definition-list {
    background: rgba(30, 41, 59, .3);
    border-left-color: var(--primary-color)
}

body.dark-theme .formula {
    background: linear-gradient(135deg, rgba(30, 41, 59, .5) 0%, rgba(51, 65, 85, .7) 100%);
    color: #60a5fa;
    border-color: #60a5fa
}

body.dark-theme .subtopic-content h4 {
    color: #60a5fa;
    border-bottom-color: rgba(148, 163, 184, .3)
}

body.dark-theme .subtopic-content h5 {
    color: #34d399
}

.formula-box {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    border: 2px solid #1976d2;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(25, 118, 210, .1);
    position: relative
}

.formula-box::before {
    content: "Formula";
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .5px
}

.math-formula {
    font-size: 1.2rem;
    text-align: center;
    color: #1565c0;
    line-height: 1.6;
    font-family: 'KaTeX_Main', 'Times New Roman', serif
}

.formula-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(227, 242, 253, .5);
    border-left: 4px solid #42a5f5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #1565c0
}

body.dark-theme .formula-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, .5) 0%, rgba(51, 65, 85, .7) 100%);
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, .15)
}

body.dark-theme .formula-box::before {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%)
}

body.dark-theme .math-formula {
    color: #93c5fd
}

body.dark-theme .formula-explanation {
    background: rgba(59, 130, 246, .1);
    border-left-color: #60a5fa;
    color: #93c5fd
}

.graph-container {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    border: 2px solid #1976d2;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(25, 118, 210, .15);
    position: relative;
    overflow: hidden
}

.graph-container::before {
    content: "Interactive Physics Graph";
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, .3)
}

.modern-graph-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.graph-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(25, 118, 210, .2)
}

.control-group {
    display: flex;
    gap: .5rem
}

.graph-btn {
    display: flex;
    align-items: center;
    gap: .2rem;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(25, 118, 210, .3);
    white-space: nowrap;
    word-break: keep-all
}

.graph-btn:hover {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, .4)
}

.graph-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(25, 118, 210, .3)
}

.btn-icon {
    font-size: 1rem
}

.graph-info {
    background: rgba(25, 118, 210, .1);
    border-radius: 8px;
    padding: .5rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: .75rem;
    color: #1565c0;
    border: 1px solid rgba(25, 118, 210, .2)
}

.coordinate-display {
    position: left;
    font-weight: 600
}

.modern-graph-canvas {
    display: block;
    width: 100% !important;
    max-width: 900px;
    height: 500px !important;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border: 2px solid rgba(25, 118, 210, .1);
    transition: all .3s ease
}

.modern-graph-canvas:hover {
    box-shadow: 0 6px 24px rgba(25, 118, 210, .15);
    border-color: rgba(25, 118, 210, .3)
}

.graph-description {
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(227, 242, 253, .6) 0%, rgba(187, 222, 251, .4) 100%);
    border-left: 4px solid #42a5f5;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #1565c0;
    position: relative
}

.graph-description::before {
    content: "📊";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: #42a5f5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem
}

body.dark-theme .graph-container {
    background: linear-gradient(135deg, rgba(30, 41, 59, .6) 0%, rgba(51, 65, 85, .8) 100%);
    border-color: #60a5fa;
    box-shadow: 0 8px 32px rgba(96, 165, 250, .2)
}

body.dark-theme .graph-container::before {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%)
}

body.dark-theme .graph-controls {
    background: rgba(30, 41, 59, .8);
    border-color: rgba(96, 165, 250, .3)
}

body.dark-theme .graph-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, .3)
}

body.dark-theme .graph-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .4)
}

body.dark-theme .graph-info {
    background: rgba(59, 130, 246, .15);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, .3)
}

body.dark-theme .modern-graph-canvas {
    background: linear-gradient(135deg, rgba(30, 41, 59, .9) 0%, rgba(51, 65, 85, .9) 100%);
    border-color: rgba(96, 165, 250, .2)
}

body.dark-theme .modern-graph-canvas:hover {
    box-shadow: 0 6px 24px rgba(96, 165, 250, .2);
    border-color: rgba(96, 165, 250, .4)
}

body.dark-theme .graph-description {
    background: linear-gradient(135deg, rgba(59, 130, 246, .15) 0%, rgba(96, 165, 250, .1) 100%);
    border-left-color: #60a5fa;
    color: #93c5fd
}

body.dark-theme .graph-description::before {
    background: #60a5fa
}

@media (max-width:768px) {
    .graph-controls {
        flex-direction: column;
        gap: 1rem
    }

    .control-group {
        justify-content: center;
        flex-wrap: wrap
    }

    .graph-btn {
        padding: .6rem .8rem;
        font-size: .8rem
    }

    .modern-graph-canvas {
        height: 350px !important
    }

    .graph-container {
        padding: 1rem;
        margin: 1rem 0
    }

    .graph-info {
        font-size: .75rem;
        text-align: center
    }
}

@media (max-width:480px) {
    .modern-graph-canvas {
        height: 300px !important
    }

    .graph-btn {
        padding: .5rem .7rem;
        font-size: .75rem
    }

    .btn-icon {
        font-size: .9rem
    }
}

.hindi-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1)
}

.hindi-table th {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem
}

.hindi-table td {
    padding: .8rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.2rem
}

.hindi-vowel,
.hindi-matra,
.hindi-consonants {
    font-family: 'Noto Sans Devanagari', 'Mangal', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #1976d2
}

.hindi-example {
    font-family: 'Noto Sans Devanagari', 'Mangal', serif;
    color: #388e3c;
    font-weight: 500
}

.vowel-type {
    background: rgba(25, 118, 210, .1);
    border-radius: 6px;
    padding: .3rem .6rem;
    font-size: .9rem;
    color: #1565c0;
    font-weight: 500
}

.consonant-category {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4ff 100%);
    border: 2px solid #42a5f5;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(66, 165, 245, .15)
}

.consonant-category h5 {
    color: #1976d2;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #42a5f5;
    padding-bottom: .5rem
}

.category-description {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem
}

.category-count {
    background: rgba(66, 165, 245, .2);
    padding: .5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem
}

.consonant-groups {
    display: grid;
    gap: .8rem;
    margin-top: 1rem
}

.consonant-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #42a5f5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05)
}

.consonant-list {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem
}

.vowel-category {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(255, 152, 0, .15)
}

.vowel-category h5 {
    color: #f57c00;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #ff9800;
    padding-bottom: .5rem
}

.vowel-type-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05)
}

.vowel-type-info h6 {
    color: #f57c00;
    margin-bottom: .5rem
}

.pronunciation-places {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0
}

.pronunciation-place {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 12px rgba(76, 175, 80, .15)
}

.pronunciation-place h6 {
    color: #2e7d32;
    margin-bottom: .8rem;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(76, 175, 80, .1);
    padding: .5rem;
    border-radius: 6px
}

.combination-rules {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0
}

.combination-rule {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border: 2px solid #e91e63;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 12px rgba(233, 30, 99, .15)
}

.combination-rule h6 {
    color: #c2185b;
    margin-bottom: .8rem;
    font-size: 1.1rem;
    background: rgba(233, 30, 99, .1);
    padding: .5rem;
    border-radius: 6px
}

.practice-exercises {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0
}

.practice-exercise {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 2px solid #9c27b0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(156, 39, 176, .15)
}

.practice-exercise h6 {
    color: #7b1fa2;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(156, 39, 176, .1);
    padding: .8rem;
    border-radius: 8px
}

/* Modern Rich Back Button Design */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #667eea 50%, #f093fb 75%, #667eea 100%);
    background-size: 300% 300%;
    color: #fff !important;
    border: none;
    border-radius: 16px;
    text-decoration: none;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.4),
        0 2px 8px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    animation: gradientFlow 8s ease infinite;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.back-btn::after {
    content: '←';
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.back-btn:hover,
.back-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 25%, #f093fb 50%, #667eea 75%, #764ba2 100%);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 4px 15px rgba(118, 75, 162, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation-duration: 4s;
    outline: none;
}

.back-btn:hover::before,
.back-btn:focus::before {
    left: 100%;
}

.back-btn:hover::after,
.back-btn:focus::after {
    transform: translateX(-4px) scale(1.1);
}

.back-btn:active {
    transform: translateY(-1px) scale(0.98);
    animation-duration: 2s;
}

/* Dark theme support */
body.dark-theme .back-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 300% 300%;
    box-shadow: 
        0 4px 15px rgba(59, 130, 246, 0.4),
        0 2px 8px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-theme .back-btn:hover,
body.dark-theme .back-btn:focus {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 25%, #8b5cf6 50%, #a855f7 75%, #d946ef 100%);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.5),
        0 4px 15px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }
    
    .back-btn::after {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .back-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }
    
    .back-btn::after {
        font-size: 1rem;
    }
}

/* Specialized Back Button Variations */
.back-to-topics-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 25%, #047857 50%, #065f46 75%, #064e3b 100%);
    background-size: 300% 300%;
}

.back-to-topics-btn::after {
    content: '📚';
    font-size: 1rem;
}

.back-to-topics-btn:hover,
.back-to-topics-btn:focus {
    background: linear-gradient(135deg, #059669 0%, #047857 25%, #065f46 50%, #064e3b 75%, #052e16 100%);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.4),
        0 4px 15px rgba(5, 150, 105, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.back-to-subtopic-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 25%, #b45309 50%, #92400e 75%, #78350f 100%);
    background-size: 300% 300%;
}

.back-to-subtopic-btn::after {
    content: '📖';
    font-size: 1rem;
}

.back-to-subtopic-btn:hover,
.back-to-subtopic-btn:focus {
    background: linear-gradient(135deg, #d97706 0%, #b45309 25%, #92400e 50%, #78350f 75%, #451a03 100%);
    box-shadow: 
        0 8px 25px rgba(245, 158, 11, 0.4),
        0 4px 15px rgba(217, 119, 6, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Dark theme variations */
body.dark-theme .back-to-topics-btn {
    background: linear-gradient(135deg, #065f46 0%, #047857 25%, #059669 50%, #10b981 75%, #34d399 100%);
}

body.dark-theme .back-to-topics-btn:hover,
body.dark-theme .back-to-topics-btn:focus {
    background: linear-gradient(135deg, #047857 0%, #059669 25%, #10b981 50%, #34d399 75%, #6ee7b7 100%);
}

body.dark-theme .back-to-subtopic-btn {
    background: linear-gradient(135deg, #92400e 0%, #b45309 25%, #d97706 50%, #f59e0b 75%, #fbbf24 100%);
}

body.dark-theme .back-to-subtopic-btn:hover,
body.dark-theme .back-to-subtopic-btn:focus {
    background: linear-gradient(135deg, #b45309 0%, #d97706 25%, #f59e0b 50%, #fbbf24 75%, #fcd34d 100%);
}

body.dark-theme .hindi-table {
    background: rgba(30, 41, 59, .9)
}

body.dark-theme .hindi-table th {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%)
}

body.dark-theme .hindi-table td {
    border-bottom-color: rgba(148, 163, 184, .3);
    color: #e2e8f0
}

body.dark-theme .hindi-vowel,
body.dark-theme .hindi-matra,
body.dark-theme .hindi-consonants {
    color: #60a5fa
}

body.dark-theme .hindi-example {
    color: #34d399
}

body.dark-theme .consonant-category {
    background: linear-gradient(135deg, rgba(30, 41, 59, .6) 0%, rgba(51, 65, 85, .8) 100%);
    border-color: #60a5fa
}

body.dark-theme .vowel-category {
    background: linear-gradient(135deg, rgba(45, 55, 72, .6) 0%, rgba(68, 64, 60, .8) 100%);
    border-color: #fbbf24
}

body.dark-theme .pronunciation-place {
    background: linear-gradient(135deg, rgba(6, 78, 59, .6) 0%, rgba(5, 150, 105, .4) 100%);
    border-color: #10b981
}

body.dark-theme .combination-rule {
    background: linear-gradient(135deg, rgba(76, 29, 149, .3) 0%, rgba(147, 51, 234, .2) 100%);
    border-color: #a855f7
}

body.dark-theme .practice-exercise {
    background: linear-gradient(135deg, rgba(88, 28, 135, .3) 0%, rgba(168, 85, 247, .2) 100%);
    border-color: #a855f7
}

@media (max-width:768px) {
    .hindi-table {
        font-size: .9rem
    }

    .hindi-vowel,
    .hindi-matra,
    .hindi-consonants {
        font-size: 1.2rem
    }

    .pronunciation-places {
        grid-template-columns: 1fr
    }

    .consonant-category,
    .vowel-category,
    .pronunciation-place,
    .combination-rule,
    .practice-exercise {
        padding: 1rem;
        margin: 1rem 0
    }
}

.section-padding {
    padding: 4rem 0
}

.hero-actions {
    margin-top: 2rem
}

.subjects-grid,
.topic-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: 1fr
}

@media (min-width:480px) {

    .subjects-grid,
    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))
    }
}

@media (min-width:768px) {

    .subjects-grid,
    .topic-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
    }
}

@media (min-width:1280px) {
    .subjects-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .topic-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media (min-width:1600px) {
    .topic-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

.subject-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all .3s ease, box-shadow .3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: fit-content;
    min-width: 240px;
    box-sizing: border-box;
    border-left: 4px solid transparent;
    background: linear-gradient(135deg, rgba(255, 255, 255, .95) 0%, rgba(102, 126, 234, .08) 100%);
    border: 2px solid rgba(102, 126, 234, .2);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, .15)
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-hover) 50%, var(--primary-color) 100%);
    z-index: 1
}

body.dark-theme .subject-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, .95) 0%, rgba(102, 126, 234, .12) 100%);
    border-color: rgba(102, 126, 234, .3);
    color: var(--text-primary)
}

.subject-card:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, .2), 0 0 0 1px rgba(102, 126, 234, .1);
    transform: translateY(-5px) scale(1.02);
    border-color: transparent;
    border-left-width: 6px;
    text-decoration: none
}

.subject-card:hover::before {
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff6b6b 50%, var(--primary-color) 100%);
    height: 5px
}

.subject-card h2,
.subject-card h3,
.subject-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: .75rem;
    letter-spacing: -.025em;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%
}

.subject-card p {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: .75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto
}

@media (max-width:480px) {
    .subject-card {
        padding: 1rem
    }

    .subject-card h2,
    .subject-card h3,
    .subject-card h4 {
        font-size: 1rem;
        line-height: 1.3
    }

    .subject-card p {
        font-size: .8rem;
        line-height: 1.5
    }
}

@media (min-width:481px) and (max-width:768px) {

    .subject-card h2,
    .subject-card h3,
    .subject-card h4 {
        font-size: 1.05rem
    }

    .subject-card p {
        font-size: .825rem
    }
}

@media (min-width:1440px) {

    .subject-card h2,
    .subject-card h3,
    .subject-card h4 {
        font-size: 1.2rem;
        line-height: 1.4
    }

    .subject-card p {
        font-size: .9rem
    }
}

.subject-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: .75rem;
    flex-shrink: 0
}

.subject-card-text-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    flex-grow: 1
}

.subject-intro-snippet {
    margin-bottom: .75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border-subtle);
    position: relative
}

.subject-card .topic-count {
    font-size: .75rem;
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, .1), rgba(118, 75, 162, .1));
    padding: .4rem .8rem;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, .2);
    font-weight: 500;
    letter-spacing: .5px
}

.subject-card .arrow {
    color: #667eea;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all .3s ease;
    text-shadow: 0 1px 2px rgba(102, 126, 234, .2)
}

.subject-card:hover .arrow {
    transform: translateX(6px) scale(1.2);
    color: #764ba2;
    text-shadow: 0 2px 4px rgba(118, 75, 162, .3)
}

@media (max-width:768px) {

    .subjects-grid,
    .topic-grid {
        gap: 1rem;
        margin: 1.5rem 0
    }
}

body.dark-theme .subject-card {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-primary)
}

body.dark-theme .subject-card:hover {
    border-color: var(--primary-color)
}

.feature-section {
    background: var(--surface-color)
}

.feature-cards-grid {
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr)
}

@media (max-width:768px) {
    .feature-cards-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:480px) {
    .feature-cards-grid {
        grid-template-columns: 1fr
    }
}

.feature-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .3s ease, box-shadow .3s ease
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md)
}

.feature-card-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4
}

.feature-card-description {
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1
}

body.dark-theme .feature-card {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .2)
}

body.dark-theme .feature-card:hover {
    box-shadow: 0 8px 10px -3px rgba(0, 0, 0, .3), 0 4px 6px -4px rgba(0, 0, 0, .3)
}

.main-content .katex,
.main-content .katex-display {
    font-size: 1em !important
}

@media (max-width:768px) {

    .main-content .katex,
    .main-content .katex-display {
        font-size: 1.15em !important
    }
}