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

body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: white;
    min-height: 100vh;
    font-size: 16px; /* Default font size */
    overflow-x: hidden; /* Prevent horizontal scrolling; allow vertical scrolling */
}

body.landing-active {
    overflow: hidden; /* Prevent scrolling when landing page is active */
}

/* Landing Page Styles */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Animated Background Elements */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 4px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}

.landing-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
}

.landing-content {
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero-section {
    margin-bottom: 80px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    animation: slideInDown 1s ease-out 0.2s both;
}

.badge-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.1;
    animation: slideInUp 1s ease-out 0.4s both;
}

.title-line-1 {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line-2 {
    display: block;
    background: linear-gradient(135deg, #4bf0fc 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
    animation: slideInUp 1s ease-out 0.6s both;
}

.content-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 30px;
    margin: 0 auto 3rem auto;
    width: 100%;
    max-width: 600px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.video-container iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 2px;
}

.landing-divider {
    width: 100%;
    height: 2px;
    background-color: white;
    margin: 2rem auto;
    opacity: 0.3;
}

.gain-access-heading {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    text-align: center;
    margin: 2rem auto 1.5rem auto;
    opacity: 0.9;
    letter-spacing: 1px;
}

.access-subheading {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    margin: 0;
    position: absolute;
    top: 15px;
    left: 15px;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.access-pricing {
    font-size: 1rem;
    font-weight: normal;
    font-style: italic;
    color: white;
    margin: 0;
    position: absolute;
    top: 50px;
    left: 15px;
    opacity: 0.8;
}

.rectangles-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    gap: 20px;
}

.vertical-rectangle {
    width: calc(50% - 10px);
    height: 350px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    backdrop-filter: blur(10px);
    position: relative;
    padding: 15px;
}

.content-placeholder-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.6;
}

