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

/* Global mobile touch improvements */
button,
a,
[role="button"],
.clickable {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button:not(.search-button):not(.filter-btn):not(.login-button):not(.auth-submit-button):not(.google-button):not(.starred-tab):not(.auth-tab) {
    min-height: 44px;
    min-width: 44px;
}

:root {
    /* Sophisticated maroon and white palette */
    --primary-color: #800020;
    --primary-dark: #600018;
    --primary-light: #a00028;
    --primary-lighter: #c00030;
    --secondary-color: #1a1a1a;
    --accent-color: #800020;
    --accent-hover: #600018;
    --accent-gold: #d4af37;
    --accent-gold-hover: #b8941f;
    
    /* Refined light backgrounds */
    --background: #fafafa;
    --background-light: #f5f5f5;
    --background-lighter: #ffffff;
    --card-background: #ffffff;
    --card-hover: #fafafa;
    
    /* Sophisticated text colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --text-muted: #a0aec0;
    
    /* Elegant borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-accent: #800020;
    
    /* Premium shadows */
    --shadow-sm: 0 1px 3px 0 rgba(128, 0, 32, 0.08);
    --shadow: 0 4px 6px -1px rgba(128, 0, 32, 0.1), 0 2px 4px -1px rgba(128, 0, 32, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(128, 0, 32, 0.12), 0 4px 6px -2px rgba(128, 0, 32, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(128, 0, 32, 0.15), 0 10px 10px -5px rgba(128, 0, 32, 0.1);
    --shadow-hover: 0 25px 50px -12px rgba(128, 0, 32, 0.25), 0 12px 24px -4px rgba(128, 0, 32, 0.15);
    --shadow-glow: 0 0 20px rgba(128, 0, 32, 0.2);
    
    /* Sophisticated maroon gradients */
    --gradient-primary: linear-gradient(135deg, #800020 0%, #a00028 50%, #c00030 100%);
    --gradient-accent: linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #fafafa 100%);
    --gradient-background: linear-gradient(135deg, #fafafa 0%, #ffffff 30%, #f5f5f5 60%, #ffffff 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    --gradient-text: linear-gradient(135deg, #800020 0%, #a00028 100%);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-background);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: fadeInBody 0.6s ease-out;
    letter-spacing: -0.01em;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 20px 32px;
    position: relative;
    animation: slideDownFade 0.8s ease-out;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto 32px;
    padding: 24px 0;
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.main-nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-brand h2 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-brand h2:hover {
    transform: translateX(2px);
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
    font-family: inherit;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

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

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

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

.header-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    position: relative;
}

.login-button {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    filter: brightness(1.1);
}

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

/* Removed old header::before - now using .main-nav::after */

/* Removed old header h1 styles - now using .nav-brand h1 */

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
    margin-top: 8px;
}

/* Search Section */
.search-section {
    background: var(--gradient-card);
    padding: 36px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    animation: slideUpFade 0.8s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

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

.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input {
    flex: 1;
    padding: 18px 28px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: var(--card-background);
    color: var(--text-primary);
    transform: scale(1);
    font-weight: 400;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.1), var(--shadow-glow), 0 4px 16px rgba(128, 0, 32, 0.1);
    transform: translateY(-2px) scale(1.01);
    background: var(--card-background);
    animation: inputPulse 2s ease-in-out infinite;
}

@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.1), var(--shadow-glow), 0 4px 16px rgba(128, 0, 32, 0.1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(128, 0, 32, 0.08), 0 0 25px rgba(128, 0, 32, 0.15), 0 4px 20px rgba(128, 0, 32, 0.12);
    }
}

.search-button {
    padding: 18px 40px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
    transform: scale(1);
    letter-spacing: 0.02em;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px;
}

.search-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-button:active::after {
    width: 300px;
    height: 300px;
}

.search-button::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;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    filter: brightness(1.1);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.quick-filters::before {
    content: 'Quick filters:';
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-right: 4px;
}

.starred-tab-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    width: 100%;
}

.starred-tab {
    padding: 12px 32px;
    background: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
}

.starred-tab:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.starred-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn {
    padding: 12px 24px;
    background: var(--card-background);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(128, 0, 32, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md), 0 0 15px rgba(128, 0, 32, 0.2);
}

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

/* Results Container */
.results-container {
    min-height: 400px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.welcome-message {
    text-align: center;
    padding: 80px 20px;
    background: var(--gradient-card);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    color: var(--text-secondary);
    font-size: 1.125rem;
    border: 1px solid var(--border-color);
    animation: fadeInScale 0.8s ease-out;
}

.welcome-message p {
    animation: fadeIn 1s ease-out 0.3s both;
}

.welcome-message p {
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Results Header */
.results-header {
    margin-bottom: 32px;
    padding: 28px 32px;
    background: var(--gradient-card);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    animation: slideDownFade 0.6s ease-out;
}

.results-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    animation: fadeInScale 0.6s ease-out 0.2s both;
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-header h2 .department-name {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    cursor: help;
    position: relative;
    transition: color 0.3s ease;
    flex-shrink: 0;
    vertical-align: middle;
}

.info-icon:hover {
    color: var(--primary-color);
}

.info-icon svg {
    width: 100%;
    height: 100%;
}

.info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--secondary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.info-icon::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: var(--secondary-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.info-icon:hover::before,
.info-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Research Area Sections */
.research-area-section {
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out;
}

.research-area-section.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

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

.trending-labs-section {
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.05) 0%, rgba(160, 0, 40, 0.03) 100%);
    padding: 40px;
    border-radius: 24px;
    border: 2px solid rgba(128, 0, 32, 0.2);
    margin-bottom: 56px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.trending-labs-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    box-shadow: var(--shadow-glow);
}

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

/* REU Program Section */
.reu-program-section {
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.08) 0%, rgba(160, 0, 40, 0.05) 100%);
    padding: 32px 40px;
    border-radius: 20px;
    border: 2px solid rgba(128, 0, 32, 0.15);
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.reu-program-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.reu-program-header {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    letter-spacing: -0.02em;
}

.reu-program-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(128, 0, 32, 0.3);
}

.reu-program-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.reu-program-description {
    flex: 1;
    min-width: 250px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.reu-program-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.reu-program-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.reu-program-link:active {
    transform: translateY(0);
}

.reu-program-link svg {
    transition: transform 0.3s ease;
}

.reu-program-link:hover svg {
    transform: translateX(4px);
}

.research-area-header {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    letter-spacing: -0.02em;
}

.trending-labs-header {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom-color: var(--primary-color);
    font-size: 1.75rem;
}

.research-area-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(128, 0, 32, 0.3);
}

.trending-labs-header::after {
    background: var(--gradient-primary);
    width: 120px;
    box-shadow: 0 0 15px rgba(128, 0, 32, 0.4);
}

/* Department Statistics Section */
.department-stats-section {
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out;
    overflow: visible;
}

.stats-card-combined {
    background: var(--card-background);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: visible;
    animation: fadeInUp 0.6s ease-out;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 32px;
    flex-wrap: wrap;
}

.stats-card-combined::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.stats-card-combined:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.stat-item-combined {
    text-align: center;
    flex: 1;
    min-width: 150px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: visible;
}

.stat-item-combined:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-item-combined:nth-child(3) {
    animation-delay: 0.2s;
}

.stat-item-combined:nth-child(5) {
    animation-delay: 0.3s;
}

.stat-divider {
    width: 1px;
    height: 80px;
    background: var(--border-color);
    opacity: 0.5;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    opacity: 0.8;
}

.stat-asterisk {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    cursor: help;
    position: relative;
    margin-left: 4px;
    font-size: 1rem;
    vertical-align: baseline;
    z-index: 1001;
}

.stat-asterisk::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--secondary-color);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
    text-transform: none;
    letter-spacing: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    max-width: 350px;
    text-align: left;
    line-height: 1.5;
}

