* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #FF1493;
    --color-primary-light: #FF69B4;
    --color-primary-lighter: #FFB6D9;
    --color-bg-light: #FAF8F5;
    --color-bg-white: #FFFFFF;
    --color-bg-pink: #FFF5F9;
    --color-text-dark: #2C2C2C;
    --color-text-gray: #666666;
    --color-border: #F0E8E0;
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.navbar {
    background-color: var(--color-bg-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(255, 20, 147, 0.05);
    height: 82px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 50px;
    width: auto;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 82px);
    overflow: hidden;
}

.slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slideshow-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 900px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.slideshow-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.slideshow-subtitle {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
}

.slideshow-description {
    font-size: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.scroll-arrow {
    width: 28px;
    height: 28px;
    position: absolute;
    bottom: 80px;
    left: 50%;
    margin-left: -14px;
    z-index: 15;
    cursor: pointer;
    animation: bounce 3s infinite;
    background: none;
    border: none;
    padding: 0;
    outline: none;
}

.scroll-arrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(-45deg);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(14px);
    }
    60% {
        transform: translateY(7px);
    }
}

.page-header {
    background: linear-gradient(135deg, var(--color-bg-white) 0%, var(--color-bg-pink) 100%);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-primary);
}

.content-heading {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin: 2rem 0 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.section {
    padding: 5rem 0;
    background-color: var(--color-bg-white);
}

.section-alt {
    background-color: var(--color-bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--color-text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.welcome-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.welcome-text {
    font-size: 1.25rem;
    color: var(--color-text-gray);
    line-height: 1.9;
}

.intro-section {
    position: relative;
    background-color: var(--color-bg-white);
    scroll-margin-top: 82px; /* Account for sticky navbar when scrolling */
}

.background-color.stretch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.intro-section .container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    padding: 0 4rem;
}

.intro-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.wrap {
    padding-right: 0;
    text-align: left;
}

.wrap h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-dark);
    line-height: 1.4;
    margin-bottom: 2rem;
    text-align: left;
}

.wrap p {
    font-size: 1rem;
    color: var(--color-text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: left;
}

.wrap a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.wrap a:hover {
    text-decoration: underline;
}

.intro-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.intro-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.quick-link-card {
    background-color: var(--color-bg-pink);
    padding: 2.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.15);
    border-color: var(--color-primary-lighter);
}

.quick-link-icon {
    margin-bottom: 1.5rem;
}

.quick-link-card h3 {
    font-size: 1.5rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.quick-link-card p {
    color: var(--color-text-gray);
    line-height: 1.7;
}

.affiliation {
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--color-bg-pink);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.affiliation p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--color-primary-light);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.research-card {
    background-color: var(--color-bg-white);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.15);
    border-color: var(--color-primary-lighter);
}

.research-icon {
    margin-bottom: 1.5rem;
}

.icon-shape {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 8px;
}