/* Features Section */
.features-section {
    margin-bottom: 80px;
    animation: slideInUp 1s ease-out 0.8s both;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 50px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 30px 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4bf0fc;
    margin-bottom: 20px;
    display: block;
    background: rgba(75, 240, 252, 0.1);
    border: 1px solid rgba(75, 240, 252, 0.3);
    border-radius: 4px;
    padding: 10px;
    width: 50px;
    height: 50px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Pricing Section */
.pricing-section {
    margin-bottom: 80px;
    animation: slideInUp 1s ease-out 1s both;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.pricing-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: linear-gradient(135deg, #4bf0fc, #007bff);
    color: white;
    padding: 8px 20px;
    border-radius: 0 0 4px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-badge.best-value {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
}

.pricing-header {
    margin-bottom: 30px;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.currency {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

.period {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.savings-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 30px;
}

.feature-item {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CTA Section */
.cta-section {
    margin-bottom: 60px;
    animation: slideInUp 1s ease-out 1.2s both;
}

.cta-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 50px 40px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.enter-library-btn {
    background: linear-gradient(135deg, #555 0%, #666 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.enter-library-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.enter-library-btn:hover::before {
    left: 100%;
}

.enter-library-btn:hover {
    background: linear-gradient(135deg, #666 0%, #777 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.enter-library-btn:active {
    transform: translateY(0);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.enter-library-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Animation Keyframes */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Landing Page Responsive Design */
@media (max-width: 768px) {
    .landing-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .content-placeholder {
        padding: 20px;
        min-height: 150px;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .enter-library-btn {
        padding: 12px 30px;
        font-size: 1rem;
        min-width: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-content {
        padding: 30px 20px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .floating-shape {
        display: none;
    }
    
    .landing-content {
        margin-top: 20px;
    }
    
    .hero-section {
        margin-bottom: 60px;
    }
    
    .features-section,
    .pricing-section {
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .pricing-card {
        padding: 30px 20px;
    }
    
    .cta-content {
        padding: 25px 15px;
    }
    
    .enter-library-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        min-width: 160px;
    }
    
    .access-pricing {
        font-size: 0.9rem;
        top: 40px;
        left: 12px;
    }
    
    .rectangles-container {
        gap: 15px;
        margin-bottom: 1.5rem;
    }
    
    .vertical-rectangle {
        height: 350px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .content-placeholder {
        padding: 15px;
        min-height: 120px;
        margin-bottom: 1.5rem;
    }
    
    .enter-library-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .landing-content {
        padding: 0 15px;
        margin-top: 60px;
    }
    
    .gain-access-heading {
        font-size: 1.3rem;
        margin: 1rem auto 0.8rem auto;
    }
    
    .access-subheading {
        font-size: 0.9rem;
        top: 10px;
        left: 10px;
    }
    
    .access-pricing {
        font-size: 0.8rem;
        top: 35px;
        left: 10px;
    }
    
    .rectangles-container {
        gap: 10px;
        margin-bottom: 1rem;
    }
    
    .vertical-rectangle {
        height: 350px;
        padding: 10px;
    }
}

/* Back Arrow Button Styles */
.back-arrow-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.back-arrow-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.back-arrow-btn:active {
    transform: translateX(-1px);
}

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

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Font Size Classes */
body.font-size-small {
    font-size: 14px;
}

body.font-size-small .nav-btn,
body.font-size-small .search-bar,
body.font-size-small .filter-dropdown,
body.font-size-small .sort-dropdown,
body.font-size-small .modal-title,
body.font-size-small .form-label,
body.font-size-small .form-input,
body.font-size-small .form-textarea,
body.font-size-small .form-select {
    font-size: 12px;
}

body.font-size-small h1 {
    font-size: 24px;
}

body.font-size-small h2 {
    font-size: 20px;
}

body.font-size-small h3 {
    font-size: 18px;
}

body.font-size-small h4 {
    font-size: 16px;
}

body.font-size-normal {
    font-size: 16px;
}

body.font-size-normal .nav-btn,
body.font-size-normal .search-bar,
body.font-size-normal .filter-dropdown,
body.font-size-normal .sort-dropdown,
body.font-size-normal .modal-title,
body.font-size-normal .form-label,
body.font-size-normal .form-input,
body.font-size-normal .form-textarea,
body.font-size-normal .form-select {
    font-size: 14px;
}

body.font-size-normal h1 {
    font-size: 32px;
}

body.font-size-normal h2 {
    font-size: 28px;
}

body.font-size-normal h3 {
    font-size: 24px;
}

body.font-size-normal h4 {
    font-size: 20px;
}

body.font-size-large {
    font-size: 18px;
}

body.font-size-large .nav-btn,
body.font-size-large .search-bar,
body.font-size-large .filter-dropdown,
body.font-size-large .sort-dropdown,
body.font-size-large .modal-title,
body.font-size-large .form-label,
body.font-size-large .form-input,
body.font-size-large .form-textarea,
body.font-size-large .form-select {
    font-size: 16px;
}

body.font-size-large h1 {
    font-size: 40px;
}

body.font-size-large h2 {
    font-size: 36px;
}

body.font-size-large h3 {
    font-size: 32px;
}

body.font-size-large h4 {
    font-size: 28px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* Reserve space for fixed header and make only content scrollable */
    margin-top: 90px; /* match header height */
    height: calc(100vh - 90px);
    overflow-y: auto;
}

/* Top Navigation Bar */
.top-nav {
    background-color: #0f0f0f;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: #333;
}

.nav-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.nav-btn.active {
    background-color: #444;
    color: white;
}

/* Admin Add Button */
.admin-add-btn {
    background-color: #4bf0fc;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-add-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.admin-add-btn:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

.add-icon {
    font-size: 22px;
    line-height: 1;
    font-weight: bold;
}

/* Sign In Button */
.sign-in-btn {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sign-in-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #0056b3;
    color: #0056b3;
}

.sign-in-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.sign-out-btn {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sign-out-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #c82333;
    color: #c82333;
}

.sign-out-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.vertical-divider {
    width: 1px;
    height: 20px;
    background-color: #333;
    margin: 0 10px;
}

/* Main Content Area */
.main-content {
    text-align: center;
    padding: 10px;
}

.welcome-section {
    margin-top: 1px;
    margin-bottom: 20px;
}

.title-with-add-button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    min-height: 60px;
}

.title-with-add-button h1 {
    font-size: 2.5rem;
    color: white;
    margin: 0;
    font-weight: 700;
    text-align: center;
}

.title-center {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.info-btn {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}
.info-btn:hover { 
    border-color: #ccc; 
    color: #fff; 
    background-color: rgba(255, 255, 255, 0.1);
}
.info-btn:focus { outline: none; }

.title-center .admin-add-btn {
    position: static;
}

/* Fine-tune main library add button position more to the left of the centered title */
.title-with-add-button #adminAddBtnMain {
    position: absolute;
    right: calc(50% + 320px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Drug-Exercise Considerations admin button position */
.title-with-add-button #adminAddBtnDrugExercise {
    position: absolute;
    right: calc(50% + 420px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Drug-Exercise Considerations categories container */
.drug-exercise-categories-container {
    margin-top: 15px;
}

.drug-exercise-category-section {
    margin-bottom: 20px;
}

.drug-exercise-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.drug-exercise-category-header:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.drug-exercise-category-header.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.drug-exercise-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.drug-exercise-category-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: #ccc;
}

.drug-exercise-category-header.active .drug-exercise-category-arrow {
    transform: rotate(180deg);
}

.drug-exercise-subcategories {
    display: none;
    margin-top: 8px;
    padding-left: 20px;
}

.drug-exercise-category-header.active + .drug-exercise-subcategories {
    display: block;
}

.drug-exercise-subcategory-group {
    margin-bottom: 15px;
}

.drug-exercise-subcategory-title {
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    padding-left: 4px;
}

.drug-exercise-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drug-exercise-bubble {
    position: relative;
    display: inline-block;
}

.drug-exercise-bubble input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.drug-exercise-bubble label {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.drug-exercise-bubble input[type="checkbox"]:checked + label {
    background-color: #000;
    border-color: #000;
    color: #fff;
}

.drug-exercise-bubble label:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Drug-Exercise card layout */
.drug-exercise-card-columns {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 20px;
    margin-top: 10px;
    align-items: start;
}

.drug-exercise-card-divider {
    width: 1px;
    background-color: #666;
    height: 100%;
    min-height: 100px;
    justify-self: center;
}

.drug-exercise-card-left-column,
.drug-exercise-card-right-column {
    min-height: 100px;
}

.drug-exercise-card-left-column .library-card-description {
    color: #ccc;
    line-height: 1.5;
    margin-top: 8px;
}

.drug-exercise-category-detail {
    margin-bottom: 15px;
}

.drug-exercise-category-detail-title {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drug-exercise-category-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}



/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .drug-exercise-card-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .drug-exercise-card-divider {
        display: none;
    }
}

/* Drug-Exercise reset buttons */
.drug-exercise-reset-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
    flex-basis: 100%;
    order: 999;
    flex-shrink: 0;
}

/* Ensure reset buttons appear on their own line in the flex container */
#drugExerciseSubfilterSection .drug-exercise-reset-buttons {
    width: 100%;
    flex-basis: 100%;
}

.drug-exercise-reset-btn {
    background: #444;
    color: #ccc;
    border: 1px solid #666;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.drug-exercise-reset-btn:hover {
    background: #555;
    color: #fff;
    border-color: #777;
}

.drug-exercise-reset-btn:active {
    background: #333;
    transform: translateY(1px);
}

/* Drug-Exercise card title and actions layout */
.drug-exercise-title-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.drug-exercise-title-actions-row .library-card-title {
    flex: 1;
    margin: 0;
}

.drug-exercise-card-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drug-exercise-card-buttons .heart-btn {
    margin: 0;
}

.drug-exercise-card-buttons .library-card-admin-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.drug-exercise-card-buttons .library-card-admin-btn {
    background: none;
    border: none;
    color: #ccc;
    padding: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.drug-exercise-card-buttons .library-card-admin-btn:hover {
    color: #fff;
}

/* Drug-exercise card dots follow standard dot behavior */
.drug-exercise-card .category-dot {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.drug-exercise-card .category-dot:hover {
    transform: scale(1.1);
}

/* Override hover for outline style to prevent border color changes */
body.outline-dots .drug-exercise-card .category-dot:hover {
    transform: scale(1.1);
    outline: none;
    box-shadow: none;
}

.drug-exercise-card .category-dot:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Fill Style: All dots filled, active ones get white 1px outline */
body:not(.outline-dots) .drug-exercise-card .category-dot {
    border: 2px solid transparent;
    box-sizing: border-box;
}

body:not(.outline-dots) .drug-exercise-card .category-dot.active {
    border: 1px solid white;
}

/* Outline Style: All dots outlined, active ones get filled */
body.outline-dots .drug-exercise-card .category-dot {
    background-color: transparent;
    border: 2px solid;
    color: white;
    outline: none;
    box-shadow: none;
}

body.outline-dots .drug-exercise-card .category-dot.pharmacological-class {
    border-color: #e74c3c;
}

body.outline-dots .drug-exercise-card .category-dot.therapeutic-use {
    border-color: #f39c12;
}

body.outline-dots .drug-exercise-card .category-dot.legal-regulatory-status {
    border-color: #9b59b6;
}

body.outline-dots .drug-exercise-card .category-dot.route-administration-formulation {
    border-color: #3498db;
}

/* Active state styling for outline mode - using more specific selectors */
body.outline-dots .drug-exercise-card .category-dot.pharmacological-class.active {
    background-color: #e74c3c;
    outline: none;
    box-shadow: none;
}

body.outline-dots .drug-exercise-card .category-dot.therapeutic-use.active {
    background-color: #f39c12;
    outline: none;
    box-shadow: none;
}

body.outline-dots .drug-exercise-card .category-dot.legal-regulatory-status.active {
    background-color: #9b59b6;
    outline: none;
    box-shadow: none;
}

body.outline-dots .drug-exercise-card .category-dot.route-administration-formulation.active {
    background-color: #3498db;
    outline: none;
    box-shadow: none;
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Title section layout */
.title-section-layout {
    line-height: 1;
}

.info-btn {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.info-btn:hover { 
    border-color: #ccc; 
    color: #fff; 
    background-color: rgba(255, 255, 255, 0.1);
}

.info-btn:focus { 
    outline: none; 
}

.loading-message {
    font-size: 1rem;
    color: #999;
    font-weight: 400;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Search and Filter Section */
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.filter-dropdown {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #666;
}

.search-bar {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    min-width: 300px;
}

.search-bar::placeholder {
    color: #999;
}

.search-bar:focus {
    outline: none;
    border-color: #666;
}

/* Subfilter Section */
.subfilter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
}

.subfilter-dropdown {
    /* Match Learn dropdown look */
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    position: relative;
    transition: all 0.3s ease;
}

.subfilter-dropdown.has-selections {
    border-color: white;
    box-shadow: 0 0 0 1px white;
}

.subfilter-dropdown:focus {
    outline: none;
    border-color: #666;
}

/* Fix subfilter dropdown header text turning blue */
.subfilter-dropdown,
.subfilter-dropdown span,
.subfilter-label,
.subfilter-label span {
    color: white;
}

/* Ensure subfilter dropdown headers stay white on focus/active */
.subfilter-dropdown:focus,
.subfilter-dropdown:focus span,
.subfilter-dropdown:focus .subfilter-label,
.subfilter-dropdown:focus .subfilter-label span,
.subfilter-dropdown:active,
.subfilter-dropdown:active span,
.subfilter-dropdown:active .subfilter-label,
.subfilter-dropdown:active .subfilter-label span {
    color: white;
}

/* Prevent text selection highlighting on subfilter headers */
.subfilter-dropdown::selection,
.subfilter-dropdown span::selection,
.subfilter-label::selection,
.subfilter-label span::selection {
    background: transparent;
    color: white;
}

/* Workout Builder Subfilter Categories */
.workout-builder-subfilters {
    margin: 20px 0;
}



.subfilter-buttons-grid.top-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.subfilter-buttons-grid.bottom-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.workout-builder-subfilters .subfilter-dropdown {
    /* Inherit look from base but keep WB buttons shorter */
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 0; /* remove outer padding to reduce overall height */
    border-radius: 6px;
    font-size: 13px; /* slightly smaller than Learn */
    cursor: pointer;
    min-width: 150px;
    position: relative;
    transition: all 0.3s ease;
}

.workout-builder-subfilters .subfilter-dropdown#wbTrainingPurposeDropdown { min-width: 150px; }

.workout-builder-subfilters .subfilter-dropdown#wbMovementPatternDropdown { min-width: 150px; }

.workout-builder-subfilters .subfilter-dropdown.has-selections {
    border-color: white;
    box-shadow: 0 0 0 1px white;
}

.workout-builder-subfilters .subfilter-dropdown:focus {
    outline: none;
    border-color: #666;
}

.workout-builder-subfilters .subfilter-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px; /* tighter header padding lowers height */
    font-size: 13px;
}

.workout-builder-subfilters .subfilter-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.workout-builder-subfilters .subfilter-dropdown.active .subfilter-arrow {
    transform: rotate(180deg);
}

.workout-builder-subfilters .subfilter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    margin-top: 4px;
    max-height: 240px; /* allow more vertical room */
    overflow-y: auto;
    z-index: 1000;
    min-width: 260px; /* ensure options fit horizontally */
}

.workout-builder-subfilters .subfilter-dropdown.active .subfilter-dropdown-content {
    display: block;
}

.workout-builder-subfilters .subfilter-options {
    padding: 8px 0;
}

.workout-builder-subfilters .subfilter-option {
    display: flex;
    align-items: center;
    padding: 6px 10px; /* tighter vertical spacing */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.workout-builder-subfilters .subfilter-option:hover {
    background: #444;
}

.workout-builder-subfilters .subfilter-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.workout-builder-subfilters .subfilter-option span {
    cursor: pointer;
    user-select: none;
}

.workout-builder-subfilters .subfilter-actions {
    border-top: 1px solid #555;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
}

.workout-builder-subfilters .apply-filters-btn,
.workout-builder-subfilters .reset-subfilters-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.workout-builder-subfilters .apply-filters-btn:hover,
.workout-builder-subfilters .reset-subfilters-btn:hover {
    background: #5a6268;
}







.reset-subfilters-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.reset-subfilters-btn:hover {
    background-color: #666;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: white;
    margin: 20px 0;
}

.sort-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.sort-dropdown {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #666;
}

.sort-count {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Library Cards Container */
.library-cards-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.library-card {
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.library-card:hover {
    border-color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Enable hover animation by default */
.library-card:hover {
    transform: scale(1.05);
}

/* Disable hover animation when animations are turned off */
body.disable-card-hover .library-card:hover {
    transform: none;
}

.library-card-collapsed {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.library-card-left-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.library-card-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
}

.library-card-category-dots {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    z-index: 10;
}

.category-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.category-dot:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}



.category-dot.exercises { background-color: #dc3545; }
.category-dot.speed-agility { background-color: #fd7e14; }
.category-dot.balance-stability { background-color: #ffc107; }
.category-dot.mobility-stretches { background-color: #28a745; }
.category-dot.tests-protocols { background-color: #17a2b8; }
.category-dot.sports-drills { background-color: #6f42c1; }
.category-dot.health-diets { background-color: #e83e8c; }
.category-dot.pharmacological-class { background-color: #e74c3c; }
.category-dot.therapeutic-use { background-color: #f39c12; }
.category-dot.legal-regulatory-status { background-color: #9b59b6; }
.category-dot.route-administration-formulation { background-color: #3498db; }

.category-dot.yoga { background-color: #6c757d; }
.category-dot.equipment { background-color: #000000; }
.category-dot.cognitive-performance { background-color: #8B4513; }
.category-dot.water-aerobics { background-color: #000080; }
.category-dot.default { background-color: #6c757d; }/* Workout focus unique colors */
.category-dot.workout-power { background-color: #ff5722; }
.category-dot.workout-strength { background-color: #3f51b5; }
.category-dot.workout-hypertrophy { background-color: #9c27b0; }
.category-dot.workout-speed { background-color: #00bcd4; }
.category-dot.workout-endurance { background-color: #4caf50; }
.category-dot.workout-mobility { background-color: #8bc34a; }

/* Learn subject unique colors */
.category-dot.learn-bio { background-color: #ff7043; }
.category-dot.learn-exphys { background-color: #29b6f6; }
.category-dot.learn-sc { background-color: #7e57c2; }
.category-dot.learn-nut { background-color: #66bb6a; }
.category-dot.learn-psy { background-color: #ec407a; }
.category-dot.learn-data { background-color: #26a69a; }

/* Outline Style Dots */
body.outline-dots .category-dot {
    background-color: transparent;
    border: 2px solid;
    color: white;
}

/* Ensure learn dots also get transparent background in outline mode */
body.outline-dots .category-dot.learn-bio,
body.outline-dots .category-dot.learn-exphys,
body.outline-dots .category-dot.learn-sc,
body.outline-dots .category-dot.learn-nut,
body.outline-dots .category-dot.learn-psy,
body.outline-dots .category-dot.learn-data {
    background-color: transparent;
}

/* Fill Style Dots - restore selection borders */
body:not(.outline-dots) .category-dot {
    border: 2px solid transparent;
    box-sizing: border-box;
}

body:not(.outline-dots) .category-dot.active {
    border: none;
    outline: 2px solid white;
    outline-offset: 0px;
}

body.outline-dots .category-dot.exercises { border-color: #dc3545; }
body.outline-dots .category-dot.speed-agility { border-color: #fd7e14; }
body.outline-dots .category-dot.balance-stability { border-color: #ffc107; }
body.outline-dots .category-dot.mobility-stretches { border-color: #28a745; }
body.outline-dots .category-dot.tests-protocols { border-color: #17a2b8; }
body.outline-dots .category-dot.sports-drills { border-color: #6f42c1; }
body.outline-dots .category-dot.health-diets { border-color: #e83e8c; }
body.outline-dots .category-dot.yoga { border-color: #6c757d; }
body.outline-dots .category-dot.equipment { 
    background-color: transparent; 
    border-color: #000000; 
}
body.outline-dots .category-dot.cognitive-performance { 
    background-color: transparent; 
    border-color: #8B4513; 
}
body.outline-dots .category-dot.water-aerobics { 
    background-color: transparent; 
    border-color: #000080; 
}
body.outline-dots .category-dot.pharmacological-class { border-color: #e74c3c; }
body.outline-dots .category-dot.therapeutic-use { border-color: #f39c12; }
body.outline-dots .category-dot.legal-regulatory-status { border-color: #9b59b6; }
body.outline-dots .category-dot.route-administration-formulation { border-color: #3498db; }
body.outline-dots .category-dot.default { border-color: #6c757d; }

/* Workout focus outline colors */
body.outline-dots .category-dot.workout-power { border-color: #ff5722; }
body.outline-dots .category-dot.workout-strength { border-color: #3f51b5; }
body.outline-dots .category-dot.workout-hypertrophy { border-color: #9c27b0; }
body.outline-dots .category-dot.workout-speed { border-color: #00bcd4; }
body.outline-dots .category-dot.workout-endurance { border-color: #4caf50; }
body.outline-dots .category-dot.workout-mobility { border-color: #8bc34a; }

/* Learn subject outline colors */
body.outline-dots .category-dot.learn-bio { border-color: #ff7043; }
body.outline-dots .category-dot.learn-exphys { border-color: #29b6f6; }
body.outline-dots .category-dot.learn-sc { border-color: #7e57c2; }
body.outline-dots .category-dot.learn-nut { border-color: #66bb6a; }
body.outline-dots .category-dot.learn-psy { border-color: #ec407a; }
body.outline-dots .category-dot.learn-data { border-color: #26a69a; }

/* Drug-Exercise Considerations outline colors */
body.outline-dots .category-dot.pharmacological-class { border-color: #e74c3c; }
body.outline-dots .category-dot.therapeutic-use { border-color: #f39c12; }
body.outline-dots .category-dot.legal-regulatory-status { border-color: #9b59b6; }
body.outline-dots .category-dot.route-administration-formulation { border-color: #3498db; }

/* Main library dots active state in outline mode - fill them in when selected */
body.outline-dots .category-dot.exercises.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

body.outline-dots .category-dot.speed-agility.active {
    background-color: #fd7e14;
    border-color: #fd7e14;
}

body.outline-dots .category-dot.balance-stability.active {
    background-color: #ffc107;
    border-color: #ffc107;
}

body.outline-dots .category-dot.mobility-stretches.active {
    background-color: #28a745;
    border-color: #28a745;
}

body.outline-dots .category-dot.tests-protocols.active {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

body.outline-dots .category-dot.sports-drills.active {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

body.outline-dots .category-dot.health-diets.active {
    background-color: #e83e8c;
    border-color: #e83e8c;
}

body.outline-dots .category-dot.yoga.active {
    background-color: #6c757d;
    border-color: #6c757d;
}

body.outline-dots .category-dot.equipment.active {
    background-color: #000000;
    border-color: #000000;
}

body.outline-dots .category-dot.cognitive-performance.active {
    background-color: #8B4513;
    border-color: #8B4513;
}

body.outline-dots .category-dot.water-aerobics.active {
    background-color: #000080;
    border-color: #000080;
}

body.outline-dots .category-dot.pharmacological-class.active {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

body.outline-dots .category-dot.therapeutic-use.active {
    background-color: #f39c12;
    border-color: #f39c12;
}

body.outline-dots .category-dot.legal-regulatory-status.active {
    background-color: #9b59b6;
    border-color: #9b59b6;
}

body.outline-dots .category-dot.route-administration-formulation.active {
    background-color: #3498db;
    border-color: #3498db;
}


/* Title section layout */

.loading-message {
    font-size: 1rem;
    color: #999;
    font-weight: 400;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Search and Filter Section */
.search-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.filter-dropdown {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.filter-dropdown:focus {
    outline: none;
    border-color: #666;
}

.search-bar {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    min-width: 300px;
}

.search-bar::placeholder {
    color: #999;
}

.search-bar:focus {
    outline: none;
    border-color: #666;
}

/* Subfilter Section */
.subfilter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
}

.workout-builder-subfilters .subfilter-options {
    padding: 8px 0;
}

.workout-builder-subfilters .subfilter-option {
    display: flex;
    align-items: center;
    padding: 6px 10px; /* tighter vertical spacing */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.workout-builder-subfilters .subfilter-option:hover {
    background: #444;
}

.workout-builder-subfilters .subfilter-option input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.workout-builder-subfilters .subfilter-option span {
    cursor: pointer;
    user-select: none;
}

.workout-builder-subfilters .subfilter-actions {
    border-top: 1px solid #555;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
}

.workout-builder-subfilters .apply-filters-btn,
.workout-builder-subfilters .reset-subfilters-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.workout-builder-subfilters .apply-filters-btn:hover,
.workout-builder-subfilters .reset-subfilters-btn:hover {
    background: #5a6268;
}







.reset-subfilters-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.reset-subfilters-btn:hover {
    background-color: #666;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: white;
    margin: 20px 0;
}

.sort-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.sort-dropdown {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #666;
}

.sort-count {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.category-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.category-dot:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}



.category-dot.exercises { background-color: #dc3545; }
.category-dot.speed-agility { background-color: #fd7e14; }
.category-dot.balance-stability { background-color: #ffc107; }
.category-dot.mobility-stretches { background-color: #28a745; }
.category-dot.tests-protocols { background-color: #17a2b8; }
.category-dot.sports-drills { background-color: #6f42c1; }
.category-dot.health-diets { background-color: #e83e8c; }
.category-dot.pharmacological-class { background-color: #e74c3c; }
.category-dot.therapeutic-use { background-color: #f39c12; }
.category-dot.legal-regulatory-status { background-color: #9b59b6; }
.category-dot.route-administration-formulation { background-color: #3498db; }

.category-dot.yoga { background-color: #6c757d; }
.category-dot.equipment { background-color: #000000; }
.category-dot.default { background-color: #6c757d; }/* Workout focus unique colors */
.category-dot.workout-power { background-color: #ff5722; }
.category-dot.workout-strength { background-color: #3f51b5; }
.category-dot.workout-hypertrophy { background-color: #9c27b0; }
.category-dot.workout-speed { background-color: #00bcd4; }
.category-dot.workout-endurance { background-color: #4caf50; }
.category-dot.workout-mobility { background-color: #8bc34a; }

/* Learn subject unique colors */
.category-dot.learn-bio { background-color: #ff7043; }
.category-dot.learn-exphys { background-color: #29b6f6; }
.category-dot.learn-sc { background-color: #7e57c2; }
.category-dot.learn-nut { background-color: #66bb6a; }
.category-dot.learn-psy { background-color: #ec407a; }
.category-dot.learn-data { background-color: #26a69a; }



/* Title section layout */
.title-section-layout {
    justify-content: center;
    align-items: center;
}



.category-dot.exercises { background-color: #dc3545; }
.category-dot.speed-agility { background-color: #fd7e14; }
.category-dot.balance-stability { background-color: #ffc107; }
.category-dot.mobility-stretches { background-color: #28a745; }
.category-dot.tests-protocols { background-color: #17a2b8; }
.category-dot.sports-drills { background-color: #6f42c1; }
.category-dot.health-diets { background-color: #e83e8c; }
.category-dot.pharmacological-class { background-color: #e74c3c; }
.category-dot.therapeutic-use { background-color: #f39c12; }
.category-dot.legal-regulatory-status { background-color: #9b59b6; }
.category-dot.route-administration-formulation { background-color: #3498db; }

.category-dot.yoga { background-color: #6c757d; }
.category-dot.equipment { background-color: #000000; }
.category-dot.default { background-color: #6c757d; }/* Workout focus unique colors */
.category-dot.workout-power { background-color: #ff5722; }
.category-dot.workout-strength { background-color: #3f51b5; }
.category-dot.workout-hypertrophy { background-color: #9c27b0; }
.category-dot.workout-speed { background-color: #00bcd4; }
.category-dot.workout-endurance { background-color: #4caf50; }
.category-dot.workout-mobility { background-color: #8bc34a; }

/* Learn subject unique colors */
.category-dot.learn-bio { background-color: #ff7043; }
.category-dot.learn-exphys { background-color: #29b6f6; }
.category-dot.learn-sc { background-color: #7e57c2; }
.category-dot.learn-nut { background-color: #66bb6a; }
.category-dot.learn-psy { background-color: #ec407a; }
.category-dot.learn-data { background-color: #26a69a; }




.library-card-admin-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.library-card-admin-btn {
    background: none;
    color: #ccc;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 4px;
    margin: 0;
    flex-shrink: 0;
}

.library-card-admin-btn:hover {
    color: white;
}

.library-card-admin-btn.edit:hover {
    color: #007bff;
}

.library-card-admin-btn.delete:hover {
    color: #dc3545;
}

.library-card-admin-btn.publish:hover {
    color: #28a745;
}

/* Workout Builder Cards */
.workout-builder-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* Two-column layout for workout cards */
.workout-card-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-top: 15px;
}

.workout-card-left-column {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.workout-card-right-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

/* Responsive design for workout cards */
@media (max-width: 768px) {
    .workout-card-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .workout-card-columns {
        gap: 15px;
    }
    
    .workout-card-left-column,
    .workout-card-right-column {
        gap: 0;
    }
}

/* Workout card content styling */
.workout-card-left-column h4,
.workout-card-right-column h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-align: left;
}

/* Remove bottom margin from Description and Safety Considerations headings */
.workout-card-left-column h4:first-child {
    margin-bottom: 0;
}

.workout-card-right-column h4:last-child {
    margin-bottom: 0;
}

/* Add spacing between sections */
.workout-card-left-column h4:not(:first-child),
.workout-card-right-column h4:not(:first-child) {
    margin-top: 25px;
}

/* Add spacing after workout table */
.workout-card-left-column .workout-table-card {
    margin-bottom: 25px;
}

/* Add spacing after description paragraph */
.workout-card-left-column p:first-of-type {
    margin-bottom: 25px;
}

/* Ensure safety considerations text is left-aligned in workout cards */
.workout-card-left-column .library-card-safety-notes {
    text-align: left;
}

.workout-card-left-column p,
.workout-card-right-column p {
    color: #ccc;
    line-height: 1.4;
    margin: 0 0 15px 0;
    font-size: 14px;
    text-align: left;
}



/* Workout card tags now use library-card-subcategory styling */

/* Light theme support for workout card content */
body.light-theme .workout-card-left-column h4,
body.light-theme .workout-card-right-column h4 {
    color: #333;
}

body.light-theme .workout-card-left-column p,
body.light-theme .workout-card-right-column p {
    color: #666;
}

body.light-theme .workout-card-right-column {
    border-left-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .library-card-references {
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Light theme support for workout tags handled by library-card-subcategory styles */

.workout-builder-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.workout-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.workout-card-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.workout-card-category-dots {
    display: flex;
    gap: 8px;
}

.workout-card-content {
    margin-bottom: 20px;
}

.workout-card-description {
    color: #ccc;
    line-height: 1.5;
    margin: 0;
}

.workout-card-actions {
    display: flex;
    gap: 10px;
}

.workout-card-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.workout-card-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.workout-card-btn.view-btn {
    background: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.3);
}

.workout-card-btn.view-btn:hover {
    background: rgba(0, 123, 255, 0.3);
    border-color: rgba(0, 123, 255, 0.4);
}

.workout-card-btn.save-btn {
    background: rgba(232, 62, 140, 0.2);
    border-color: rgba(232, 62, 140, 0.3);
    font-size: 16px;
    padding: 8px 12px;
}

.workout-card-btn.save-btn:hover {
    background: rgba(232, 62, 140, 0.3);
    border-color: rgba(232, 62, 140, 0.4);
}

/* Heart save button */
.heart-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #ccc;
    transition: color 0.2s ease;
    padding: 4px;
}

.heart-btn:hover {
    color: #e83e8c;
}

.heart-btn.filled {
    color: #e83e8c;
}

/* Compare bar */
.compare-bar {
    position: fixed;
    top: 90px; /* below header */
    left: -200px; /* hidden offscreen to the left */
    right: auto;
    height: auto;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    transition: left 0.25s ease;
    z-index: 9999;
}

.compare-bar.show {
    left: 20px; /* slide in near top-left */
}

.compare-bar-inner { padding: 0; }
.compare-bar-actions { display: flex; gap: 8px; flex-direction: column; justify-content: center; align-items: stretch; }

/* Compare checkbox */
.compare-checkbox {
    width: 18px;
    height: 18px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent; /* start as outline only */
    border: 1px solid #fff; /* white outline thinner */
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.compare-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1px 1px 0; /* thinner checkmark */
    transform: rotate(45deg);
}

.compare-checkbox:checked {
    background: #000; /* black background when selected */
    border-color: #000;
}



.library-card-expanded {
    display: none;
    padding: 20px;
}

.library-card.expanded .library-card-collapsed {
    border-bottom: 1px solid #333;
}

.library-card.expanded .library-card-expanded {
    display: block;
}



.library-card-show-more {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

.library-card-show-more:hover {
    background-color: #555;
}

.library-card-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    margin-top: 15px;
    text-align: left;
}

.library-card-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.library-card-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

/* Workout Builder: single-column layout */
#workoutBuilderCardsContainer .library-card-content {
    display: block;
}

/* Workout Table (modal) */
.workout-table-controls { display: flex; gap: 10px; margin-bottom: 10px; }
.workout-table-wrapper { overflow-x: auto; background: #222; border: 1px solid #333; border-radius: 6px; }
.workout-table { width: 100%; border-collapse: collapse; table-layout: fixed; --workout-first-col-width: 240px; --workout-col-width: 120px; }
.workout-table th, .workout-table td { border: 1px solid #444; padding: 8px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workout-table th { background: #2a2a2a; font-weight: 700; }
.workout-table th input { width: 100%; background: #333; color: #fff; border: 1px solid #555; border-radius: 4px; padding: 6px; }
.workout-table td input { width: 100%; background: #333; color: #fff; border: 1px solid #555; border-radius: 4px; padding: 6px; }
.workout-table .table-remove { background: #444; color: #fff; border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; }
  .workout-table .table-remove:hover { background: #555; }
  .workout-table-note { color: #888; font-size: 12px; margin-top: 6px; }

/* Dynamic Workout Table in Add New Workout Modal */
#addWorkoutModal .workout-table-container {
    position: relative;
    display: inline-block;
    margin: 10px 0 120px 0; /* Added bottom margin for controls */
}

#addWorkoutModal .workout-table {
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    table-layout: fixed;
    width: 75px; /* Start with width for 1 column */
}

#addWorkoutModal .workout-table td {
    width: 75px;
    min-width: 75px;
    max-width: 75px;
    height: 25px;
    border: 1px solid #444;
    padding: 0;
    color: #ddd;
    background: #1a1a1a;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Column resize handle */
#addWorkoutModal .workout-table th {
    width: 75px;
    min-width: 50px;
    height: 8px;
    border: 1px solid #444;
    border-bottom: none;
    padding: 0;
    color: #ddd;
    background: #1a1a1a;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    box-sizing: border-box;
    position: relative;
    font-weight: bold;
}

#addWorkoutModal .workout-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -2px;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
}

#addWorkoutModal .workout-table th:not(:last-child):hover::after {
    background: rgba(0, 122, 204, 0.3);
}

/* Resize indicator line */
.resize-line {
    position: absolute;
    top: 0;
    width: 2px;
    background: #007acc;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.8;
}

#addWorkoutModal .workout-table td:focus {
    outline: 2px solid #007acc;
    background: #333;
}

/* Column controls - positioned to the right of table */
#addWorkoutModal .workout-table-controls {
    position: absolute;
    left: 80px; /* Initial position for 1 column, will be updated by JavaScript */
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#addWorkoutModal .add-column-btn,
#addWorkoutModal .remove-column-btn {
    width: 25px;
    height: 12px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#addWorkoutModal .add-column-btn:hover,
#addWorkoutModal .remove-column-btn:hover {
    background: #555;
    border-color: #777;
}

/* Row controls - positioned below table */
#addWorkoutModal .row-controls {
    position: absolute;
    left: 0;
    bottom: -30px;
    display: flex;
    gap: 2px;
}

#addWorkoutModal .add-row-btn,
#addWorkoutModal .remove-row-btn {
    width: 25px;
    height: 25px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#addWorkoutModal .add-row-btn:hover,
#addWorkoutModal .remove-row-btn:hover {
    background: #555;
    border-color: #777;
}

/* Mode controls - positioned below row controls */
#addWorkoutModal .mode-controls {
    position: absolute;
    left: 0;
    bottom: -60px;
    display: flex;
    gap: 5px;
}

#addWorkoutModal .mode-selector-btn,
#addWorkoutModal .reset-widths-btn {
    height: 25px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    white-space: nowrap;
}

#addWorkoutModal .mode-selector-btn:hover,
#addWorkoutModal .reset-widths-btn:hover {
    background: #555;
    border-color: #777;
}

#addWorkoutModal .mode-selector-btn.active {
    background: #007acc;
    border-color: #0066aa;
}

/* Color controls - positioned below mode controls */
#addWorkoutModal .color-controls {
    position: absolute;
    left: 0;
    bottom: -90px;
    display: flex;
    gap: 5px;
}

#addWorkoutModal .change-color-btn {
    height: 25px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    white-space: nowrap;
}

#addWorkoutModal .change-color-btn:hover {
    background: #555;
    border-color: #777;
}

#addWorkoutModal .change-color-btn:disabled {
    background: #333 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: #555 !important;
}

/* Cell selection highlighting */
#addWorkoutModal .workout-table td.selected {
    background: #007acc !important;
    color: white !important;
}

/* Color mode cursor */
#addWorkoutModal .workout-table.color-mode {
    cursor: crosshair;
}

#addWorkoutModal .workout-table.color-mode td {
    cursor: crosshair;
    user-select: none;
}

/* Cell Color Picker Modal */
#cellColorModal .modal {
    min-height: auto;
}

.color-picker-container {
    padding: 10px 0;
}

.color-picker-container h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #fff;
    font-weight: bold;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid #666;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    border-color: #007acc;
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #007acc;
    border-width: 3px;
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.custom-color-section {
    border-top: 1px solid #444;
    padding-top: 15px;
    margin-bottom: 20px;
}

.custom-color-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

#customColorPicker {
    width: 50px;
    height: 30px;
    border: 2px solid #666;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

#customColorHex {
    flex: 1;
    padding: 6px 10px;
    background: #333;
    border: 1px solid #666;
    border-radius: 4px;
    color: #fff;
    font-family: monospace;
    font-size: 12px;
}

#customColorHex::placeholder {
    color: #999;
}

.color-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.color-actions .btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.color-actions .btn-secondary {
    background: #666;
    color: #fff;
}

.color-actions .btn-secondary:hover {
    background: #777;
}

.color-actions .btn-primary {
    background: #007acc;
    color: #fff;
}

.color-actions .btn-primary:hover {
    background: #0066aa;
}




/* Light theme support for workout table */
body.light-theme #addWorkoutModal .workout-table td {
    background: #fff;
    color: #333;
    border-color: #dee2e6;
}

body.light-theme #addWorkoutModal .workout-table td:focus {
    outline: 2px solid #007bff;
    background: #f8f9fa;
}

body.light-theme #addWorkoutModal .add-column-btn,
body.light-theme #addWorkoutModal .remove-column-btn,
body.light-theme #addWorkoutModal .add-row-btn,
body.light-theme #addWorkoutModal .remove-row-btn,
body.light-theme #addWorkoutModal .mode-selector-btn,
body.light-theme #addWorkoutModal .change-color-btn,
body.light-theme #addWorkoutModal .reset-widths-btn {
    background: #e9ecef;
    color: #333;
    border-color: #ced4da;
}

body.light-theme #addWorkoutModal .add-column-btn:hover,
body.light-theme #addWorkoutModal .remove-column-btn:hover,
body.light-theme #addWorkoutModal .add-row-btn:hover,
body.light-theme #addWorkoutModal .remove-row-btn:hover,
body.light-theme #addWorkoutModal .mode-selector-btn:hover,
body.light-theme #addWorkoutModal .change-color-btn:hover,
body.light-theme #addWorkoutModal .reset-widths-btn:hover {
    background: #dee2e6;
    border-color: #adb5bd;
}

body.light-theme #addWorkoutModal .mode-selector-btn.active {
    background: #007bff;
    border-color: #0066cc;
    color: white;
}

body.light-theme #addWorkoutModal .change-color-btn:disabled {
    background: #f8f9fa !important;
    color: #adb5bd !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

body.light-theme #addWorkoutModal .workout-table td.selected {
    background: #007bff !important;
    color: white !important;
}

body.light-theme #addWorkoutModal .workout-table th {
    background: #fff;
    color: #333;
    border-color: #dee2e6;
    border-bottom: none;
}

/* Light theme support for color picker */
body.light-theme #cellColorModal .color-picker-container h3 {
    color: #333;
}

body.light-theme #cellColorModal .custom-color-section {
    border-top-color: #dee2e6;
}

body.light-theme #cellColorModal .color-actions {
    border-top-color: #dee2e6;
}

body.light-theme #cellColorModal #customColorPicker {
    border-color: #ced4da;
}

body.light-theme #cellColorModal #customColorHex {
    background: #fff;
    border-color: #ced4da;
    color: #333;
}

body.light-theme #cellColorModal #customColorHex::placeholder {
    color: #6c757d;
}

body.light-theme #cellColorModal .color-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

body.light-theme #cellColorModal .color-actions .btn-secondary:hover {
    background: #5a6268;
}




/* Workout table display in cards */
.workout-table-card td {
    padding: 2px 4px;
}

body.light-theme .workout-table-card td {
    background: #fff !important;
    color: #333 !important;
    border-color: #dee2e6 !important;
}

body.light-theme .workout-table-card td[style*="background: #2a5a2a"] {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

  @media (max-width: 768px) {
  .workout-table { --workout-first-col-width: 180px; --workout-col-width: 90px; }
}

/* Override the general table input width rule for specific columns */
.workout-table td:first-child input,
.workout-table td:nth-child(2) input {
    width: auto;
}

.library-card-section {
    background: transparent;
    border: none;
    padding: 0 0 12px 0;
}

.library-card-section-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: left;
}

/* Equipment Space Requirements Styles */
.library-card-equipment-space {
    color: #ccc;
    line-height: 1.4;
}

.equipment-space-item {
    margin-bottom: 12px;
}

.equipment-space-item:last-child {
    margin-bottom: 0;
}

.equipment-space-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    font-size: 14px;
}

.equipment-space-value {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    padding-left: 8px;
}

/* Smaller section titles for drug-exercise cards only */
.drug-exercise-card .library-card-section-title {
    font-size: 16px;
}

/* References container styling */
.references-container {
    margin-top: 10px;
}

.reference-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.reference-number {
    font-weight: bold;
    color: white;
    min-width: 20px;
}

.reference-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px;
    color: white;
    font-size: 14px;
}

.reference-input::placeholder {
    color: #999;
}

.remove-reference-btn {
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-reference-btn:hover {
    background: rgba(220, 53, 69, 1);
}

.add-reference-btn {
    background: black;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
}

.add-reference-btn:hover {
    background: #333;
}

/* Drug-exercise card references section styling */
.drug-exercise-card-references-section {
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 15px;
    grid-column: 1 / -1; /* Spans the full width */
}

.library-card-references {
    margin-top: 10px;
}

.library-card-reference-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}

.library-card-reference-item .reference-number {
    font-weight: bold;
    color: white;
    min-width: 20px;
    margin-top: 1px;
}

.library-card-reference-item .reference-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.library-card-description {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 10px;
}

.library-card-form-notes {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.4;
    margin-bottom: 10px;
}

.library-card-safety-notes {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 4px;
    border-left: 3px solid #ff6b6b;
}

/* Variations section styling */
.variations-search-section {
    margin-bottom: 15px;
}

.variations-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.variations-filters .filter-dropdown {
    flex: 0 0 auto;
    min-width: 150px;
}

.variations-filters .search-bar {
    flex: 1;
}

.variations-list {
    max-height: 204px; /* Height for exactly 4 items (4 × 50px + 4px for borders) */
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    scrollbar-width: thin;
    scrollbar-color: #666 #2a2a2a;
}

/* Custom scrollbar styling for webkit browsers */
.variations-list::-webkit-scrollbar {
    width: 8px;
}

.variations-list::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.variations-list::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.variations-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.variation-item {
    padding: 10px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.variation-item:hover {
    background-color: #3a3a3a;
}

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

.variation-item.selected {
    background-color: #4a4a4a;
    border-left: 3px solid #ff6b6b;
}

.selected-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.variation-button {
    background: #555;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.variation-button:hover {
    background: #666;
}

.variation-button .remove-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    margin-left: 8px;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
}

.variation-button .remove-btn:hover {
    color: #ff8e8e;
}

/* Library card variations styling */
.library-card-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.library-card-variations .variation-button {
    background: #555;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    min-width: 300px; /* Three times longer than before */
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-card-variations .variation-button:hover {
    background: #666;
}

/* Standalone variations section styling */
.variations-section-standalone {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.variations-section-standalone .library-card-section-title {
    margin-bottom: 10px;
}

/* Alternative Names section styling */
.alternative-names-section {
    margin-top: 15px;
}

.alternative-names-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.alternative-names-input-container .form-input {
    flex: 1;
}

.selected-alternative-names {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 30px;
}

.alternative-name-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}

.alternative-name-tag .remove-alternative-name {
    cursor: pointer;
    color: #ff6b6b;
    font-weight: bold;
    padding: 0 2px;
}

.alternative-name-tag .remove-alternative-name:hover {
    color: #ff9999;
}

.form-note {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Variation Card Modal Styling */
.variation-card-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.variation-card-modal .modal-content {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.variation-card-modal .library-card {
    border: none;
    box-shadow: none;
    margin: 0;
}

.variation-card-modal .library-card-expanded {
    display: block;
}

.variation-card-modal .library-card-collapsed {
    display: none;
}

.youtube-embed-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.library-card-divider {
    width: 1px;
    background-color: #444;
    margin: 0 20px;
    align-self: stretch;
}



/* Learn content display: heading and paragraph styling inside cards */
.learn-content-heading {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 6px 0 8px;
}

.learn-subheading {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-top: 10px;
    margin-bottom: 6px;
}

.learn-paragraph-display {
    font-size: 14px;
    font-weight: 400;
    color: #ccc;
    margin: 0 0 10px 0;
}

.library-card-youtube {
    color: #ff6b6b;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #1a1a1a;
    border: 1px solid #ff6b6b;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.library-card-youtube:hover {
    color: white;
    background-color: #ff6b6b;
}

.library-card-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.library-card-category-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-card-category-header {
    font-size: 14px;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: left;
}

.library-card-category-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.library-card-category-bubble {
    background-color: #444;
    color: white;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}

.library-card-subcategories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.library-card-subcategory-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-card-subcategory-header {
    font-size: 14px;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-card-subcategory-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.library-card-subcategory-option {
    background-color: #000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
}

.library-card-subcategory-option:hover {
    background-color: #111;
    color: #fff;
}

.library-card-subcategory-option.selected {
    background-color: #000;
    color: #fff;
    border: none;
    font-weight: 600;
}

/* Color-themed library card subcategory options */
.library-card-subcategory-option.forest-green {
    background-color: #228B22; /* Forest Green */
    color: white;
}

.library-card-subcategory-option.forest-green:hover {
    background-color: #32CD32; /* Lighter green on hover */
}

.library-card-subcategory-option.navy {
    background-color: #000080; /* Navy */
    color: white;
}

.library-card-subcategory-option.navy:hover {
    background-color: #191970; /* Lighter navy on hover */
}

.library-card-subcategory-option.burnt-orange {
    background-color: #CC5500; /* Burnt Orange */
    color: white;
}

.library-card-subcategory-option.burnt-orange:hover {
    background-color: #FF6600; /* Lighter orange on hover */
}

.library-card-subcategory-option.maroon {
    background-color: #800000; /* Maroon */
    color: white;
}

.library-card-subcategory-option.maroon:hover {
    background-color: #A0522D; /* Lighter maroon on hover */
}

/* Library Card Color Legend */
.library-card-color-legend {
    margin-top: 8px;
    padding: 6px 8px;
    background-color: #1a1a1a;
    border-radius: 4px;
    border: 1px solid #333;
}

.library-card-legend-title {
    font-size: 10px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.library-card-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.library-card-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: #aaa;
}

.library-card-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.library-card-legend-dot.forest-green {
    background-color: #228B22;
}

.library-card-legend-dot.navy {
    background-color: #000080;
}

.library-card-legend-dot.burnt-orange {
    background-color: #CC5500;
}

.library-card-legend-dot.maroon {
    background-color: #800000;
}

/* Add to Library Button */
.add-to-library-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.add-to-library-btn:hover {
    background-color: #666;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

/* Prevent background scrolling when modals are open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.modal {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 30px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Ensure draw random modals use the correct background color */
.draw-random-modal {
    background-color: #2a2a2a;
}

/* Draw random modal header and title styling */
.draw-random-modal .modal-header {
    justify-content: center;
    text-align: center;
    position: relative;
}

.draw-random-modal .modal-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.draw-random-modal .close-modal {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Override font-size specific styles for draw random modal titles */
body.font-size-small .draw-random-modal .modal-title {
    font-size: 28px;
}

body.font-size-normal .draw-random-modal .modal-title {
    font-size: 32px;
}

body.font-size-large .draw-random-modal .modal-title {
    font-size: 36px;
}

/* Override light theme for draw random modal titles */
body.light-theme .draw-random-modal .modal-title {
    color: #333;
}

/* Dropdown modal styles - slide down from top */
.modal-overlay.dropdown-modal {
    align-items: flex-start;
    padding-top: 60px;
}

.modal-overlay.dropdown-modal .modal {
    margin: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

.modal-overlay.dropdown-modal.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
}

/* Learn modal: section heading and paragraph sizing */
#addLearnModal .learn-section-heading-input {
    font-weight: 600; /* unbolded relative to title, but strong */
    font-size: 16px; /* bigger than paragraph */
}

#addLearnModal .learn-paragraph {
    font-size: 14px; /* normal body */
    font-weight: 400;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Learn paragraph management styles */
.learn-section-wrapper {
    margin-bottom: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.learn-paragraph-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.learn-paragraph-wrapper .form-textarea {
    padding-right: 35px;
}

.remove-paragraph-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    background-color: #666;
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-paragraph-btn:hover {
    background-color: #888;
}

#addParagraphBtn {
    align-self: flex-start;
    margin-top: 5px;
}

/* Add Learn modal heading/content styling */
#addLearnModal #learnSectionsContainer .form-input {
    font-weight: 700; /* headings bold */
    color: #fff;
    font-size: 16px;
}

#addLearnModal #learnSectionsContainer .learn-paragraph {
    font-weight: 400; /* content unbolded */
    color: #ccc; /* slightly lighter than headings */
    font-size: 13px; /* smaller than headings */
    line-height: 1.5;
}

/* Light theme overrides for add learn modal */
body.light-theme #addLearnModal #learnSectionsContainer .form-input {
    color: #111;
}

body.light-theme #addLearnModal #learnSectionsContainer .learn-paragraph {
    color: #555;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instruction-add-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.instructions-list {
    list-style: decimal;
    padding-left: 20px;
    color: #ccc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instructions-list li {
    margin: 0;
}

.instruction-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-input {
    flex: 1;
}

.instruction-actions button {
    background: #333;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.instruction-actions button:hover {
    background: #444;
}

.instructions-rendered {
    list-style: decimal;
    padding-left: 20px;
    color: #ccc;
}

.instructions-rendered li {
    margin: 4px 0;
}

.form-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Subfilter Label Color Fix - Prevents blue text on selection */
.subfilter-option label,
.subfilter-option span,
.checkbox-container label {
    color: white;
    cursor: pointer;
    user-select: none;
}

/* Ensure subfilter labels don't inherit browser default link colors */
.subfilter-section label,
.subfilter-section .checkbox-container label,
#articleSubfilterSection label,
#articleSubfilterSection .checkbox-container label {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

/* Override any default browser label styling for form-associated labels */
.subfilter-section label[for],
.checkbox-container label[for] {
    color: white;
}

/* Subject Dropdown */
.subject-dropdown-container {
    position: relative;
    margin-top: 5px;
}

.subject-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subject-dropdown-btn:hover {
    background: #444;
    border-color: #666;
}

.subject-dropdown-btn.active {
    background: #444;
    border-color: #666;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.subject-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.subject-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    margin-top: 2px;
    padding: 10px;
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.subject-dropdown-menu.active {
    display: block;
}

/* Subject Checkboxes */
.subject-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.subject-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background: #333;
    transition: all 0.2s ease;
}

.subject-checkbox:hover {
    background: #444;
    border-color: #666;
}

.subject-checkbox input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #000;
}

.subject-checkbox span {
    font-size: 14px;
    color: #fff;
}

.subject-checkbox input[type="checkbox"]:checked + span {
    color: #fff;
    font-weight: 500;
}

/* Subject Filter Checkboxes */
.subject-filter-container {
    margin-bottom: 15px;
}

.filter-label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.subject-filter-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.subject-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    transition: all 0.2s ease;
}

.subject-filter-checkbox:hover {
    background: #444;
    border-color: #666;
}

.subject-filter-checkbox input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    accent-color: #007bff;
}

.subject-filter-checkbox span {
    font-size: 13px;
    color: #fff;
}

.subject-filter-checkbox input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 500;
}

.form-input {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #666;
}

.form-input[readonly] {
    background-color: #444;
    color: #ccc;
    cursor: not-allowed;
    border-color: #555;
}

.form-input[readonly]:focus {
    outline: none;
    border-color: #555;
}

.form-textarea {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #666;
}

.form-select {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #666;
}

.categories-section {
    margin: 20px 0;
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background-color: #444;
}


/* Color Legend Styles */
.color-legend {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
}

.color-legend-title {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 120px;
}

.color-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-legend-dot.forest-green {
    background-color: #228B22;
}

.color-legend-dot.navy {
    background-color: #000080;
}

.color-legend-dot.burnt-orange {
    background-color: #CC5500;
}

.color-legend-dot.maroon {
    background-color: #800000;
}

.color-legend-input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #555;
    color: #ccc;
    font-size: 10px;
    padding: 2px 4px;
    width: 80px;
    outline: none;
}

.color-legend-input:focus {
    border-bottom-color: #777;
    color: white;
}

.color-legend-input::placeholder {
    color: #666;
    font-style: italic;
}

.category-name {
    color: white;
    font-weight: 500;
}

.category-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.category-color.exercises { background-color: #dc3545; }
.category-color.speed-agility { background-color: #fd7e14; }
.category-color.balance-stability { background-color: #ffc107; }
.category-color.mobility-stretches { background-color: #28a745; }
.category-color.tests-protocols { background-color: #17a2b8; }
.category-color.sports-drills { background-color: #6f42c1; }
.category-color.health-diets { background-color: #e83e8c; }
.category-color.yoga { background-color: #6c757d; }
.category-color.equipment { background-color: #000000; }
.category-color.pharmacological-class { background-color: #e74c3c; }
.category-color.therapeutic-use { background-color: #f39c12; }
.category-color.legal-regulatory-status { background-color: #9b59b6; }
.category-color.route-administration-formulation { background-color: #3498db; }

.category-subfilters {
    display: none;
    margin-left: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 6px;
    border-left: 3px solid #555;
}

.category-subfilters.active {
    display: block;
}

.subfilter-bubble-section {
    margin-bottom: 15px;
}

.subfilter-bubble-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* New subfilter header container styles */
.subfilter-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.subfilter-header-container .subfilter-bubble-title {
    margin-bottom: 0;
    flex: 1;
}

.subfilter-color-dropdown {
    padding: 4px 8px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    min-width: 120px;
    margin-left: 12px;
}

.subfilter-color-dropdown:hover {
    background-color: #444;
    border-color: #666;
}

.subfilter-color-dropdown:focus {
    outline: none;
    border-color: #777;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.subfilter-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subfilter-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #000000;
    border-radius: 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.subfilter-bubble:hover {
    background-color: #000000;
}

.subfilter-bubble.selected {
    background-color: #000000;
    border-color: transparent;
}

/* Drug-Exercise Modal specific subfilter bubble styles */
#addDrugExerciseModal .subfilter-bubble {
    background-color: #666; /* Grey by default */
    color: white;
    border: 1px solid #888;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    user-select: none;
}

#addDrugExerciseModal .subfilter-bubble:hover {
    background-color: #777; /* Slightly lighter grey on hover */
}

#addDrugExerciseModal .subfilter-bubble.selected {
    background-color: #000000; /* Black when selected */
    border-color: #000000;
}

/* Color-themed subfilter bubble styles for Drug-Exercise Modal - ONLY for selected state */
#addDrugExerciseModal .subfilter-bubble.forest-green.selected {
    background-color: #228B22; /* Forest Green when selected */
    border-color: #228B22;
}

#addDrugExerciseModal .subfilter-bubble.forest-green.selected:hover {
    background-color: #32CD32; /* Lighter green on hover when selected */
}

#addDrugExerciseModal .subfilter-bubble.navy.selected {
    background-color: #000080; /* Navy when selected */
    border-color: #000080;
}

#addDrugExerciseModal .subfilter-bubble.navy.selected:hover {
    background-color: #191970; /* Lighter navy on hover when selected */
}

#addDrugExerciseModal .subfilter-bubble.burnt-orange.selected {
    background-color: #CC5500; /* Burnt Orange when selected */
    border-color: #CC5500;
}

#addDrugExerciseModal .subfilter-bubble.burnt-orange.selected:hover {
    background-color: #FF6600; /* Lighter orange on hover when selected */
}

#addDrugExerciseModal .subfilter-bubble.maroon.selected {
    background-color: #800000; /* Maroon when selected */
    border-color: #800000;
}

#addDrugExerciseModal .subfilter-bubble.maroon.selected:hover {
    background-color: #A0522D; /* Lighter maroon on hover when selected */
}

#addDrugExerciseModal .subfilter-bubble.black.selected {
    background-color: #000000; /* Black when selected */
    border-color: #000000;
}

#addDrugExerciseModal .subfilter-bubble.black.selected:hover {
    background-color: #555555; /* Lighter black on hover when selected */
}



/* Drug-Exercise Modal category styles - EXACT COPY of exercise library modal */
#addDrugExerciseModal .categories-section {
    margin: 20px 0;
}

#addDrugExerciseModal .drug-exercise-categories-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

#addDrugExerciseModal .category-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#addDrugExerciseModal .category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#addDrugExerciseModal .category-header:hover {
    background-color: #444;
}


#addDrugExerciseModal .category-name {
    color: white;
    font-weight: 500;
}

#addDrugExerciseModal .category-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

#addDrugExerciseModal .category-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

#addDrugExerciseModal .category-color.pharmacological-class { 
    background-color: #e74c3c; 
}

#addDrugExerciseModal .category-color.therapeutic-use { 
    background-color: #f39c12; 
}

#addDrugExerciseModal .category-color.legal-regulatory-status { 
    background-color: #9b59b6; 
}

#addDrugExerciseModal .category-color.route-administration-formulation { 
    background-color: #3498db; 
}

#addDrugExerciseModal .category-subfilters {
    display: none;
    margin-left: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 6px;
    border-left: 3px solid #555;
}

#addDrugExerciseModal .category-subfilters.active {
    display: block;
}

#addDrugExerciseModal .subfilter-bubble-section {
    margin-bottom: 15px;
}

#addDrugExerciseModal .subfilter-bubble-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

#addDrugExerciseModal .subfilter-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Color Legend Styles for Drug-Exercise Modal - EXACT COPY */
#addDrugExerciseModal .color-legend {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
}

#addDrugExerciseModal .color-legend-title {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#addDrugExerciseModal .color-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#addDrugExerciseModal .color-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 120px;
}

#addDrugExerciseModal .color-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

#addDrugExerciseModal .color-legend-dot.black {
    background-color: #000000;
}

#addDrugExerciseModal .color-legend-dot.forest-green {
    background-color: #228B22;
}

#addDrugExerciseModal .color-legend-dot.navy {
    background-color: #000080;
}

#addDrugExerciseModal .color-legend-dot.burnt-orange {
    background-color: #CC5500;
}

#addDrugExerciseModal .color-legend-dot.maroon {
    background-color: #800000;
}

#addDrugExerciseModal .color-legend-input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #555;
    color: #ccc;
    font-size: 10px;
    padding: 2px 4px;
    width: 80px;
    outline: none;
}

#addDrugExerciseModal .color-legend-input:focus {
    border-bottom-color: #777;
    color: white;
}

#addDrugExerciseModal .color-legend-input::placeholder {
    color: #666;
    font-style: italic;
}

/* Drug-Exercise card color legend styles - simple dot-dash-text format */
.drug-exercise-card .library-card-legend {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.drug-exercise-card .library-card-legend-title {
    display: none;
}

.drug-exercise-card .library-card-legend-items {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
}

.drug-exercise-card .library-card-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    font-size: 11px;
    color: #ccc;
}

.drug-exercise-card .library-card-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.drug-exercise-card .library-card-legend-dot.black {
    background-color: #000000;
}

.drug-exercise-card .library-card-legend-dot.forest-green {
    background-color: #228B22;
}

.drug-exercise-card .library-card-legend-dot.navy {
    background-color: #000080;
}

.drug-exercise-card .library-card-legend-dot.burnt-orange {
    background-color: #CC5500;
}

.drug-exercise-card .library-card-legend-dot.maroon {
    background-color: #800000;
}

/* Drug-Exercise subcategory group styles */
.drug-exercise-subcategory-group {
    margin-bottom: 12px;
}

.drug-exercise-subcategory-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    padding-left: 4px;
}

/* Ensure Drug-Exercise card bubbles use the color system */
.drug-exercise-card .subfilter-bubble.selected.black {
    background-color: #000000;
    color: white;
}

.drug-exercise-card .subfilter-bubble.selected.forest-green {
    background-color: #228B22;
    color: white;
}

.drug-exercise-card .subfilter-bubble.selected.navy {
    background-color: #000080;
    color: white;
}

.drug-exercise-card .subfilter-bubble.selected.burnt-orange {
    background-color: #CC5500;
    color: white;
}

.drug-exercise-card .subfilter-bubble.selected.maroon {
    background-color: #800000;
    color: white;
}

/* Exercise Library Modal specific subfilter bubble styles */
#addToLibraryModal .subfilter-bubble {
    background-color: #666; /* Grey by default */
    color: white;
    border: 1px solid #888;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    user-select: none;
}

#addToLibraryModal .subfilter-bubble:hover {
    background-color: #777; /* Slightly lighter grey on hover */
}

#addToLibraryModal .subfilter-bubble.selected {
    background-color: #000000; /* Black when selected */
    border-color: #000000;
}

/* Color-themed subfilter bubble styles - ONLY for selected state */
#addToLibraryModal .subfilter-bubble.forest-green.selected {
    background-color: #228B22; /* Forest Green when selected */
    border-color: #228B22;
}

#addToLibraryModal .subfilter-bubble.forest-green.selected:hover {
    background-color: #32CD32; /* Lighter green on hover when selected */
    border-color: #32CD32;
}

#addToLibraryModal .subfilter-bubble.navy.selected {
    background-color: #000080; /* Navy when selected */
    border-color: #000080;
}

#addToLibraryModal .subfilter-bubble.navy.selected:hover {
    background-color: #191970; /* Lighter navy on hover when selected */
    border-color: #191970;
}

#addToLibraryModal .subfilter-bubble.burnt-orange.selected {
    background-color: #CC5500; /* Burnt Orange when selected */
    border-color: #CC5500;
}

#addToLibraryModal .subfilter-bubble.burnt-orange.selected:hover {
    background-color: #FF6600; /* Lighter orange on hover when selected */
    border-color: #FF6600;
}

#addToLibraryModal .subfilter-bubble.maroon.selected {
    background-color: #800000; /* Maroon when selected */
    border-color: #800000;
}

#addToLibraryModal .subfilter-bubble.maroon.selected:hover {
    background-color: #A0522D; /* Lighter maroon on hover when selected */
    border-color: #A0522D;
}

.subfilter-bubble input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

.subfilters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.subfilter-group {
    background-color: #333;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 15px;
}

.subfilter-group-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.subfilter-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subfilter-option-modal {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: #444;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subfilter-option-modal:hover {
    background-color: #555;
}

.subfilter-option-modal input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #000;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.modal-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background-color: #666;
}

.modal-btn.primary {
    background-color: #555;
}

.modal-btn.primary:hover {
    background-color: #666;
}

/* Auth Modal Styles */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding: 0 20px;
}

/* Auth modal specific styling */
#authModal .modal {
    max-width: 450px;
    padding: 25px 20px;
}

#authModal .modal-header {
    padding: 0 20px;
    margin-bottom: 15px;
}

#authModal .auth-tabs {
    margin-bottom: 25px;
}

.auth-tab {
    background: none;
    border: none;
    color: #999;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab:hover {
    color: white;
}

.auth-tab.active {
    color: white;
    border-bottom-color: #007bff;
}

.auth-form {
    display: none;
    padding: 0 20px;
}

.auth-form.active {
    display: block;
}

/* Auth form input styling - narrower width with padding */
.auth-form .form-input {
    width: calc(100% - 40px);
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

.auth-form .form-group {
    text-align: center;
}

.auth-form .form-label {
    text-align: left;
    margin-left: 20px;
}

/* Center auth form buttons and links */
.auth-form .modal-btn {
    margin: 20px auto 0;
    display: block;
    min-width: 120px;
}

.auth-form .forgot-password,
.auth-form .back-to-signin {
    text-align: center;
    margin-top: 15px;
}

.auth-form .reset-instructions {
    text-align: center;
    margin: 15px 0;
    padding: 0 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .nav-left, .nav-right {
        flex-direction: column;
        gap: 10px;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }
}

/* New subcategory structure styles */
.subcategory-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
}

.subcategory-heading {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #555;
    text-transform: none;
    letter-spacing: 0.3px;
}

.subcategory-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subcategory-options .subfilter-bubble {
    background-color: #444;
    border: 1px solid #555;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.subcategory-options .subfilter-bubble:hover {
    background-color: #555;
    border-color: #777;
}

.subcategory-options .subfilter-bubble.selected {
    background-color: #666;
    border-color: #888;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.subcategory-options .subfilter-bubble input[type="checkbox"] {
    margin-right: 6px;
}

.subcategory-options .subfilter-bubble label {
    cursor: pointer;
    user-select: none;
}

/* Exercise Search Modal */
.exercise-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    margin: 16px 0;
}

.exercise-search-modal .modal-title {
    text-align: center;
}

.exercise-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.exercise-item:hover {
    background-color: #2a2a2a;
}

.exercise-item.selected {
    background-color: #4a4a4a;
    border-left: 4px solid #007bff;
}

.exercise-item input[type="radio"] {
    margin-right: 12px;
}

.exercise-name {
    flex: 1;
    font-weight: 500;
}

.exercise-categories {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.exercise-category-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

.exercise-category-dot.exercises { background-color: #dc3545; }
.exercise-category-dot.speed-agility { background-color: #fd7e14; }
.exercise-category-dot.balance-stability { background-color: #ffc107; }
.exercise-category-dot.mobility-stretches { background-color: #28a745; }
.exercise-category-dot.tests-protocols { background-color: #17a2b8; }
.exercise-category-dot.sports-drills { background-color: #6f42c1; }
.exercise-category-dot.health-diets { background-color: #e83e8c; }
.exercise-category-dot.yoga { background-color: #20c997; }
.exercise-category-dot.equipment { background-color: #000000; }
.exercise-category-dot.pharmacological-class { background-color: #e74c3c; }
.exercise-category-dot.therapeutic-use { background-color: #f39c12; }
.exercise-category-dot.legal-regulatory-status { background-color: #9b59b6; }
.exercise-category-dot.route-administration-formulation { background-color: #3498db; }

/* Workout table controls spacing */
.workout-table-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Workout table exercise inputs */
.workout-exercise-input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
    width: 100%;
}

.workout-exercise-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.workout-cell-input {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
    width: 100%;
}

.workout-cell-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.exercise-search-btn:hover {
    background: #555;
}

.exercise-cell-container {
    width: 100%;
}

/* Workout Subfilter Categories */
.workout-subfilters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 16px;
}

.workout-subfilters-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.workout-subfilter-section {
    border: 1px solid #444;
    border-radius: 6px;
    padding: 16px;
    background: #2a2a2a;
}

.workout-subfilter-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
}

.workout-subfilter-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workout-subfilter-bubble {
    display: flex;
    align-items: center;
    background: #333;
    border: 1px solid #555;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.workout-subfilter-bubble:hover {
    background: #444;
    border-color: #666;
}

.workout-subfilter-bubble.selected {
    background: #000;
    border-color: #000;
    color: white;
}

.workout-subfilter-bubble input[type="checkbox"] {
    display: none;
}

.workout-subfilter-bubble label {
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Responsive design for workout subfilters */
@media (max-width: 768px) {
    .workout-subfilters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}



.workout-builder-subfilters .subfilter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.workout-builder-subfilters .reset-all-filters-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.workout-builder-subfilters .reset-all-filters-btn:hover {
    background: #5a6268;
}

/* Responsive design for workout builder subfilters */
@media (max-width: 768px) {
    .workout-builder-subfilters {
        padding: 16px;
        margin: 16px 0;
    }
    
    .subfilter-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .subfilter-multiselect {
        min-height: 100px;
    }
}

/* Draw Random Button Styles */
.draw-random-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 15px;
    white-space: nowrap;
}

.draw-random-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.draw-random-btn:active {
    transform: translateY(0);
}

/* Draw Random Modal Styles */
.draw-random-modal .modal-content {
    text-align: center;
    padding: 40px 20px;
}

.draw-random-modal .random-card {
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: left;
}

.draw-random-modal .random-card-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.draw-random-modal .random-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: #555;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.draw-random-modal .random-card-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.draw-random-modal .random-card-details {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.draw-random-modal .random-card-section {
    margin-bottom: 15px;
}

.draw-random-modal .random-card-section:last-child {
    margin-bottom: 0;
}

.draw-random-modal .random-card-section-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.draw-random-modal .random-card-section-content {
    color: #ccc;
    line-height: 1.5;
}

.draw-random-modal .no-cards-message {
    color: #999;
    font-size: 18px;
    text-align: center;
    padding: 40px 20px;
}

.draw-random-modal .draw-again-btn {
    background: #555;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.draw-random-modal .draw-again-btn:hover {
    background: #666;
    transform: translateY(-1px);
}

/* Responsive design for draw random buttons */
@media (max-width: 768px) {
    .draw-random-btn {
        margin-left: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .title-with-add-button {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .draw-random-btn {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Settings Page Styles */
.settings-section {
    margin: 30px 0;
    padding: 20px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
}

.settings-section h3 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 16px;
    text-align: left;
}

/* Theme Toggle Styles */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.theme-checkbox {
    display: none;
}

.theme-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #555;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.theme-slider:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.theme-checkbox:checked + .theme-slider {
    background: #000000;
}

.theme-checkbox:checked + .theme-slider:before {
    transform: translateX(26px);
}

.theme-text {
    color: #fff;
    font-size: 14px;
}


/* Make workout modal wider */
#addWorkoutModal .modal {
    max-width: 1200px;
}

/* Workout table delete button styles */
.table-remove {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.table-remove:hover {
    background-color: #c82333;
}

.table-remove:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Workout table styles */
.workout-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.workout-table th,
.workout-table td {
    border: 1px solid #444;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.workout-table th {
    background-color: #333;
    color: white;
    font-weight: 600;
    position: relative;
}

.workout-table input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: white;
}

.workout-table input:focus {
    outline: none;
    border-color: #007bff;
}

/* Ghost row for delete buttons */
.workout-table .ghost-delete-row {
    height: 32px;
    background-color: transparent;
}

.workout-table .ghost-delete-cell {
    border: none;
    background-color: transparent;
    padding: 2px;
    height: 32px;
    vertical-align: bottom;
}

.workout-table .ghost-delete-btn {
    margin: 0 auto;
    display: block;
}

/* Column header positioning for delete buttons */
.workout-table th:not(.remove-col-header) {
    position: relative;
}

/* Delete button positioning in headers */
.workout-table th .table-remove {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

/* Delete button positioning in data rows */
.workout-table td.remove-col {
    text-align: center;
    vertical-align: middle;
    width: 40px;
}

.workout-table td.remove-col .table-remove {
    margin: 0 auto;
}

/* Exercise column styling */
.workout-table th:first-child {
    width: 40%;
}

/* Sets and Reps columns */
.workout-table th:nth-child(2),
.workout-table th:nth-child(3) {
    width: 20%;
}

/* Additional columns */
.workout-table th:not(:first-child):not(.remove-col-header) {
    width: 15%;
}

/* Remove column header */
.workout-table th.remove-col-header {
    width: 40px;
    text-align: center;
}

/* Font Size Controls */
.font-size-controls {
    margin-top: 20px;
}

/* Dot Style Controls */
.dot-style-controls {
    margin-top: 20px;
}

.dot-style-controls h4 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 16px;
    text-align: left;
}

.dot-style-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dot-style-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.dot-style-checkbox {
    display: none;
}

.dot-style-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #555;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.dot-style-checkbox:checked + .dot-style-slider {
    background-color: #000000;
}

.dot-style-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.dot-style-checkbox:checked + .dot-style-slider::before {
    transform: translateX(26px);
}

.dot-style-text {
    color: #ccc;
    font-size: 14px;
}

.font-size-controls h4 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 16px;
    text-align: left;
}

.font-size-buttons {
    display: flex;
    gap: 8px;
}

.font-size-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 60px;
}

.font-size-btn:hover {
    background-color: #666;
}

.font-size-btn.active {
    background-color: #555;
    color: white;
}

.font-size-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Update Log Styles */
.update-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.update-log-header h3,
.update-log-header h4 {
    margin: 0;
}

/* Update Log Admin Buttons */
.update-log-entry .library-card-admin-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.update-log-entry .library-card-admin-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.update-log-entry .library-card-admin-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.update-log-entry .library-card-admin-btn.edit:hover {
    color: #007bff;
}

.update-log-entry .library-card-admin-btn.delete:hover {
    color: #dc3545;
}

.update-log-content {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}

.update-log-entry {
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.update-log-entry:hover {
    border-color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.update-log-version {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.update-log-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.update-log-notes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-log-notes li {
    color: #fff;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.update-log-notes li:before {
    content: '•';
    color: #6c757d;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Update Notes List in Modal */
.update-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-notes-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.update-notes-list .note-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: #fff;
    font-size: 14px;
}

.update-notes-list .remove-note-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.update-notes-list .remove-note-btn:hover {
    background: #c82333;
}

/* Light Theme Styles */
body.light-theme {
    background-color: #f5f5f5;
    color: #333;
}

body.light-theme .nav-bar {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

body.light-theme .nav-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

body.light-theme .nav-btn.active {
    background-color: #6c757d;
    color: #fff;
}

body.light-theme .content-section {
    background-color: #fff;
}

body.light-theme .settings-section {
    background: #fff;
    border: 1px solid #ddd;
}

body.light-theme .settings-section h3 {
    color: #333;
}

body.light-theme .theme-text {
    color: #333;
}

body.light-theme .animation-controls h4 {
    color: #333;
}

body.light-theme .font-size-controls h4 {
    color: #333;
}

body.light-theme .font-size-btn {
    background-color: #e9ecef;
    color: #333;
    border: 1px solid #ddd;
}

body.light-theme .font-size-btn:hover {
    background-color: #dee2e6;
}

body.light-theme .font-size-btn.active {
    background-color: #555;
    color: white;
}

body.light-theme .dot-style-controls h4 {
    color: #333;
}

body.light-theme .dot-style-text {
    color: #333;
}

/* Light theme font size overrides */
body.light-theme.font-size-small {
    font-size: 14px;
}

body.light-theme.font-size-normal {
    font-size: 16px;
}

body.light-theme.font-size-large {
    font-size: 18px;
}

body.light-theme .update-log-entry {
    background: #f8f9fa;
    border: 1px solid #ddd;
}

body.light-theme .update-log-notes li {
    color: #333;
}

body.light-theme .modal {
    background: #fff;
    color: #333;
}

body.light-theme .form-input,
body.light-theme .form-textarea {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
}

body.light-theme .form-input[readonly] {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #ced4da;
}

body.light-theme .form-input[readonly]:focus {
    outline: none;
    border-color: #ced4da;
}

/* Light theme modal overrides */
body.light-theme .modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

body.light-theme .modal {
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.light-theme .modal-header {
    border-bottom-color: #ddd;
}

body.light-theme .modal-title {
    color: #333;
}

body.light-theme .close-modal {
    color: #666;
}

body.light-theme .close-modal:hover {
    background-color: #f0f0f0;
    color: #333;
}

body.light-theme .modal-buttons {
    border-top-color: #ddd;
}

/* Light theme workout table overrides */
body.light-theme .workout-table th {
    background-color: #f8f9fa;
    color: #333;
    border-color: #dee2e6;
}

body.light-theme .workout-table td {
    border-color: #dee2e6;
}

body.light-theme .workout-table input {
    background-color: #fff;
    color: #333;
    border-color: #ced4da;
}

body.light-theme .workout-table input:focus {
    border-color: #007bff;
}

/* Light theme delete button overrides */
body.light-theme .workout-table th .table-remove {
    background-color: #dc3545;
}

body.light-theme .workout-table th .table-remove:hover {
    background-color: #c82333;
}

/* Subfilter dropdowns (overlay panel)
   Ensure trigger matches Learn dropdown look */
.subfilter-dropdown {
  position: relative;
  border: 1px solid #555;
  border-radius: 6px;
  margin: 6px 0;
  background: #333;
  min-height: 32px;
}

.subfilter-label,
.subfilter-dropdown-header {
  padding: 6px 15px;
  cursor: pointer;
  color: #fff;
  user-select: none;
  line-height: 1.2;
}

/* Options panel overlays content instead of pushing it */
.subfilter-options,
.subfilter-dropdown-content .subfilter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease, padding 0.2s ease;
}

.subfilter-dropdown.active .subfilter-options,
.subfilter-dropdown.active .subfilter-dropdown-content .subfilter-options {
  max-height: 300px;
  overflow: auto;
  padding: 8px 12px 10px;
  visibility: visible;
  opacity: 1;
}

.subfilter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  white-space: nowrap; /* Prevent text wrapping in options */
  min-height: 24px;
}

/* Visual cue when something is selected */
.subfilter-dropdown.has-selections .subfilter-label,
.subfilter-dropdown.has-selections .subfilter-dropdown-header {
  color: #9ad;
}

/* Keep main library dropdown text white even when selections are made */
#mainLibraryContent .subfilter-dropdown.has-selections .subfilter-label,
#mainLibraryContent .subfilter-dropdown.has-selections .subfilter-dropdown-header {
  color: #fff;
}

/* Keep Drug-Exercise Considerations dropdown text white even when selections are made */
#drugExerciseSubfilterSection .subfilter-dropdown.has-selections .subfilter-label {
  color: #fff;
}

/* Keep workout library dropdown text white even when selections are made */
.workout-builder-subfilters .subfilter-dropdown.has-selections .subfilter-dropdown-header {
  color: #fff;
}

/* Overlay the whole panel (options + actions) for builders that use .subfilter-dropdown-content */
.subfilter-dropdown .subfilter-dropdown-content {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease, padding 0.2s ease;
}

.subfilter-dropdown.active .subfilter-dropdown-content {
  max-height: 420px;
  overflow: auto;
  padding: 10px 12px 12px;
  visibility: visible;
  opacity: 1;
}

/* Ensure Workout Builder multiselect options are visible inside the panel */
.workout-builder-subfilters .subfilter-dropdown-content .subfilter-options {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  max-height: none;
  overflow: visible;
  padding: 8px 0;
  visibility: visible;
  opacity: 1;
}

/* Workout Library subfilter dropdowns: remove inner box styling so options sit directly in the dropdown, like main library */
.workout-builder-subfilters .subfilter-dropdown .subfilter-dropdown-content {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.workout-builder-subfilters .subfilter-dropdown.active .subfilter-dropdown-content {
  padding: 0;
}

/* Keep the options spacing readable without extra boxed container */
.workout-builder-subfilters .subfilter-dropdown-content .subfilter-options {
  padding: 10px 12px;
}

/* Keep actions inline with options without extra inset panel visuals */
.workout-builder-subfilters .subfilter-dropdown-content .subfilter-actions {
  border-top: 1px solid #444;
  padding: 8px 12px 12px;
}

/* Main Library subfilters: compact height like Workout Builder */
#subfilterSection .subfilter-dropdown {
    padding: 0;
    font-size: 13px;
    width: fit-content; /* Button width fits content */
    min-width: 200px; /* Minimum button width */
}

/* Article Library subfilters: compact height like Workout Builder */
#articleSubfilterSection .subfilter-dropdown {
    padding: 0;
    font-size: 13px;
    width: fit-content;
    min-width: 200px;
}

/* Article Library subfilters: compact height */
#articleSubfilterSection .subfilter-dropdown {
    padding: 0;
    font-size: 13px;
    width: fit-content;
    min-width: 200px;
}

#articleSubfilterSection .subfilter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 12px;
    font-size: 13px;
}

#articleSubfilterSection .subfilter-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

#articleSubfilterSection .subfilter-dropdown.active .subfilter-arrow {
    transform: rotate(180deg);
}

#articleSubfilterSection .subfilter-options {
    padding: 4px 0;
}

#articleSubfilterSection .subfilter-option {
    display: flex;
    align-items: center;
    padding: 3px 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#articleSubfilterSection .subfilter-option:hover {
    background: #444;
}

/* Article Cards Styling */
.article-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    margin: 2px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    border-color: #666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.article-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    text-align: left;
    position: relative;
}

.article-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Article header actions (save button, admin buttons) - inline with title */
.article-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.article-card .article-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 0 0 auto;
}

.article-card-admin-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.article-card-admin-buttons .library-card-admin-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.article-card-admin-buttons .library-card-admin-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.article-card-admin-buttons .library-card-admin-btn.edit:hover {
    color: #007bff;
}

.article-card-admin-buttons .library-card-admin-btn.delete:hover {
    color: #dc3545;
}

.article-card-admin-buttons .library-card-admin-btn.publish:hover {
    color: #28a745;
}

/* Article card actions below header */
.article-card-actions {
    margin: 20px 0 8px 0;
    text-align: left;
}

.show-more-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    text-align: center;
}

.show-more-btn:hover {
    background-color: #555;
}

/* Article category dots */
.article-card-header .category-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-left: 10px;
    position: absolute;
    top: 0;
    right: 5px;
}

.article-card-header .category-dot.research-articles {
    background-color: #e74c3c; /* Red for research */
}

.article-card-header .category-dot.academic-articles {
    background-color: #3498db; /* Blue for academic */
}

/* Outline dot style support */
body.outline-dots .article-card-header .category-dot {
    background-color: transparent;
    border: 2px solid;
    color: white;
}

body.outline-dots .article-card-header .category-dot.research-articles {
    border-color: #e74c3c;
}

body.outline-dots .article-card-header .category-dot.academic-articles {
    border-color: #3498db;
}

.section-header {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    padding: 0;
}

.section-header:first-of-type {
    border-top: 1px solid white;
    padding-top: 20px;
}

.article-card-expanded .article-tags {
    margin: 15px 0 0 0;
    padding: 0;
}

.section-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    padding: 0;
}





.article-card-content {
    color: #ccc;
    text-align: left;
}

.article-meta p {
    margin: 8px 0;
    font-size: 14px;
    text-align: left;
}

.article-meta strong {
    color: white;
}



.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-start;
}

.article-tag {
    background: #444;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.article-tags-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 8px;
}

.article-tags-inline .article-tag {
    margin: 0;
}



/* Article Card Expanded State */
.article-card-content.collapsed {
    display: none;
}

.article-card.expanded .article-card-content {
    display: none;
}

.article-card-expanded {
    text-align: left;
}



/* Main Library subfilter options: wider than button to accommodate text */
#subfilterSection .subfilter-options {
    min-width: 300px; /* Wider than button to fit text */
    max-width: 400px; /* Maximum width to prevent excessive width */
    white-space: nowrap; /* Prevent text wrapping */
    left: 0; /* Align to left edge of button */
    right: auto; /* Don't stretch to right edge */
}

/* Arrow for main library and learn dropdowns */
#subfilterSection .subfilter-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

#subfilterSection .subfilter-dropdown.active .subfilter-arrow {
    transform: rotate(180deg);
}

#subfilterSection .subfilter-label {
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Drug-Exercise Considerations subfilters: same styling as main library */
#drugExerciseSubfilterSection .subfilter-dropdown {
    padding: 0;
    font-size: 13px;
    width: fit-content; /* Button width fits content */
    min-width: 200px; /* Minimum button width */
}

#drugExerciseSubfilterSection .subfilter-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

#drugExerciseSubfilterSection .subfilter-dropdown.active .subfilter-arrow {
    transform: rotate(180deg);
}

#drugExerciseSubfilterSection .subfilter-label {
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure subfilter options are properly positioned and don't overflow */
#drugExerciseSubfilterSection .subfilter-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto; /* Don't stretch to right edge */
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.45);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease, padding 0.2s ease;
    min-width: 300px; /* Wider than button to fit text */
    max-width: 400px; /* Maximum width to prevent excessive width */
}

#drugExerciseSubfilterSection .subfilter-dropdown.active .subfilter-options {
    max-height: 420px;
    overflow: auto;
    padding: 10px 12px 12px;
    visibility: visible;
    opacity: 1;
}

/* Drug-Exercise subfilter option styling */
#drugExerciseSubfilterSection .subfilter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap; /* Prevent text wrapping in options */
}

#drugExerciseSubfilterSection .subfilter-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;
}

/* Drug-Exercise subfilter checkboxes - white outline when selected */
#drugExerciseSubfilterSection .subfilter-option input[type="checkbox"] {
    accent-color: transparent;
    border: 1px solid #666;
    border-radius: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    position: relative;
}

#drugExerciseSubfilterSection .subfilter-option input[type="checkbox"]:checked {
    border-color: #fff;
    background-color: transparent;
}

#drugExerciseSubfilterSection .subfilter-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

#drugExerciseSubfilterSection .subfilter-option label {
    cursor: pointer;
    color: #ccc;
    user-select: none;
}

#drugExerciseSubfilterSection .subfilter-option input[type="checkbox"]:checked + label {
    color: #fff;
}

/* Center the Therapeutic Use subfilter specifically - handled by parent flexbox */

/* Drug-Exercise Considerations subfilter flexbox layout: centered with proper spacing */
#drugExerciseSubfilterSection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 20px;
    border-bottom: 1px solid white;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Drug-Exercise Considerations sort section: centered and styled like main library */
#drugExerciseSortSection {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Drug-Exercise Considerations content section: prevent horizontal scrolling */
#drugExerciseContent {
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Drug-Exercise Considerations subfilter width: only as wide as text content */
#drugExerciseSubfilterSection .subfilter-dropdown {
    width: fit-content;
    min-width: 200px;
    height: 40px; /* Fixed height for consistent sizing */
    display: flex;
    align-items: center;
}

/* Fallback for simple main-library dropdowns that render only .subfilter-options (no wrapper) */
.subfilter-dropdown > .subfilter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease, padding 0.2s ease;
}

.subfilter-dropdown.active > .subfilter-options {
  max-height: 420px;
  overflow: auto;
  padding: 10px 12px 12px;
  visibility: visible;
  opacity: 1;
}

/* Monochrome checkboxes for main library subfilters */
.subfilter-dropdown .subfilter-option input[type="checkbox"] {
  accent-color: #fff; /* dark theme */
}
body.light-theme .subfilter-dropdown .subfilter-option input[type="checkbox"] {
  accent-color: #000; /* light theme */
}

/* Light theme overlay panels */
body.light-theme .subfilter-dropdown .subfilter-dropdown-content,
body.light-theme .subfilter-dropdown > .subfilter-options {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  border-radius: 6px;
}

body.light-theme #addLearnModal #learnSectionsContainer .learn-paragraph {
    color: #555;
}



.instruction-add-row {
    display: flex;
    gap: 10px;
    align-items: center;
}




.subfilter-selection-area h4 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.subfilter-bubbles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subfilter-bubbles-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 32px;
    min-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subfilter-bubbles-inline:empty {
    min-height: 0;
    padding: 0;
}

.subfilter-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #000000;
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.subfilter-bubble:hover {
    background: #000000;
    border-color: transparent;
}

.subfilter-bubble.selected {
    background: #000000;
    border-color: transparent;
    box-shadow: none;
}

.subfilter-bubble input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    accent-color: #000;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

/* Password Reset Form Styles */
.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: #9ad;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #fff;
    text-decoration: underline;
}

.reset-instructions {
    color: #ccc;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
    line-height: 1.4;
}

.back-to-signin {
    text-align: center;
    margin-top: 20px;
}

.back-to-signin a {
    color: #9ad;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-to-signin a:hover {
    color: #fff;
    text-decoration: underline;
}

.submit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.submit-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Settings Section Styles */
.settings-section {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-item {
    padding: 15px 0;
    border-bottom: 1px solid #444;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-item h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

/* Theme Toggle */
.theme-toggle {
    margin-top: 10px;
}

.theme-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.theme-checkbox {
    display: none;
}

.theme-slider {
    width: 50px;
    height: 24px;
    background: #555;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.theme-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.theme-checkbox:checked + .theme-slider {
    background: #000000;
}

.theme-checkbox:checked + .theme-slider:before {
    transform: translateX(26px);
}

.theme-text {
    color: #fff;
    font-size: 14px;
}

/* Animation Toggle Styles */
.animation-controls {
    margin-top: 10px;
}

.animation-controls h4 {
    margin: 0 0 12px 0;
    color: #fff;
    font-size: 16px;
    text-align: left;
}

.animation-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.animation-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    user-select: none;
}

.animation-checkbox {
    display: none;
}

.animation-slider {
    width: 50px;
    height: 24px;
    background: #555;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.animation-slider:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.animation-checkbox:checked + .animation-slider {
    background: #000000;
}

.animation-checkbox:checked + .animation-slider:before {
    transform: translateX(26px);
}

.animation-text {
    font-size: 14px;
    color: #ccc;
}

/* Font Size Controls */
.font-size-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.font-size-btn {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.font-size-btn:hover {
    background: #555;
    border-color: #777;
}

.font-size-btn.active {
    background: #000000;
    border-color: #000000;
}

/* Dot Style Controls */
.dot-style-toggle {
    margin-top: 10px;
}

.dot-style-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.dot-style-checkbox {
    display: none;
}

.dot-style-slider {
    width: 50px;
    height: 24px;
    background: #555;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.dot-style-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.dot-style-checkbox:checked + .dot-style-slider {
    background: #000000;
}

.dot-style-checkbox:checked + .dot-style-slider:before {
    transform: translateX(26px);
}

.dot-style-text {
    color: #fff;
    font-size: 14px;
}

/* Admin Settings Styles */
.admin-setting-heading {
    font-size: 0.9rem;
    font-weight: normal;
    color: #ccc;
    margin-bottom: 10px;
}

.yt-link-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.yt-link-input {
    flex: 1;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.yt-link-input::placeholder {
    color: #999;
}

.yt-link-input:focus {
    outline: none;
    border-color: #666;
}

.save-yt-link-btn {
    background: #555;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.save-yt-link-btn:hover {
    background: #666;
}

.save-yt-link-btn:active {
    background: #444;
}

/* Set # Column Styles - Override table input width */
.workout-table td:first-child .workout-set-number-input {
    width: 45px;
    text-align: center;
    font-weight: bold;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px;
    font-size: 12px;
}

/* Exercise Name Column - Ensure proper width */
.workout-table td:nth-child(2) .workout-exercise-input {
    width: 200px;
    max-width: 200px;
}

/* Color classes for modal bubbles - only apply when selected */
.subfilter-bubble.selected.black {
    background-color: #000000;
    color: white;
}

.subfilter-bubble.selected.black:hover {
    background-color: #555555;
}

.subfilter-bubble.selected.forest-green {
    background-color: #228B22;
    color: white;
}

.subfilter-bubble.selected.forest-green:hover {
    background-color: #32CD32;
}

.subfilter-bubble.selected.navy {
    background-color: #000080;
    color: white;
}

.subfilter-bubble.selected.navy:hover {
    background-color: #191970;
}

.subfilter-bubble.selected.burnt-orange {
    background-color: #CC5500;
    color: white;
}

.subfilter-bubble.selected.burnt-orange:hover {
    background-color: #FF6600;
}

.subfilter-bubble.selected.maroon {
    background-color: #800000;
    color: white;
}

.subfilter-bubble.selected.maroon:hover {
    background-color: #A0522D;
}

/* Workout subfilter bubble color classes */
.workout-subfilter-bubble.selected.black {
    background-color: #000000;
    color: white;
}

.workout-subfilter-bubble.selected.black:hover {
    background-color: #555555;
}

.workout-subfilter-bubble.selected.forest-green {
    background-color: #228B22;
    color: white;
}

.workout-subfilter-bubble.selected.forest-green:hover {
    background-color: #32CD32;
}

.workout-subfilter-bubble.selected.navy {
    background-color: #000080;
    color: white;
}

.workout-subfilter-bubble.selected.navy:hover {
    background-color: #191970;
}

.workout-subfilter-bubble.selected.burnt-orange {
    background-color: #CC5500;
    color: white;
}

.workout-subfilter-bubble.selected.burnt-orange:hover {
    background-color: #FF6600;
}

.workout-subfilter-bubble.selected.maroon {
    background-color: #800000;
    color: white;
}

.workout-subfilter-bubble.selected.maroon:hover {
    background-color: #A52A2A;
}

/* Color classes for card bubbles */
.library-card-subcategory-option.black {
    background-color: #000000;
    color: white;
}

.library-card-subcategory-option.black:hover {
    background-color: #555555;
}

.library-card-subcategory-option.forest-green {
    background-color: #228B22;
    color: white;
}

.library-card-subcategory-option.forest-green:hover {
    background-color: #32CD32;
}

.library-card-subcategory-option.navy {
    background-color: #000080;
    color: white;
}

.library-card-subcategory-option.navy:hover {
    background-color: #191970;
}

.library-card-subcategory-option.burnt-orange {
    background-color: #CC5500;
    color: white;
}

.library-card-subcategory-option.burnt-orange:hover {
    background-color: #FF6600;
}

.library-card-subcategory-option.maroon {
    background-color: #800000;
    color: white;
}

.library-card-subcategory-option.maroon:hover {
    background-color: #A0522D;
}

/* Color legend styles for modal */
.color-legend {
    margin: 8px 0;
}

.color-legend-title {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.color-legend-dot.black {
    background-color: #000000;
}

.color-legend-dot.forest-green {
    background-color: #228B22;
}

.color-legend-dot.navy {
    background-color: #000080;
}

.color-legend-dot.burnt-orange {
    background-color: #CC5500;
}

.color-legend-dot.maroon {
    background-color: #800000;
}

.color-legend-input {
    background-color: #333;
    border: 1px solid #555;
    color: white;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    width: 60px;
}

.color-legend-input:focus {
    outline: none;
    border-color: #777;
}

/* Color legend styles for cards */
.library-card-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.library-card-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #999;
}

.library-card-legend-dot.black {
    background-color: #000000;
}

.library-card-legend-dot.forest-green {
    background-color: #228B22;
}

.library-card-legend-dot.navy {
    background-color: #000080;
}

.library-card-legend-dot.burnt-orange {
    background-color: #CC5500;
}

.library-card-legend-dot.maroon {
    background-color: #800000;
}

/* UNIVERSAL LEGEND DOT SIZE - ALL LIBRARIES */
.color-legend-dot,
.library-card-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Ensure drug-exercise dots are exactly the same size */
.drug-exercise-card .library-card-legend-dot {
    width: 8px;
    height: 8px;
}


/* References section styles */
.references-section {
    margin-top: 10px;
}

.references-input-container {
    margin-bottom: 15px;
}

.references-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reference-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reference-input {
    flex: 1;
    background-color: #333;
    border: 1px solid #555;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.reference-input:focus {
    outline: none;
    border-color: #777;
}

.reference-number {
    color: #999;
    font-size: 14px;
    min-width: 25px;
    text-align: left;
}

.remove-reference-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.remove-reference-btn:hover {
    background-color: #b71c1c;
}

/* References section on cards */
.library-card-references {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.library-card-references-title {
    font-size: 14px;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    text-align: left;
}

.library-card-references-list {
    text-align: left;
}

.library-card-reference-item {
    font-size: 12px;
    color: #ccc;
    line-height: 1.4;
    margin-bottom: 6px;
    text-align: left;
}

/* Admin Folder Styles */
.admin-folder-section {
    margin-bottom: 40px;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    background-color: #222;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.admin-section-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.add-all-cards-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.add-all-cards-btn:hover {
    background-color: #666;
}

.add-all-cards-btn:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
}

.admin-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 100px;
}

.admin-cards-container:empty::before {
    content: "No cards in admin folder";
    color: #666;
    font-style: italic;
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
}

/* Admin Folder Toggle Styles */
.admin-folder-controls {
    margin-top: 15px;
}

.admin-folder-toggle {
    margin-bottom: 15px;
}

.admin-folder-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
}

.admin-folder-checkbox {
    display: none;
}

.admin-folder-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #555;
    border-radius: 12px;
    margin-right: 12px;
    transition: background-color 0.3s ease;
}

.admin-folder-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.admin-folder-checkbox:checked + .admin-folder-slider {
    background-color: #00ffff;
}

.admin-folder-checkbox:checked + .admin-folder-slider::before {
    transform: translateX(26px);
}

.admin-folder-text {
    font-weight: 500;
}

.admin-folder-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 8px;
}

/* Admin Folder Button Color Change */
.nav-btn.admin-folder-enabled {
    background-color: #00ffff !important;
    color: #000 !important;
}

.nav-btn.admin-folder-enabled:hover {
    background-color: #00e6e6 !important;
}

/* Admin Folder Card Styles */
/* Admin Folder Card Styling - One card per row, full width, grey boxes */
.admin-folder-card {
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 15px;
    width: 100% !important;
    max-width: none !important;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.admin-folder-card:hover {
    background-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Admin folder cards now use the standard library card structure */

/* Admin folder cards inherit all styling from main library cards */

.no-cards-message {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.error-message {
    color: #f44336;
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
}



/* Research Entry styling */
.research-entries-container {
    margin-top: 10px;
}

.research-entry {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.research-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 10px;
}

.research-entry-name-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.research-entry-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.research-entry-name-input:focus {
    outline: none;
    border-color: #4bf0fc;
}

.research-entry-label {
    font-weight: 600;
    color: #4bf0fc;
    font-size: 0.9rem;
}

.research-entry-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.research-entry-delete:hover {
    background: #c82333;
}

.research-entry-textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 10px;
    font-family: inherit;
}

.research-entry-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.research-entry-textarea:focus {
    outline: none;
    border-color: #4bf0fc;
}


/* Research Entry Card Display Styling */
.library-card-research-entries {
    margin-top: 10px;
}

.research-entry-item {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.research-entry-source {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.research-entry-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 0.9rem;
}