.stat-asterisk::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: var(--secondary-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.stat-asterisk:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.stat-asterisk:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: numberCountUp 1s ease-out;
    position: relative;
}

@keyframes numberCountUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stats-card-combined:hover .stat-number {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .stats-card-combined {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-divider {
        width: 80%;
        height: 1px;
    }
    
    .stat-item-combined {
        width: 100%;
    }
}

/* Professors Grid */
.professors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: minmax(280px, auto);
    gap: 24px;
    margin-top: 24px;
}

.professor-card {
    opacity: 0;
    animation: cardSlideIn 0.5s ease-out forwards;
    background: transparent;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    height: 100%;
    min-height: 280px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.professor-card:nth-child(1) { animation-delay: 0.1s; }
.professor-card:nth-child(2) { animation-delay: 0.15s; }
.professor-card:nth-child(3) { animation-delay: 0.2s; }
.professor-card:nth-child(4) { animation-delay: 0.25s; }
.professor-card:nth-child(5) { animation-delay: 0.3s; }
.professor-card:nth-child(6) { animation-delay: 0.35s; }
.professor-card:nth-child(7) { animation-delay: 0.4s; }
.professor-card:nth-child(8) { animation-delay: 0.45s; }
.professor-card:nth-child(9) { animation-delay: 0.5s; }
.professor-card:nth-child(n+10) { animation-delay: 0.55s; }

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

/* Translucent cards for professors with 0 lab members (not recruiting) */
.professor-card.card-translucent {
    animation: cardSlideInTranslucent 0.5s ease-out forwards;
}

@keyframes cardSlideInTranslucent {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 0.5;
        transform: translateY(0) scale(1);
    }
}