.research-card h3 {
    font-size: 1.375rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.research-card p {
    color: var(--color-text-gray);
    line-height: 1.7;
}

.team-leader {
    margin-bottom: 4rem;
}

.leader-card {
    background-color: var(--color-bg-pink);
    padding: 3rem;
    border-radius: 16px;
    max-width: 900px;
    margin: 0 auto;
    border-left: 6px solid var(--color-primary);
}

.leader-info h3 {
    font-size: 2rem;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.leader-title {
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 2rem;
}

.leader-credentials {
    margin-bottom: 2rem;
}

.leader-credentials strong {
    font-size: 1.125rem;
    color: var(--color-text-dark);
}

.leader-credentials ul {
    list-style: none;
    margin-top: 0.5rem;
}

.leader-credentials li {
    padding: 0.5rem 0;
    color: var(--color-text-gray);
    padding-left: 1.5rem;
    position: relative;
}

.leader-credentials li::before {
    content: '▸';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.leader-bio {
    margin-bottom: 2rem;
}

.leader-bio p {
    color: var(--color-text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.team-section-title {
    font-size: 1.75rem;
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: 2rem;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.stat-card {
    background-color: var(--color-bg-pink);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--color-primary-lighter);
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--color-text-dark);
    font-weight: 500;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.75rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

.contact-info > p {
    font-size: 1.125rem;
    color: var(--color-text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-item {
    background-color: var(--color-bg-white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.contact-item strong {
    display: block;
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
}

.contact-item p {
    color: var(--color-text-gray);
    line-height: 1.8;
}

.contact-item a {
    display: inline-block;
    margin-top: 0.25rem;
}

.footer {
    background-color: var(--color-text-dark);
    color: white;
    padding: 2.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.footer-brand span {
    font-weight: 600;
    line-height: 1.4;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .slideshow-title {
        font-size: 2.5rem;
    }
    
    .slideshow-subtitle {
        font-size: 1.75rem;
    }
    
    .slideshow-description {
        font-size: 1.125rem;
    }

    .slideshow-container {
        height: calc(70vh - 82px);
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .intro-section .container {
        padding: 0 2rem;
    }

    .intro-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .wrap {
        padding-right: 0;
    }

    .wrap h2 {
        font-size: 1.5rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .leader-card {
        padding: 2rem;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
    
    .nav-logo {
        height: 40px;
    }
}

/* ============================================
   ENHANCED FEATURES - New Additions
   ============================================ */

/* Skip to content link - Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.375rem;
    z-index: 10001;
    position: relative;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: var(--color-text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line {
    background-color: var(--color-primary);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-width: 400px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        color: var(--color-text-dark) !important;
        font-size: 1rem;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
        position: relative;
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        background-color: var(--color-bg-light);
        color: var(--color-primary) !important;
    }
    
    .nav-menu a.active {
        background-color: var(--color-bg-light);
        color: var(--color-primary) !important;
    }
}

/* Slideshow controls */
.slideshow-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 12;
    transition: all 0.3s ease;
    opacity: 0;
}

.slideshow-container:hover .slideshow-control {
    opacity: 1;
}

.slideshow-control:hover {
    background-color: rgba(255, 20, 147, 0.8);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.slideshow-control:focus {
    opacity: 1;
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.slideshow-control.prev {
    left: 2rem;
}

.slideshow-control.next {
    right: 2rem;
}

.slideshow-control span {
    line-height: 1;
    margin-top: -5px;
}

/* Slideshow indicators */
.slideshow-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 15;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.indicator.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    width: 32px;
    border-radius: 6px;
}

.indicator:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 7rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top:focus {
    outline: 3px solid var(--color-primary-lighter);
    outline-offset: 3px;
}

/* Enhanced Footer */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column h4 {
    color: var(--color-primary-light);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9375rem;
}

.footer-column a:hover {
    color: var(--color-primary-lighter);
}

.footer-address {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 5rem;
        width: 45px;
        height: 45px;
    }
    
    .slideshow-control {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }
    
    .slideshow-control.prev {
        left: 1rem;
    }
    
    .slideshow-control.next {
        right: 1rem;
    }
}

/* Focus visible for keyboard navigation */
body.keyboard-nav *:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Improved link focus states */
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 3px;
}

button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Enhanced animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animate-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Smooth page transitions */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Enhanced card hover effects */
.quick-link-card,
.research-card {
    position: relative;
    overflow: hidden;
}

.quick-link-card::before,
.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 20, 147, 0.1), transparent);
    transition: left 0.5s ease;
}

.quick-link-card:hover::before,
.research-card:hover::before {
    left: 100%;
}

/* Print styles */
@media print {
    .navbar,
    .skip-to-content,
    .mobile-menu-toggle,
    .slideshow-control,
    .slideshow-indicators,
    .scroll-arrow,
    .back-to-top,
    .footer-links {
        display: none !important;
    }
    
    .slideshow-container {
        height: auto !important;
        min-height: 200px;
    }
    
    .slide {
        position: relative !important;
        opacity: 0 !important;
    }
    
    .slide.active {
        opacity: 1 !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.875rem;
        color: #666;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .navbar {
        border-bottom: 2px solid currentColor;
    }
}

/* Dark mode support (keeping pink theme) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-light: #1a1a1a;
        --color-bg-white: #2a2a2a;
        --color-bg-pink: #3a2a3a;
        --color-text-dark: #f0f0f0;
        --color-text-gray: #c0c0c0;
        --color-border: #3a3a3a;
    }
    
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .navbar {
        background-color: #2a2a2a;
        box-shadow: 0 2px 10px rgba(255, 20, 147, 0.2);
    }
    
    .nav-title,
    .nav-menu a {
        color: #f0f0f0;
    }
    
    .slideshow-overlay {
        text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
    }
    
    /* Sections and cards */
    .section,
    .section-alt {
        background-color: #1a1a1a;
    }
    
    .intro-section {
        background-color: #1a1a1a;
    }
    
    .page-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #3a2a3a 100%);
    }
    
    .quick-link-card,
    .research-card,
    .software-card,
    .news-card,
    .tool-card,
    .step-card,
    .stat-card,
    .leader-card {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
        color: #f0f0f0;
    }
    
    .quick-link-card h3,
    .research-card h3,
    .content-heading,
    .section-title,
    .page-title,
    .news-card-title,
    .tool-card h3,
    .step-card h3,
    .software-header h2,
    h1, h2, h3, h4, h5, h6 {
        color: #f0f0f0;
    }
    
    .quick-link-card p,
    .research-card p,
    .about-text p,
    .welcome-text,
    .wrap p,
    .tool-card p,
    .news-card-summary,
    .software-tagline,
    .software-description,
    p {
        color: #c0c0c0;
    }
    
    /* Forms and inputs */
    .search-input,
    .ai-chat-input,
    .newsletter-form input {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
        color: #f0f0f0;
    }
    
    .search-input::placeholder,
    .ai-chat-input::placeholder,
    .newsletter-form input::placeholder {
        color: #808080;
    }
    
    /* Filter buttons */
    .filter-container,
    .tag-cloud {
        background-color: #3a2a3a;
    }
    
    .filter-btn,
    .tag-btn {
        background-color: #2a2a2a;
        color: #f0f0f0;
        border-color: #FF69B4;
    }
    
    /* Mobile menu */
    .nav-menu {
        background-color: #2a2a2a;
    }
    
    .hamburger-line {
        background-color: #f0f0f0;
    }
    
    /* Footer */
    .footer {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .footer-text {
        color: #c0c0c0;
    }
    
    .footer-column a {
        color: #c0c0c0;
    }
    
    /* Contact and other content boxes */
    .contact-item,
    .affiliation,
    .citation-box,
    .newsletter-container,
    .comparison-tool {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }
    
    .contact-item strong,
    .contact-info h3 {
        color: #f0f0f0;
    }
    
    .contact-item p,
    .contact-info > p {
        color: #c0c0c0;
    }
    
    /* AI Chat Widget Dark Mode */
    .ai-chat-widget {
        /* No background change needed - button handles its own */
    }
    
    .ai-chat-toggle {
        /* Gradient button stays the same */
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    .ai-chat-window {
        background-color: #2a2a2a;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    }
    
    .ai-chat-header {
        /* Gradient header stays the same */
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    .chat-header-text h3,
    .chat-header-text p,
    .status-text,
    .status-label {
        color: white; /* Already white in gradient header */
    }
    
    .ai-avatar {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .ai-chat-messages {
        background-color: #1a1a1a !important;
    }
    
    /* Scrollbar in chat messages */
    .ai-chat-messages::-webkit-scrollbar-track {
        background: #1a1a1a;
    }
    
    .ai-chat-messages::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: 3px;
    }
    
    .chat-message {
        /* Base message styling */
    }
    
    .user-message .message-content {
        /* User messages keep their gradient */
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
        color: white;
    }
    
    .assistant-message .message-content {
        background-color: #2a2a2a !important;
        color: #f0f0f0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    /* Ensure text formatting in messages is visible */
    .assistant-message .message-content strong {
        color: #ffffff;
        font-weight: 600;
    }
    
    .assistant-message .message-content em {
        color: #e0e0e0;
    }
    
    .assistant-message .message-content br + br {
        /* Multiple line breaks */
    }
    
    .message-time {
        color: #808080;
    }
    
    .typing-indicator .message-content {
        background-color: #2a2a2a;
    }
    
    .typing-dots span {
        background-color: var(--color-primary-light);
    }
    
    .model-badge {
        background: linear-gradient(135deg, rgba(100, 149, 237, 0.3), rgba(138, 43, 226, 0.3));
        color: rgba(138, 179, 255, 1);
        border-color: rgba(100, 149, 237, 0.5);
    }
    
    .error-message .message-content {
        background-color: #3a1a1a;
        color: #ffcccc;
        border-color: #cc0000;
    }
    
    .ai-chat-input-container {
        background-color: #2a2a2a;
        border-top: 1px solid #3a3a3a;
    }
    
    .suggested-questions {
        background-color: #2a2a2a;
        border-bottom: 1px solid #3a3a3a;
    }
    
    .suggestion-chip {
        background-color: #3a2a3a;
        border-color: #FF69B4;
        color: #f0f0f0;
    }
    
    .ai-chat-input-wrapper {
        /* Container for input and button */
    }
    
    .ai-chat-input {
        background-color: #1a1a1a;
        border-color: #3a3a3a;
        color: #f0f0f0;
    }
    
    .ai-chat-input::placeholder {
        color: #808080;
    }
    
    .ai-chat-send {
        /* Send button keeps its gradient */
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    .chat-footer-text {
        color: #808080;
    }
    
    .chat-footer-text a,
    .clear-chat {
        color: var(--color-primary-light);
    }
    
    .chat-footer-text a:hover,
    .clear-chat:hover {
        color: var(--color-primary);
    }
    
    .chat-minimize {
        color: white;
        background: none;
        border: none;
    }
    
    /* Modals and overlays */
    .citation-modal-content,
    .qr-modal-content,
    .lightbox-content,
    .notification {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }
    
    .citation-text,
    .qr-url {
        background-color: #1a1a1a;
        color: #c0c0c0;
    }
    
    /* Tables and code blocks */
    .tech-specs {
        background-color: #3a2a3a;
    }
    
    .tech-item,
    .tech-item strong {
        color: #f0f0f0;
    }
    
    /* Search dropdown */
    .search-dropdown {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .search-result-item {
        border-bottom-color: #3a3a3a;
    }
    
    .search-result-item:hover {
        background-color: #3a2a3a;
    }
    
    .search-result-item strong {
        color: #f0f0f0;
    }
    
    /* Timeline */
    .timeline-content {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }
    
    .timeline-date {
        color: var(--color-primary-light);
    }
    
    /* Charts */
    .simple-chart {
        background-color: #2a2a2a;
    }
    
    .bar-value {
        background-color: #2a2a2a;
        color: #f0f0f0;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        background-color: #1a1a1a;
        border-bottom-color: #3a3a3a;
    }
    
    .breadcrumb-list a {
        color: #c0c0c0;
    }
    
    /* Cookie banner */
    .cookie-banner {
        background-color: #2a2a2a;
        border-top-color: var(--color-primary);
    }
    
    .cookie-content p:first-of-type {
        color: #f0f0f0;
    }
    
    .cookie-content p:last-of-type {
        color: #c0c0c0;
    }
    
    /* News content */
    .news-content h1,
    .news-content h2,
    .news-content h3 {
        color: #f0f0f0;
    }
    
    .news-content p,
    .news-content li {
        color: #c0c0c0;
    }
    
    /* Software page specific */
    .feature-list li {
        border-bottom-color: #3a3a3a;
        color: #c0c0c0;
    }
    
    .software-meta {
        border-top-color: #3a3a3a;
        color: #c0c0c0;
    }
    
    .meta-item strong {
        color: #f0f0f0;
    }
    
    /* Support cards */
    .support-card {
        background-color: #3a2a3a;
    }
    
    .support-card p {
        color: #c0c0c0;
    }
    
    /* Table of contents */
    .table-of-contents {
        background-color: #3a2a3a;
    }
    
    .table-of-contents h4 {
        color: #f0f0f0;
    }
    
    .table-of-contents a {
        color: #c0c0c0;
    }
    
    /* Legend items */
    .legend-item {
        color: #f0f0f0;
    }
    
    /* Notification messages */
    .notification-message {
        color: #f0f0f0;
    }
    
    /* Citation modal */
    .citation-modal-content h3,
    .qr-modal-content h3 {
        color: #f0f0f0;
    }
    
    .citation-tab {
        color: #808080;
    }
    
    .citation-tab.active {
        color: var(--color-primary-light);
    }
    
    /* Scrollbar for dark mode */
    ::-webkit-scrollbar-track {
        background: #1a1a1a;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #FF69B4;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-primary);
    }
    
    /* Back to top button */
    .back-to-top {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
        box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    }
    
    /* Scroll progress indicator */
    .scroll-progress {
        background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    /* Share buttons */
    .share-btn {
        background-color: #3a2a3a;
        color: #f0f0f0;
        border-color: #FF69B4;
    }
    
    .share-label {
        color: #f0f0f0;
    }
    
    /* Leader credentials */
    .leader-credentials strong {
        color: #f0f0f0;
    }
    
    .leader-credentials li {
        color: #c0c0c0;
    }
    
    .leader-bio p {
        color: #c0c0c0;
    }
    
    .leader-title {
        color: var(--color-primary-light);
    }
    
    .team-section-title {
        color: #f0f0f0;
    }
    
    /* Stat cards */
    .stat-number {
        color: var(--color-primary-light);
    }
    
    .stat-label {
        color: #f0f0f0;
    }
    
    /* Page subtitle */
    .page-subtitle {
        color: var(--color-primary-light);
    }
    
    /* Links in content */
    .wrap a,
    .about-text a,
    .contact-item a,
    .link {
        color: var(--color-primary-light);
    }
    
    .wrap a:hover,
    .about-text a:hover,
    .contact-item a:hover,
    .link:hover {
        color: var(--color-primary);
    }
    
    /* Featured badge */
    .featured-badge {
        background-color: var(--color-primary);
        color: white;
    }
    
    /* News card date */
    .news-card-date {
        color: var(--color-primary-light);
    }
    
    /* QR share button and install PWA button */
    .qr-share-button,
    .install-pwa-btn {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    /* Button states */
    .btn-primary {
        background-color: var(--color-primary);
    }
    
    .btn-outline {
        background-color: transparent;
        color: var(--color-primary-light);
        border-color: var(--color-primary-light);
    }
    
    /* Citation button */
    .cite-button {
        background-color: #3a2a3a;
        border-color: #FF69B4;
        color: #f0f0f0;
    }
    
    /* Software badge */
    .software-badge {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
        color: white;
    }
    
    /* Section backgrounds */
    .intro-section .background-color {
        background: rgba(26, 26, 26, 0.15) !important;
    }
    
    /* Icon shapes */
    .icon-shape {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    }
    
    /* Confirm dialogs and native UI */
    /* Note: confirm() and alert() dialogs use system styling and can't be styled via CSS */
    
    /* Loading states */
    .loading::after {
        border-color: #3a3a3a;
        border-top-color: var(--color-primary);
    }
    
    /* Selection in dark mode */
    ::selection {
        background-color: var(--color-primary);
        color: white;
    }
    
    ::-moz-selection {
        background-color: var(--color-primary);
        color: white;
    }
}

/* Improved selection styles */
::selection {
    background-color: var(--color-primary-lighter);
    color: var(--color-text-dark);
}

::-moz-selection {
    background-color: var(--color-primary-lighter);
    color: var(--color-text-dark);
}

/* Custom scrollbar (webkit browsers) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-lighter);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Improved image loading */
img {
    max-width: 100%;
    height: auto;
}

img[data-src] {
    filter: blur(10px);
    transition: filter 0.3s ease;
}

img[data-src].loaded {
    filter: blur(0);
}

/* Enhanced performance */
.slideshow,
.slide {
    will-change: opacity;
}

.back-to-top,
.slideshow-control {
    will-change: transform, opacity;
}

/* Search and Filter Styles */
.search-container {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: 50px;
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-gray);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: var(--color-primary);
}

.filter-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--color-bg-pink);
    border-radius: 12px;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--color-primary-lighter);
    background-color: transparent;
    color: var(--color-text-dark);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--color-primary-lighter);
    border-color: var(--color-primary);
    color: white;
}

.filter-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.filter-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-gray);
}

.no-results p:first-child {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .search-input {
        padding: 0.875rem 3rem 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .filter-container {
        padding: 1rem;
    }
    
    .filter-buttons {
        gap: 0.375rem;
    }
    
    .filter-btn {
        padding: 0.4375rem 1rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   ADDITIONAL NEW FEATURES
   ============================================ */

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    width: 0%;
    z-index: 10001;
    transition: width 0.1s ease;
    box-shadow: 0 2px 4px rgba(255, 20, 147, 0.3);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background-color: var(--color-bg-light);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9375rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--color-text-gray);
    font-size: 1.25rem;
}

.breadcrumb-list a {
    color: var(--color-text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-list a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.breadcrumb-list li:last-child {
    color: var(--color-primary);
    font-weight: 600;
}

/* Social Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.share-label {
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 0.9375rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-bg-pink);
    color: var(--color-text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.share-btn:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--color-bg-pink) 0%, var(--color-bg-light) 100%);
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    background-color: var(--color-bg-white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.1);
}

.newsletter-container h3 {
    font-size: 2rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
}

.newsletter-container > p {
    color: var(--color-text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

.newsletter-form button {
    white-space: nowrap;
}

.newsletter-privacy {
    font-size: 0.875rem;
    color: var(--color-text-gray);
    margin-top: 0.5rem;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: bottom 0.4s ease;
    border-top: 3px solid var(--color-primary);
}

.cookie-banner.visible {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.cookie-content p:first-of-type {
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
}

.cookie-content p:last-of-type {
    color: var(--color-text-gray);
    font-size: 0.9375rem;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* Page Load Progress Bar */
.page-load-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    width: 0%;
    z-index: 10002;
    transition: width 0.3s ease, opacity 0.3s ease;
}

/* Notification System */
.notification {
    position: fixed;
    top: -100px;
    right: 2rem;
    background-color: var(--color-bg-white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 500px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--color-primary);
}

.notification.visible {
    top: 5rem;
}

.notification-message {
    flex: 1;
    color: var(--color-text-dark);
    font-size: 0.9375rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-gray);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--color-primary);
}

.notification-success {
    border-left-color: #10B981;
}

.notification-error {
    border-left-color: #EF4444;
}

.notification-info {
    border-left-color: var(--color-primary);
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--color-bg-pink);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid var(--color-primary);
}

.table-of-contents h4 {
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--color-text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.375rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
}

.table-of-contents a:hover {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    padding-left: 1rem;
}

.table-of-contents a.active {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
}

.table-of-contents .toc-level-2 {
    padding-left: 1.5rem;
}

.table-of-contents .toc-level-2 a {
    font-size: 0.9375rem;
}

/* Enhanced Page Header with Share Buttons */
.page-header {
    position: relative;
    padding-bottom: 3rem;
}

/* Smooth Scroll Reveal Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Stagger animation for multiple items */
.animate-on-scroll:nth-child(1) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.4s; }

/* Mobile Responsive for New Features */
@media (max-width: 768px) {
    .breadcrumb-list {
        font-size: 0.875rem;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
    
    .notification.visible {
        top: 4.5rem;
    }
    
    .newsletter-container {
        padding: 1.5rem 1rem;
    }
    
    .newsletter-container h3 {
        font-size: 1.5rem;
    }
    
    .table-of-contents {
        padding: 1rem;
    }
}

/* ============================================
   ADVANCED PREMIUM FEATURES - ROUND 3
   ============================================ */

/* Image Lightbox / Gallery */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close {
    top: -80px;
    right: 0;
}

.lightbox-prev {
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-primary);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 1rem;
    font-size: 1.125rem;
}

.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(255, 20, 147, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Timeline Component */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left .timeline-content {
    margin-right: auto;
    margin-left: 0;
    text-align: right;
    padding-right: calc(50% + 3rem);
}

.timeline-item.right .timeline-content {
    margin-left: auto;
    margin-right: 0;
    padding-left: calc(50% + 3rem);
}

.timeline-content {
    background-color: var(--color-bg-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.1);
    position: relative;
    border-left: 4px solid var(--color-primary);
}

.timeline-item.right .timeline-content {
    border-left: none;
    border-right: 4px solid var(--color-primary);
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border: 4px solid var(--color-bg-white);
    border-radius: 50%;
    top: 1.5rem;
}

.timeline-item.left .timeline-content::before {
    right: calc(-50% - 13px);
}

.timeline-item.right .timeline-content::before {
    left: calc(-50% - 13px);
}

.timeline-date {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
}

/* Advanced Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.search-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-result-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--color-border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--color-bg-pink);
}

.search-result-item strong {
    display: block;
    color: var(--color-text-dark);
    margin-bottom: 0.25rem;
}

.search-result-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-gray);
}

.search-result-item mark {
    background-color: var(--color-primary-lighter);
    color: var(--color-text-dark);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-gray);
}

/* Reading Time Badge */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: var(--color-bg-pink);
    color: var(--color-text-gray);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 1rem;
    vertical-align: middle;
}

.reading-time-badge svg {
    opacity: 0.7;
}

/* Copy to Clipboard Button */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-pink);
    border: 2px solid var(--color-primary-lighter);
    color: var(--color-text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-button:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.copy-button.copied {
    background-color: #10B981;
    border-color: #10B981;
    color: white;
}

/* Comparison Tool */
.comparison-tool {
    background-color: var(--color-bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.1);
}

.comparison-selector h3 {
    margin-bottom: 1.5rem;
    color: var(--color-text-dark);
}

.comparison-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--color-bg-pink);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comparison-item:hover {
    background-color: var(--color-primary-lighter);
}

.comparison-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.comparison-item input[type="checkbox"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

/* Reveal Animations */
[data-reveal] {
    opacity: 0;
}

[data-reveal].reveal-fade {
    animation: revealFade 0.8s ease forwards;
}

[data-reveal].reveal-slide {
    animation: revealSlide 0.8s ease forwards;
}

[data-reveal].reveal-zoom {
    animation: revealZoom 0.8s ease forwards;
}

@keyframes revealFade {
    to {
        opacity: 1;
    }
}

@keyframes revealSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Progress Circles */
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bar {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-circle-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 8;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Enhanced Card Hover Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) translateZ(10px);
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.card-shine:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Floating Animation for Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Morphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Image Hover Effects */
img[data-zoom], .zoomable {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img[data-zoom]:hover, .zoomable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 20, 147, 0.2);
}

/* Skeleton Loading Effect */
.skeleton {
    background: linear-gradient(90deg, 
        var(--color-bg-light) 0%,
        var(--color-bg-pink) 50%,
        var(--color-bg-light) 100%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Mobile Responsive for Advanced Features */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        padding-left: 50px;
        padding-right: 1rem;
        text-align: left;
    }
    
    .timeline-item.left .timeline-content::before,
    .timeline-item.right .timeline-content::before {
        left: -30px;
    }
    
    .comparison-items {
        grid-template-columns: 1fr;
    }
    
    .reading-time-badge {
        margin-left: 0;
        margin-top: 0.5rem;
        display: inline-flex;
    }
}

/* Print Styles for Advanced Features */
@media print {
    .lightbox,
    .copy-button,
    .comparison-tool,
    .search-dropdown {
        display: none !important;
    }
}

/* ============================================
   ULTIMATE FEATURES - ROUND 4 (MAXIMUM)
   ============================================ */

/* Citation Modal */
.citation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.citation-modal.active {
    opacity: 1;
    visibility: visible;
}

.citation-modal-content {
    background-color: var(--color-bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.citation-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.citation-close:hover {
    color: var(--color-primary);
}

.citation-modal-content h3 {
    margin-bottom: 1.5rem;
    color: var(--color-text-dark);
}

.citation-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.citation-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--color-text-gray);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.citation-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.citation-tab:hover {
    color: var(--color-primary);
}

.citation-text {
    background-color: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 1rem;
}

.cite-button {
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-pink);
    border: 2px solid var(--color-primary-lighter);
    color: var(--color-text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.cite-button:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Keyboard Shortcuts Modal - REMOVED (feature disabled) */

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.qr-modal.active {
    opacity: 1;
    visibility: visible;
}

.qr-modal-content {
    background-color: var(--color-bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    position: relative;
    max-width: 400px;
}

.qr-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-gray);
    cursor: pointer;
}

.qr-image {
    width: 250px;
    height: 250px;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qr-url {
    font-size: 0.875rem;
    color: var(--color-text-gray);
    word-break: break-all;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: var(--color-bg-light);
    border-radius: 6px;
}

.qr-share-button {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.qr-share-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

/* Tag Cloud / Filter */
.tag-cloud {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--color-bg-pink);
    border-radius: 12px;
}

.tag-cloud h4 {
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-btn {
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-white);
    border: 2px solid var(--color-primary-lighter);
    color: var(--color-text-dark);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-btn:hover, .tag-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.tag-clear {
    background-color: var(--color-text-gray);
    color: white;
    border-color: var(--color-text-gray);
}

.tag-clear:hover {
    background-color: var(--color-text-dark);
    border-color: var(--color-text-dark);
}

/* Infinite Scroll Loader */
.infinite-scroll-loader {
    text-align: center;
    padding: 3rem 0;
}

.infinite-scroll-loader .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Simple Charts */
.simple-chart {
    background-color: var(--color-bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.1);
    margin: 2rem 0;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Bar Chart */
.chart-bars {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    height: 300px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    animation: barGrow 0.6s ease forwards;
}

@keyframes barGrow {
    from {
        height: 0 !important;
    }
}

.chart-bar:hover {
    filter: brightness(1.1);
}

.bar-value {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--color-text-dark);
    background-color: var(--color-bg-white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bar-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-gray);
    text-align: center;
}

/* Pie Chart */
.pie-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pie-svg {
    width: 250px;
    height: 250px;
    margin-bottom: 1.5rem;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* PWA Install Button */
.install-pwa-btn {
    position: fixed;
    bottom: 160px;
    right: 2rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        right: -200px;
    }
    to {
        right: 2rem;
    }
}

.install-pwa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

/* Stat Cards for Dashboard */
.stat-card {
    background-color: var(--color-bg-white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(255, 20, 147, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   AI CHAT AGENT - Moonshot Integration
   ============================================ */

/* Chat Widget Container */
.ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Chat Toggle Button */
.ai-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 20, 147, 0.5);
}

.ai-chat-toggle svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.ai-chat-toggle .chat-icon {
    display: block;
}

.ai-chat-toggle .close-icon {
    display: none;
}

.ai-chat-widget.open .ai-chat-toggle .chat-icon {
    display: none;
}

.ai-chat-widget.open .ai-chat-toggle .close-icon {
    display: block;
}

/* Pulse Indicator */
.pulse-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background-color: #00ff00;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

.pulse-indicator.has-new {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Chat Window */
.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background-color: var(--color-bg-white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ai-chat-widget.open .ai-chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.ai-chat-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-avatar svg {
    width: 24px;
    height: 24px;
    color: white;
}

.chat-header-text h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.status-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin: 0.25rem 0 0;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-minimize {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.chat-minimize:hover {
    opacity: 0.8;
}

.chat-minimize svg {
    width: 20px;
    height: 20px;
}

/* Chat Messages */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-primary-lighter);
    border-radius: 3px;
}

/* Chat Message */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    align-self: flex-end;
}

.assistant-message {
    align-self: flex-start;
}

.message-content {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .message-content {
    background-color: white;
    color: var(--color-text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-time {
    font-size: 0.6875rem;
    color: var(--color-text-gray);
    margin-top: 0.375rem;
    padding: 0 0.5rem;
}

.user-message .message-time {
    text-align: right;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 0.75rem 1rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Suggested Questions */
.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0.5rem;
    background-color: var(--color-bg-white);
}

.suggestion-chip {
    padding: 0.5rem 0.875rem;
    background-color: var(--color-bg-pink);
    border: 2px solid var(--color-primary-lighter);
    border-radius: 20px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Chat Input Container */
.ai-chat-input-container {
    background-color: var(--color-bg-white);
    border-radius: 0 0 16px 16px;
}

.ai-chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    align-items: flex-end;
}

.ai-chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.3s ease;
}

.ai-chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.ai-chat-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ai-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

.ai-chat-send svg {
    width: 20px;
    height: 20px;
    color: white;
}

.chat-footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-gray);
    padding: 0 1.5rem 1rem;
}

.chat-footer-text a {
    color: var(--color-primary);
    text-decoration: none;
}

.chat-footer-text a:hover {
    text-decoration: underline;
}

/* Model Fallback Badge */
.model-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.2), rgba(138, 43, 226, 0.2));
    color: rgba(100, 149, 237, 1);
    border-radius: 1rem;
    border: 1px solid rgba(100, 149, 237, 0.3);
    font-weight: 500;
}

/* Error Message */
.error-message .message-content {
    background-color: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

/* ============================================
   SOFTWARE & TOOLS PAGE
   ============================================ */

.software-featured {
    margin-bottom: 3rem;
}

.software-card {
    background: var(--color-bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.software-card.featured {
    border: 2px solid var(--color-primary-lighter);
}

.software-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-bg-pink);
}

.software-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
}

.software-tagline {
    color: var(--color-text-gray);
    margin: 0;
    font-size: 1.1rem;
}

.software-badge {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.software-content {
    margin-bottom: 2rem;
}

.software-description {
    line-height: 1.8;
}

.software-description h3 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--color-bg-pink);
    border-radius: 8px;
}

.tech-item {
    color: var(--color-text-dark);
}

.tech-item strong {
    color: var(--color-primary);
}

.software-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.software-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-bg-pink);
    color: var(--color-text-gray);
    font-size: 0.9rem;
}

.meta-item strong {
    color: var(--color-text-dark);
}

/* Getting Started Section */
.getting-started {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    background: var(--color-bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.step-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.step-card code {
    display: block;
    background: var(--color-bg-dark);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.15);
}

.tool-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--color-text-gray);
    margin-bottom: 1rem;
}

/* Support Grid */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.support-card {
    background: var(--color-bg-pink);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.support-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.support-card p {
    color: var(--color-text-gray);
    margin-bottom: 1rem;
}

.support-card a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.support-card a:hover {
    color: var(--color-primary-dark);
}

/* Citation Box */
.citation-box {
    background: var(--color-bg-pink);
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
}

.citation-box h3 {
    color: var(--color-primary);
    margin-top: 0;
}

.citation-text {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.section-block {
    margin-top: 4rem;
}

.section-block h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-primary-lighter);
}

/* Button Styles */
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Mobile Optimizations for Ultimate Features */
@media (max-width: 768px) {
    .citation-modal-content,
    .qr-modal-content {
        padding: 1.5rem;
    }
    
    .citation-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .citation-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .citation-text {
        font-size: 0.75rem;
    }
    
    .chart-bars {
        height: 200px;
    }
    
    .qr-share-button {
        bottom: 80px;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .install-pwa-btn {
        bottom: 130px;
        right: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    /* AI Chat Agent Mobile */
    .ai-chat-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .ai-chat-toggle {
        width: 56px;
        height: 56px;
    }
    
    .ai-chat-window {
        width: calc(100vw - 30px);
        height: 75vh;
        max-height: 650px;
        bottom: 70px;
        right: -5px;
    }
    
    .suggested-questions {
        padding: 0.75rem 1rem 0.5rem;
    }
    
    .suggestion-chip {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* News Cards */
.news-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.news-card {
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.15);
    transform: translateY(-2px);
}

.news-card.open {
    border-color: var(--color-primary);
}

.news-card-header {
    margin-bottom: 1rem;
}

.news-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.featured-badge {
    background-color: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.news-card-date {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.news-card-summary {
    color: var(--color-text-gray);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.news-card-arrow {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-arrow:hover {
    opacity: 0.7;
}

.news-card-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
    color: var(--color-text-dark);
    line-height: 1.8;
}

.news-content h1,
.news-content h2,
.news-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.news-content p {
    margin-bottom: 1rem;
}

.news-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.news-content ul,
.news-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .news-card {
        padding: 1.5rem;
    }
    
    .news-card-title {
        font-size: 1.25rem;
        padding-right: 2rem;
    }
    
    .news-card-arrow {
        top: 1.5rem;
        right: 1.5rem;
    }
}