.professor-card.card-translucent:hover {
    opacity: 0.8 !important;
}

/* Recruiting stripe (bottom-right corner triangular badge) */
.recruiting-stripe {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 80px 80px;
    border-color: transparent transparent var(--primary-color) transparent;
    z-index: 15;
    pointer-events: none;
    overflow: visible;
}

.recruiting-stripe span {
    position: absolute;
    /* Position at center of triangle's hypotenuse */
    /* For 80px triangle: center is at 40px from top-left of triangle area */
    /* But we need to account for the triangle being positioned at bottom-right */
    left: 0;
    top: 0;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: recruitingPulse 2s ease-in-out infinite;
    /* Position at center of hypotenuse, then rotate */
    transform: translate(28px, 28px) rotate(-45deg);
    transform-origin: center center;
    display: inline-block;
    line-height: 1.2;
    text-align: center;
    width: 65px;
    margin-left: -32.5px;
    margin-top: -0.35em;
}

@keyframes recruitingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

.star-icon-container {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.star-icon-container:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.star-icon {
    width: 20px;
    height: 20px;
    stroke: var(--text-tertiary);
    fill: none;
    transition: all 0.3s ease;
}

.star-icon-container:hover .star-icon {
    stroke: var(--primary-color);
    transform: scale(1.1);
}

.star-icon.starred {
    fill: var(--accent-gold);
    stroke: var(--accent-gold);
}

.star-icon-container:hover .star-icon.starred {
    fill: var(--accent-gold-hover);
    stroke: var(--accent-gold-hover);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    min-height: 280px;
    box-sizing: border-box;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    padding: 24px 32px;
    background: var(--gradient-card);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar styling for card content - matching stats section */
.card-front::-webkit-scrollbar,
.card-back::-webkit-scrollbar {
    width: 6px;
}

.card-front::-webkit-scrollbar-track,
.card-back::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.card-front::-webkit-scrollbar-thumb,
.card-back::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.4;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.card-front::-webkit-scrollbar-thumb:hover,
.card-back::-webkit-scrollbar-thumb:hover {
    opacity: 0.7;
    background: var(--primary-dark);
}

.card-front::-webkit-scrollbar-thumb:active,
.card-back::-webkit-scrollbar-thumb:active {
    opacity: 0.9;
    background: var(--primary-dark);
}

/* Firefox scrollbar styling */
.card-front,
.card-back {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glow);
}

.card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.03) 0%, rgba(160, 0, 40, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
}

.professor-card:hover .card-front::before {
    transform: scaleX(1);
}

.professor-card:hover .card-front::after {
    opacity: 1;
}

.professor-card:not(:has(.card-inner.flipped)):hover {
    transform: translateY(-10px) scale(1.03);
}

.professor-card:not(:has(.card-inner.flipped)):hover .card-front {
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: var(--primary-color);
}

.professor-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.professor-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    flex-shrink: 0;
}

.lab-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.lab-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.lab-name {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: default;
    text-decoration: none;
}

.lab-link {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    padding: 4px 0;
}

.lab-link::after {
    content: '↗';
    font-size: 0.875rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.lab-link:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Email Section */
.website-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.website-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.website-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    padding: 8px 0;
    display: inline-flex;
    align-items: center;
}

.website-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

.email-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    margin-bottom: 0;
}

.email-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.email-link {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    padding: 4px 0;
}

.email-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.email-link::before {
    content: '✉';
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Flip hint */
.flip-hint {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    font-style: italic;
    flex-shrink: 0;
}

/* Stats section */
.stats-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.02em;
}

.stat-item {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stats-loading {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    padding: 20px;
}

.stats-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.lab-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: var(--gradient-card);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.no-results p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Loading */
.loading {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

.loading::after {
    content: 'Loading';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dots {
    0%, 20% { content: 'Loading'; }
    40% { content: 'Loading.'; }
    60%, 100% { content: 'Loading...'; }
}

/* Mobile optimizations - disable animations for performance */
@media (max-width: 768px) {
    /* Disable all animations and transitions on mobile to prevent crashes */
    *,
    *::before,
    *::after {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    
    /* Keep essential transitions for user feedback (very short) */
    button:active,
    a:active {
        transition: opacity 0.1s !important;
    }
    
    .container {
        padding: 24px 16px;
    }

    header {
        padding: 32px 16px 24px;
        margin-bottom: 32px;
    }

    header h1 {
        font-size: 2rem;
    }

    .search-section {
        padding: 24px;
        border-radius: 16px;
    }

    .search-container {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
        padding: 16px 24px;
        font-size: 1rem;
    }

    .quick-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-filters::before {
        margin-bottom: 8px;
    }

    .filter-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .professors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .professor-card {
        min-height: 240px;
    }
    
    .card-front,
    .card-back {
        padding: 24px;
    }

    .research-area-header {
        font-size: 1.375rem;
    }

    .trending-labs-section {
        padding: 24px;
    }

    .star-icon-container {
        width: 48px;
        height: 48px;
        top: 12px;
        right: 12px;
    }

    .login-button {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .search-section {
        padding: 20px;
    }

    .professor-card {
        padding: 20px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Smooth scroll offset */
html {
    scroll-padding-top: 20px;
}

/* Add subtle parallax effect on scroll */
@media (prefers-reduced-motion: no-preference) {
    .container {
        transition: transform 0.1s ease-out;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Smooth transitions for all interactive elements */
a, button, input, .filter-btn, .professor-card {
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced lab link hover */
.lab-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-link:hover {
    transform: translateX(4px);
}

/* Pulse animation for trending labs section */
@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), var(--shadow-glow);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 30px rgba(128, 0, 32, 0.2), 0 0 50px rgba(160, 0, 40, 0.15);
    }
}

.trending-labs-section {
    animation: pulse 3s ease-in-out infinite;
}

/* Add floating animation to cards on hover */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Site Footer */
.site-footer {
    margin-top: 80px;
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    animation: fadeInUp 0.6s ease-out;
}

.site-footer p {
    margin: 0;
    color: var(--text-tertiary);
}

.site-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Enhanced search container animation */
.search-container {
    animation: fadeIn 0.6s ease-out 0.3s both;
}

/* Quick filters animation */
.quick-filters {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: var(--card-background);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUpFade 0.3s ease;
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-light);
}

.auth-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
}

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

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

.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.1);
}

.auth-submit-button {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
}

.auth-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    filter: brightness(1.1);
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    background: var(--card-background);
    padding: 0 16px;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    position: relative;
}

.google-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
}

.google-button:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.auth-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 12px;
    text-align: center;
    padding: 8px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    display: none; /* Hidden by default */
    min-height: 0;
}

.auth-error:not(:empty) {
    display: block; /* Only show when there's content */
}

/* About Modal */
.about-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.about-modal-content {
    background: var(--card-background);
    border-radius: 24px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUpFade 0.4s ease;
    border: 1px solid var(--border-color);
}

.about-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.about-modal-close:hover {
    color: var(--primary-color);
    background: var(--background-light);
    transform: rotate(90deg);
}

.about-modal-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    margin-right: 48px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.about-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.about-content p {
    margin-bottom: 16px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }

    .nav-link {
        padding: 10px 16px;
    }
    
    .login-button {
        flex: 1;
        max-width: none;
    }

    .header-content {
        margin-top: 0;
    }
    
    .auth-modal-content {
        padding: 32px 24px;
    }

    .about-modal-content {
        padding: 36px 24px;
        max-height: 90vh;
    }

    .about-modal-content h2 {
        margin-right: 32px;
        font-size: 1.75rem;
    }

    .about-modal-close {
        top: 16px;
        right: 16px;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
}
