/* Google-Inspired Clean Black & White Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #202124;
    --secondary-black: #3c4043;
    --light-gray: #f8f9fa;
    --medium-gray: #e8eaed;
    --dark-gray: #5f6368;
    --border-gray: #dadce0;
    --white: #ffffff;
    --shadow-light: 0 1px 6px rgba(32, 33, 36, .28);
    --shadow-medium: 0 2px 10px rgba(32, 33, 36, .2);
    --shadow-heavy: 0 4px 16px rgba(32, 33, 36, .15);
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;

    /* Rating Colors */
    --excellent: #4caf50;
    --good: #8bc34a;
    --average: #ff9800;
    --poor: #f44336;
    --very-poor: #d32f2f;

    /* Tag Colors */
    --positive-tag: #4caf50;
    --positive-light: #e8f5e8;
    --neutral-tag: #ff9800;
    --neutral-light: #fff3e0;
    --negative-tag: #f44336;
    --negative-light: #ffebee;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--white);
    font-size: 14px;
    padding-top: 62px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    overflow: visible !important;
    /* CRITICAL: Allow dropdown to overflow */
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-gray);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.header-hidden {
    transform: translateY(-100%);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    min-height: 50px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 400;
    color: var(--primary-black);
    font-family: 'Google Sans', sans-serif;
    margin: 0;
}

.logo-image {
    height: 30px;
    width: auto;
    max-width: 125px;
    display: block;
    object-fit: contain;
    object-position: left center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-link {
    text-decoration: none;
    color: var(--primary-black);
    border-bottom: none;
    padding-bottom: 0;
    transition: all 0.2s ease;
    display: block;
}

.logo-link:hover .logo-image {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo .highlight {
    color: var(--primary-black);
    font-weight: 500;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 44px;
    margin-left: auto;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-black);
    font-weight: 400;
    padding: 10px 16px;
    border-radius: var(--radius-small);
    transition: background-color 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    min-height: 20px;
}

.nav-link:hover {
    background-color: var(--light-gray);
}

.nav-link.register {
    background-color: var(--primary-black);
    color: var(--white);
}

.nav-link.register:hover {
    background-color: var(--secondary-black);
}

/* Navbar Search Container */
.nav-search-container {
    position: relative;
    margin-right: 24px;
}

.nav-search-input {
    width: 300px;
    padding: 8px 16px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: var(--light-gray);
}

.nav-search-input:focus {
    background: var(--white);
    border-color: var(--primary-black);
    box-shadow: var(--shadow-light);
}

.nav-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 90;
    display: none;
}

.nav-search-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

.nav-search-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.nav-search-section:last-child {
    border-bottom: none;
}

.nav-search-section-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-search-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-search-item:hover {
    background-color: var(--light-gray);
}

.nav-search-item-icon {
    font-size: 18px;
    margin-top: 2px;
}

.nav-search-item-info {
    flex: 1;
    min-width: 0;
}

.nav-search-item-name {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 4px;
    font-size: 14px;
}

.nav-search-item-details {
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-search-item-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.star-small {
    font-size: 12px;
    color: #f6ad55;
}

.star-small.empty {
    color: var(--medium-gray);
}

.rating-value {
    font-weight: 600;
    color: var(--primary-black);
}

.review-count-small {
    color: var(--dark-gray);
    font-size: 11px;
}

.nav-search-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--dark-gray);
    font-size: 14px;
}

.nav-search-error {
    padding: 16px;
    text-align: center;
    color: var(--poor);
    font-size: 13px;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-right: 24px;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary-black);
    transition: all 0.2s ease;
}

.language-btn:hover {
    background-color: var(--light-gray);
    border-color: var(--secondary-black);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-medium);
    min-width: 120px;
    display: none;
    z-index: 90;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary-black);
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: var(--light-gray);
}

.language-option.active {
    background-color: var(--primary-black);
    color: var(--white);
}

/* Authentication Section */
.auth-section {
    display: flex;
    align-items: center;
}

/* Authentication Buttons */
.auth-buttons-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-button-mobile {
    display: none;
}

/* Mobile Menu Button - Hidden by default */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-black);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Dropdown - Hidden by default */
.mobile-menu-dropdown {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-gray);
    box-shadow: var(--shadow-heavy);
    z-index: 100;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.mobile-menu-dropdown.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-item {
    display: block;
    padding: 12px 20px;
    color: var(--secondary-black);
    text-decoration: none;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-small);
    margin: 8px 16px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.mobile-menu-item:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-black);
}

/* Style for mobile menu auth buttons */
.mobile-menu-auth {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-auth .mobile-menu-item {
    border: 2px solid var(--primary-black);
    border-radius: var(--radius-small);
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mobile-menu-auth .mobile-menu-item:hover {
    background-color: var(--primary-black);
    color: var(--white);
}

/* Register button with filled background */
.mobile-menu-auth .mobile-menu-item:last-child {
    background-color: var(--primary-black);
    color: var(--white);
    border: 2px solid var(--primary-black);
}

.mobile-menu-auth .mobile-menu-item:last-child:hover {
    background-color: var(--secondary-black);
    border-color: var(--secondary-black);
}

/* Style for mobile menu user buttons (when logged in) */
.mobile-menu-user {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-user .mobile-menu-item {
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-small);
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mobile-menu-user .mobile-menu-item:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-black);
}

/* Logout button styling */
.mobile-menu-user .mobile-menu-item:last-child {
    border-color: #dc3545;
    color: #dc3545;
}

.mobile-menu-user .mobile-menu-item:last-child:hover {
    background-color: #dc3545;
    color: var(--white);
    border-color: #dc3545;
}

.mobile-menu-language {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-gray);
}

.language-btn-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary-black);
    transition: all 0.2s ease;
    width: 100%;
    justify-content: space-between;
}

.language-btn-mobile:hover {
    background-color: var(--light-gray);
    border-color: var(--secondary-black);
}

.language-dropdown-mobile {
    display: none;
    margin-top: 8px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
}

.language-dropdown-mobile.show {
    display: block;
}

.language-dropdown-mobile .language-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-gray);
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--secondary-black);
    transition: background-color 0.2s ease;
}

.language-dropdown-mobile .language-option:last-child {
    border-bottom: none;
}

.language-dropdown-mobile .language-option:hover {
    background-color: var(--light-gray);
}

.language-dropdown-mobile .language-option.active {
    background-color: var(--primary-black);
    color: var(--white);
}

.mobile-auth-btn {
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 12px;
    font-weight: 400;
    padding: 6px 10px;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
}

.mobile-auth-btn:hover {
    background-color: var(--light-gray);
    color: var(--secondary-black);
}

/* Hero Section */
.hero {
    background: var(--white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: visible !important;
    /* CRITICAL: Allow dropdown to overflow and be visible */
}

.hero-title {
    font-size: 48px;
    font-weight: 400;
    color: var(--primary-black);
    margin-bottom: 16px;
    font-family: 'Google Sans', sans-serif;
    line-height: 1.2;
}

.typewriter-container {
    position: relative;
    display: inline-block;
}

.typewriter-background {
    color: #d3d3d3;
    opacity: 0.4;
}

.typewriter-text {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-black);
    white-space: nowrap;
    overflow: hidden;
}

.typewriter-text::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

.typewriter-text.typing-complete::after {
    animation: none;
    opacity: 0;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.highlight-yellow {
    color: #f9ab00;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--dark-gray);
    margin-bottom: 40px;
    font-weight: 400;
}

.typewriter-container-subtitle {
    position: relative;
    display: inline-block;
}

.typewriter-background-subtitle {
    color: var(--dark-gray);
    opacity: 0.3;
}

.typewriter-text-subtitle {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--dark-gray);
    white-space: nowrap;
    overflow: hidden;
}

.typewriter-text-subtitle::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    opacity: 0;
}

.typewriter-text-subtitle.typing-started::after {
    opacity: 1;
}

.typewriter-text-subtitle.typing-complete::after {
    animation: none;
    opacity: 0;
}

/* Search Container */
.search-container {
    display: flex;
    max-width: 584px;
    margin: 0 auto 32px;
    position: relative;
    overflow: visible !important;
    /* CRITICAL: Allow dropdown to overflow */
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-medium);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-light);
    background: var(--white);
}

.search-input:focus {
    border-color: var(--primary-black);
    box-shadow: var(--shadow-medium);
}

.search-input:hover {
    box-shadow: var(--shadow-medium);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #dadce0;
    border-radius: var(--radius-small);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    z-index: 5;
}

.search-btn:hover {
    background-color: #f1f3f4;
    border-color: #000000;
}

/* University Tags */
.popular-universities {
    margin-top: 40px;
    position: relative;
    z-index: 1;
    /* Keep it below the search dropdown */
}

.popular-universities h3 {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--dark-gray);
    font-weight: 400;
}

.university-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.university-tag {
    background-color: var(--white);
    color: var(--secondary-black);
    border: 1px solid var(--border-gray);
    padding: 8px 16px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 400;
}

.university-tag:hover {
    background-color: var(--light-gray);
    box-shadow: var(--shadow-light);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    overflow: hidden;
    position: relative;
}

.feature-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    width: 100%;
}

.feature-grid-carousel {
    display: flex;
    gap: 32px;
    transition: transform 0.5s ease;
    overflow: visible;
    position: relative;
    will-change: transform;
    width: 100%;
}

.feature-grid-carousel.sliding {
    will-change: transform;
}

.feature-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius-medium);
    text-align: center;
    border: 1px solid var(--border-gray);
    transition: all 0.3s ease;
    flex: 0 0 calc((100% - 64px) / 3);
    min-width: 0;
}

.feature-card-clickable {
    cursor: pointer;
}

.feature-card-clickable:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
    border-color: var(--primary-black);
}

@keyframes pulse-card {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse-animate {
    animation: pulse-card 0.4s ease-in-out;
}

.feature-card h3 {
    color: var(--primary-black);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 500;
}

.feature-card p {
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 14px;
}

/* Rate Button Section */
.rate-button-container {
    display: flex;
    gap: 8px;
    margin-top: 48px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Reorder buttons to put Rate My Professor in middle */
.rate-button-container .partners-button:nth-of-type(1) {
    order: 1;
}

.rate-button-container .partners-button:nth-of-type(2) {
    order: 2;
}

.rate-button-container .rate-button {
    order: 3;
}

.rate-button-container .partners-button:nth-of-type(3) {
    order: 4;
}

.rate-button {
    background-color: var(--primary-black);
    color: var(--white);
    text-decoration: none;
    padding: 16px 32px;
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-black);
    display: inline-block;
}

.rate-button:hover {
    background-color: var(--white);
    color: var(--primary-black);
    box-shadow: var(--shadow-medium);
}

.partners-button {
    background-color: var(--white);
    color: var(--primary-black);
    text-decoration: none;
    padding: 16px 32px;
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-black);
    display: inline-block;
}

.partners-button:hover {
    background-color: var(--primary-black);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

/* Professor List */
.professor-list {
    padding: 60px 0;
}

.professor-list h2 {
    margin-bottom: 32px;
    color: var(--primary-black);
    font-size: 24px;
    font-weight: 400;
}

.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.filters select {
    padding: 12px 16px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    background-color: var(--white);
    color: var(--secondary-black);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-black);
}

/* Professor Cards */
.professors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.professor-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-medium);
    padding: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.professor-card:hover {
    box-shadow: var(--shadow-heavy);
    transform: translateY(-2px);
}

.professor-info h3 {
    color: var(--primary-black);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.professor-department {
    color: var(--dark-gray);
    margin-bottom: 16px;
    font-size: 14px;
}

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

.stars {
    font-size: 16px;
    font-weight: 400;
}

.rating-number {
    font-weight: 500;
    font-size: 16px;
    padding: 2px 8px;
    border-radius: var(--radius-small);
    color: var(--white);
}

/* Rating Color Classes */
.stars {
    color: var(--primary-black) !important;
    background: none !important;
}

/* Rating color classes - matching working fc65043 commit */
.rating-excellent .rating-number {
    color: var(--white) !important;
    background-color: var(--excellent) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.rating-good .rating-number {
    color: var(--white) !important;
    background-color: var(--good) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.rating-average .rating-number {
    color: var(--white) !important;
    background-color: var(--average) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.rating-poor .rating-number {
    color: var(--white) !important;
    background-color: var(--poor) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.rating-very-poor .rating-number {
    color: var(--white) !important;
    background-color: var(--very-poor) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Review rating values */
.review-rating-value.rating-excellent {
    background-color: var(--excellent) !important;
}

.review-rating-value.rating-good {
    background-color: var(--good) !important;
}

.review-rating-value.rating-average {
    background-color: var(--average) !important;
}

.review-rating-value.rating-poor {
    background-color: var(--poor) !important;
}

.review-rating-value.rating-very-poor {
    background-color: var(--very-poor) !important;
}

/* Fallback: Apply colors based on rating value ranges */
.rating-number:not([style*="background"]) {
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* Additional specific selectors for all rating number contexts */
span.rating-number,
.rating-number span {
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.review-count {
    color: var(--dark-gray);
    font-size: 13px;
    margin-bottom: 16px;
}

.professor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.professor-tag {
    padding: 6px 12px;
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #e8f0fe;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.tag {
    padding: 4px 8px;
    border-radius: var(--radius-small);
    font-size: 12px;
    font-weight: 500;
    border: none;
}

.tag.positive {
    background-color: var(--positive-light);
    color: var(--positive-tag);
    border: 1px solid var(--positive-tag);
}

.tag.negative {
    background-color: var(--negative-light);
    color: var(--negative-tag);
    border: 1px solid var(--negative-tag);
}

.tag.neutral {
    background-color: var(--neutral-light);
    color: var(--neutral-tag);
    border: 1px solid var(--neutral-tag);
}

.tag.more {
    background-color: var(--medium-gray);
    color: var(--primary-black);
    font-weight: 500;
    border: 1px solid var(--border-gray);
}

.card-action {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-gray);
}

.view-details {
    color: var(--primary-black);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-details::after {
    content: '→';
    transition: transform 0.2s ease;
}

.professor-card:hover .view-details::after {
    transform: translateX(4px);
}

/* Footer */
.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-gray);
    padding: 32px 0;
    text-align: center;
}

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

.footer p {
    color: var(--dark-gray);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-black);
}

/* Loading States */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .header .container {
        padding: 12px 16px;
        height: auto;
    }

    /* Make logo smaller on mobile for better visibility */
    .logo h1 {
        font-size: 18px;
    }

    .logo-image {
        height: 32px;
        max-width: 130px;
    }

    /* Fix language dropdown positioning on mobile */
    .language-switcher {
        margin-right: 16px;
        order: 2;
        margin-left: auto;
    }

    .language-dropdown {
        right: 0;
        left: auto;
        min-width: 140px;
        margin-top: 2px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 24px;
    }

    /* Fix typewriter alignment on mobile */
    .typewriter-container {
        display: block;
        width: 100%;
    }

    .typewriter-background {
        display: none;
        /* Hide gray background text on mobile */
    }

    .typewriter-text {
        position: relative;
        display: block;
        width: 100%;
        left: auto;
        top: auto;
        white-space: normal;
        /* Allow text to wrap */
        word-wrap: break-word;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    /* Reduce title sizes on mobile */
    .professor-info h3 {
        font-size: 15px;
    }

    .top-professors h2 {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    .professor-list h2 {
        font-size: 18px;
    }

    .feature-card h3 {
        font-size: 15px;
    }

    .popular-universities h3 {
        font-size: 13px;
    }

    /* PROFESSOR PAGE MOBILE FIXES - 768px */
    .professor-tags-section h3,
    .rating-distribution h3,
    .similar-professors h3 {
        font-size: 1rem !important;
        margin-bottom: 1rem;
    }

    .reviews-header h3 {
        font-size: 1.1rem !important;
    }

    /* Rating distribution mobile */
    .rating-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .bar-container {
        width: 100%;
        height: 6px;
        background: #e2e8f0;
        border-radius: 3px;
        overflow: hidden;
    }

    .search-container {
        flex-direction: column;
        gap: 12px;
        position: relative;
        align-items: center;
        padding: 0 16px;
    }

    .search-btn {
        position: relative;
        transform: none;
        width: 100%;
        max-width: 584px;
        padding: 12px;
        z-index: 1;
    }

    .search-input-wrapper {
        position: relative;
        z-index: 100;
        width: 100%;
        max-width: 584px;
    }

    .search-dropdown {
        z-index: 999;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        top: calc(100% + 4px) !important;
        max-height: 60vh !important;
    }

    .university-tags {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
    }

    .feature-grid-carousel {
        gap: 24px;
    }

    .feature-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .filters {
        flex-direction: column;
        gap: 12px;
    }

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

    .footer .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .nav {
        gap: 20px;
        margin-left: auto;
    }

    /* Show mobile menu button at the right corner */
    .mobile-menu-btn {
        display: flex;
        order: 2;
        margin-left: 12px;
    }

    /* Hide desktop elements on mobile */
    .auth-buttons-desktop,
    .auth-button-mobile,
    .telegram-btn.desktop-telegram,
    .nav-link[href="/clubs"],
    .nav-search-container {
        display: none !important;
    }

    /* Keep language switcher visible on all screen sizes */
    .language-switcher {
        display: inline-block !important;
    }

    /* Show only Rate button on mobile - centered text */
    .nav-link[href="/review-form"] {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        font-size: 14px;
        font-weight: 500;
        min-height: 36px;
        background-color: var(--primary-black);
        color: var(--white);
        margin-left: auto;
        order: 1;
        text-align: center;
    }

    /* Hide user menu on mobile (will be shown in dropdown) */
    .user-menu {
        display: none !important;
    }

    /* Add separator line at bottom of mobile menu */
    .mobile-menu-dropdown {
        border-bottom: 3px solid var(--primary-black);
    }

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

    .search-input-wrapper {
        width: 100%;
    }

    .search-dropdown {
        left: 16px;
        right: 16px;
    }

    /* Rate Button Mobile Styles */
    .rate-button-container {
        margin-top: 32px;
        padding: 0 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        grid-template-columns: unset;
    }

    .rate-button-container .rate-button {
        grid-column: unset;
        justify-self: unset;
        order: 1;
    }

    .rate-button-container .partners-button:nth-of-type(1) {
        justify-self: unset;
        order: 2;
    }

    .rate-button-container .partners-button:nth-of-type(2) {
        justify-self: unset;
        order: 3;
    }

    .rate-button-container .partners-button:nth-of-type(3) {
        justify-self: unset;
        order: 4;
    }

    .rate-button,
    .partners-button {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
        font-size: 16px;
    }

    /* Mobile/Tablet Theme Toggle Styling */
    .mobile-tablet-theme-toggle {
        display: none;
        background: transparent;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 8px;
        transition: transform 0.2s ease;
    }

    .mobile-tablet-theme-toggle:hover {
        transform: scale(1.1);
    }

    /* Hide mobile theme toggle on desktop, show desktop version */
    @media (min-width: 1025px) {
        .mobile-tablet-theme-toggle {
            display: none !important;
        }
    }

    /* Show mobile theme toggle on tablet/mobile, hide desktop version */
    @media (max-width: 1024px) {
        .desktop-theme-toggle {
            display: none !important;
        }

        .mobile-tablet-theme-toggle {
            display: flex !important;
            align-items: center;
            justify-content: center;
        }
    }
}

/* Search Input Wrapper */
.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
    /* Prevent flex shrinking issues */
    z-index: 1;
}

/* Search Preview */
.search-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: #9aa0a6;
    padding: 16px 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    z-index: 1;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-medium);
    box-shadow: 0 8px 32px rgba(32, 33, 36, 0.2);
    max-height: 320px;
    overflow-y: auto;
    z-index: 90;
    display: none;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autocomplete-results {
    padding: 8px 0;
}

.autocomplete-section-title {
    padding: 12px 20px 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.autocomplete-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--medium-gray);
    border-radius: var(--radius-small);
    margin: 0 8px;
}

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

.autocomplete-item:hover {
    background-color: var(--light-gray);
    transform: translateX(4px);
}

.autocomplete-item.active {
    background-color: var(--medium-gray);
    transform: translateX(4px);
}

.autocomplete-item-main strong {
    display: block;
    color: var(--primary-black);
    margin-bottom: 4px;
    font-size: 15px;
}

.autocomplete-item-meta {
    font-size: 13px;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.review-count-badge {
    font-size: 12px;
    color: var(--dark-gray);
}

.autocomplete-empty {
    padding: 20px;
    text-align: center;
    color: var(--dark-gray);
    font-size: 14px;
}

.university-name {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 4px;
}

.university-info {
    color: var(--dark-gray);
    font-size: 13px;
}

/* No Results and University Creation Suggestion */
.no-results {
    padding: 20px;
    text-align: center;
    color: var(--dark-gray);
    font-size: 14px;
    border-bottom: 1px solid var(--border-gray);
}

.create-university-suggestion {
    padding: 20px;
    text-align: center;
    background: #fef3f2;
    border-radius: 0 0 var(--radius-medium) var(--radius-medium);
}

.create-university-suggestion p {
    margin: 0 0 12px 0;
    color: #5f6368;
    font-size: 14px;
}

.create-university-suggestion button {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-small);
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.create-university-suggestion button:hover {
    background: #b71c1c;
}

/* Top Professors Section */
.top-professors {
    padding: 64px 0;
    background-color: var(--light-gray);
}

.top-professors h2 {
    text-align: center;
    font-size: 28px;
    color: var(--primary-black);
    margin-bottom: 8px;
    font-weight: 400;
    font-family: 'Google Sans', sans-serif;
}

.section-subtitle {
    text-align: center;
    color: var(--dark-gray);
    font-size: 16px;
    margin-bottom: 48px;
}

.top-professors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.top-professor-card {
    background: var(--white);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    padding: 24px;
    border: 1px solid var(--border-gray);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.top-professor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Mobile-only: Smaller cards for top professors */
@media (max-width: 768px) {
    .top-professors-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

/* Review preview for recent reviews */
.review-preview {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 12px;
    line-height: 1.5;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #e0e0e0;
}

.professor-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-black);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.professor-name {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 8px;
    font-size: 16px;
}

.professor-dept {
    color: var(--dark-gray);
    font-size: 14px;
    margin-bottom: 12px;
}

.professor-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

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

.rating-number {
    font-weight: 600;
    color: var(--primary-black);
    margin-right: 4px;
}

.rating-count {
    color: var(--dark-gray);
    font-size: 14px;
}

.review-count-text {
    color: var(--dark-gray);
    font-size: 13px;
    margin-top: 2px;
}

.professor-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.top-tag {
    background: var(--light-gray);
    color: var(--dark-gray);
    padding: 4px 8px;
    border-radius: var(--radius-small);
    font-size: 12px;
    font-weight: 500;
}

.view-all-container {
    text-align: center;
}

.view-all-btn {
    background: var(--primary-black);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.view-all-btn:hover {
    background: var(--secondary-black);
    transform: translateY(-1px);
}

/* University Not Found Notification */
.university-not-found-notification {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid #f44336;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    z-index: 1001;
    animation: notificationSlideDown 0.3s ease;
}

@keyframes notificationSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-content {
    padding: 20px;
}

.notification-message {
    color: var(--primary-black);
    font-weight: 500;
    margin-bottom: 8px;
}

.notification-question {
    color: var(--dark-gray);
    margin-bottom: 16px;
}

.notification-actions {
    display: flex;
    gap: 12px;
}

.create-university-btn {
    background: #f44336;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.create-university-btn:hover {
    background: #d32f2f;
}

.cancel-notification-btn {
    background: transparent;
    color: var(--dark-gray);
    border: 1px solid var(--border-gray);
    padding: 8px 16px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-notification-btn:hover {
    background: var(--light-gray);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    border-radius: var(--radius-medium);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid var(--border-gray);
    margin-bottom: 24px;
}

.modal-header h2 {
    color: var(--primary-black);
    font-weight: 500;
    margin: 0;
    font-size: 20px;
}

.close {
    color: var(--dark-gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.modal-body {
    padding: 0 24px 24px 24px;
}

.university-not-found {
    margin-bottom: 24px;
}

.university-not-found p {
    margin-bottom: 12px;
    color: var(--secondary-black);
}

.university-not-found p:first-child {
    font-weight: 500;
    color: var(--primary-black);
}

.university-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--primary-black);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--secondary-black);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--dark-gray);
    border: 1px solid var(--border-gray);
    padding: 12px 20px;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--light-gray);
    color: var(--primary-black);
}

/* Vote button styles */
.vote-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-small);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    margin-right: 8px;
}

.vote-btn:hover:not(:disabled) {
    background: var(--light-gray);
    border-color: var(--primary-black);
}

.vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.vote-btn.voted {
    font-weight: 500;
}

.vote-status {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 8px;
    font-style: italic;
}

.vote-help {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 8px;
}

/* Review rating colors */
.review-rating-value {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    color: var(--white);
}

.review-rating-value.rating-excellent {
    background-color: var(--excellent);
}

.review-rating-value.rating-good {
    background-color: var(--good);
}

.review-rating-value.rating-average {
    background-color: var(--average);
}

.review-rating-value.rating-poor {
    background-color: var(--poor);
}

.review-rating-value.rating-very-poor {
    background-color: var(--very-poor);
}

/* Online course badge */
.online-badge {
    background: var(--neutral-light);
    color: var(--neutral-tag);
    padding: 2px 8px;
    border-radius: var(--radius-small);
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-top: 4px;
}

/* No tags message */
.no-tags {
    color: var(--dark-gray);
    font-style: italic;
    font-size: 14px;
}

/* Message styling */
.message {
    padding: 1rem;
    border-radius: var(--radius-small);
    margin: 1rem 0;
    font-size: 14px;
    line-height: 1.5;
}

.message.success {
    background: var(--positive-light);
    border: 1px solid var(--positive-tag);
    color: #1a5d1a;
}

.message.error {
    background: var(--negative-light);
    border: 1px solid var(--negative-tag);
    color: #8b1a1a;
}

.message.info {
    background: #ebf8ff;
    border: 1px solid #63b3ed;
    color: #1a4ba3;
    white-space: pre-line;
}

/* Database indicator */
.db-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--excellent);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: help;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.professor-card {
    position: relative;
}

/* Authentication Modal Styles */
.google-auth-btn,
.microsoft-auth-btn,
.email-auth-btn,
.telegram-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    width: 100%;
    margin-bottom: 12px;
    position: relative;
}

.google-auth-btn {
    background: var(--white);
    border: 2px solid var(--border-gray);
    color: var(--secondary-black);
}

.google-auth-btn:hover {
    border-color: var(--primary-black);
    box-shadow: var(--shadow-medium);
}

.google-auth-btn img {
    width: 20px;
    height: 20px;
}

.microsoft-auth-btn {
    background: var(--white);
    border: 2px solid var(--border-gray);
    color: var(--secondary-black);
}

.microsoft-auth-btn:hover {
    border-color: var(--primary-black);
    box-shadow: var(--shadow-medium);
}

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

.email-auth-btn {
    background: var(--medium-gray);
    color: var(--primary-black);
    border: 2px solid var(--border-gray);
}

.email-auth-btn:hover {
    background: var(--light-gray);
    border-color: var(--primary-black);
}

.telegram-auth-btn {
    background: #0088cc;
    color: var(--white);
    border: 2px solid #0088cc;
}

.telegram-auth-btn:hover {
    background: #006699;
    border-color: #006699;
}

.auth-welcome {
    text-align: center;
    margin-bottom: 32px;
}

.auth-welcome p {
    color: var(--dark-gray);
    font-size: 16px;
    line-height: 1.5;
}

.auth-options {
    margin-bottom: 24px;
}

.email-form {
    margin-bottom: 24px;
}

.email-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-small);
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

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

.continue-email-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-black);
    color: var(--white);
    border: none;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
}

.continue-email-btn:hover {
    background: var(--secondary-black);
}

.back-btn {
    background: transparent;
    color: var(--dark-gray);
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: var(--primary-black);
}

/* Email Auth Flow */
.email-auth-flow {
    padding: 20px 0;
}

.email-step {
    text-align: center;
}

.email-step h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-black);
}

.email-step p {
    color: var(--dark-gray);
    margin-bottom: 24px;
}

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

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-black);
    color: var(--white);
    border: none;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    background: var(--secondary-black);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--dark-gray);
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary-black);
    color: var(--primary-black);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Code Input Digits */
.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.code-digit {
    width: 60px;
    height: 60px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-small);
    transition: all 0.2s ease;
}

.code-digit:focus {
    outline: none;
    border-color: var(--primary-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.code-digit::-webkit-outer-spin-button,
.code-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: var(--radius-small);
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    border-top: 1px solid var(--border-gray);
    padding-top: 20px;
    margin-top: 24px;
}

.auth-terms {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.4;
}

.auth-terms a {
    color: var(--primary-black);
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* User Profile Dropdown Styles */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar-container {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.user-avatar:hover {
    opacity: 0.8;
}

/* User Menu Styles */
.user-menu {
    z-index: 10000000;
    position: relative;
    display: none;
    align-items: center;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    color: var(--primary-black);
    font-size: 14px;
    height: 100%;
}

.user-button:hover {
    background-color: var(--light-gray);
}

.user-button .user-avatar {
    width: 28px;
    height: 28px;
}

.user-button span:last-child {
    font-size: 12px;
    color: var(--dark-gray);
    transition: transform 0.2s ease;
}

.user-menu.open .user-button span:last-child {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    min-width: 280px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show user dropdown on hover or when pinned */
.user-menu:hover .user-dropdown,
.user-menu.hover-active .user-dropdown,
.user-menu.pinned .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-gray);
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.dropdown-user-info {
    flex: 1;
}

.dropdown-name {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 2px;
}

.dropdown-email {
    font-size: 13px;
    color: var(--dark-gray);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-gray);
    margin: 8px 0;
}

.dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--secondary-black);
    text-decoration: none;
    transition: background-color 0.2s ease;
    position: relative;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-black);
}

/* Theme toggle button in dropdown */
.dropdown-theme-toggle {
    border-top: 1px solid var(--border-gray);
    margin-top: 8px;
    padding-top: 12px;
}

.dropdown-theme-toggle .theme-icon {
    font-size: 18px;
}

.dropdown-theme-toggle .theme-label {
    font-weight: 500;
}

/* Light mode: BLACK button for dropdown */
.dropdown-theme-toggle {
    background-color: #000000;
    color: #ffffff;
    border-radius: 8px;
}

.dropdown-theme-toggle:hover {
    background-color: #333333;
}

.dropdown-theme-toggle .theme-icon,
.dropdown-theme-toggle .theme-label {
    color: #ffffff;
}

/* Light mode: Mobile theme toggle - #1a1a1a text */
.mobile-theme-toggle {
    background-color: transparent;
    color: #1a1a1a;
    border-radius: 8px;
}

.mobile-theme-toggle:hover {
    background-color: rgba(26, 26, 26, 0.1);
}

.mobile-theme-toggle .theme-icon,
.mobile-theme-toggle .theme-label {
    color: #1a1a1a;
}

/* Desktop theme toggle button in navbar */
.desktop-theme-toggle {
    background-color: #000000;
    color: #ffffff;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.desktop-theme-toggle:hover {
    background-color: #333333;
    transform: scale(1.05);
}

.desktop-theme-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.desktop-theme-toggle .theme-icon {
    font-size: 20px;
    color: #ffffff;
}

/* Hide mobile-tablet-theme-toggle on desktop */
@media (min-width: 1025px) {
    .mobile-tablet-theme-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .desktop-theme-toggle {
        display: none !important;
    }
}

/* ========== More Dropdown Menu Styles ========== */

/* Desktop More Dropdown Container */
.more-dropdown-container {
    position: relative;
    display: inline-block;
}

/* More Dropdown Trigger Button */
.more-dropdown-trigger {
    background: none;
    border: none;
    color: var(--secondary-black);
    font-weight: 400;
    padding: 10px 16px;
    border-radius: var(--radius-small);
    transition: background-color 0.2s ease;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.more-dropdown-trigger:hover {
    background-color: var(--light-gray);
}

/* Desktop More Dropdown Menu */
.more-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999999;
    padding: 8px;
}

/* Show dropdown on hover */
.more-dropdown-container:hover .more-dropdown-menu,
.more-dropdown-container.hover-active .more-dropdown-menu,
.more-dropdown-container.pinned .more-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* More Dropdown Item */
.more-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--secondary-black);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
    font-size: 14px;
    font-weight: 400;
}

.more-dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-black);
}

/* Mobile More Dropdown */
.mobile-more-dropdown {
    display: block;
}

.mobile-more-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-gray);
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-more-trigger:hover {
    background-color: var(--light-gray);
}

.mobile-more-menu {
    background-color: var(--light-gray);
    border-left: 3px solid var(--primary-black);
    animation: slideDown 0.3s ease;
}

.mobile-submenu-item {
    padding-left: 40px;
    font-size: 14px;
    border-bottom: 1px solid var(--medium-gray);
}

.mobile-submenu-item:hover {
    background-color: var(--medium-gray);
}

/* Hide desktop dropdown on mobile */
@media (max-width: 1024px) {
    .more-dropdown-container {
        display: none;
    }
}

/* Hide mobile dropdown on desktop */
@media (min-width: 1025px) {
    .mobile-more-dropdown {
        display: none;
    }
}


.dropdown-icon {
    font-size: 16px;
    width: 24px;
    display: inline-block;
    text-align: center;
    margin-right: 8px;
}

.notification-badge {
    position: absolute;
    right: 16px;
    background: #ff4444;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background-color: #fee;
    color: #dc3545;
}

/* Toast notification styles */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    pointer-events: all;
    border-left: 4px solid #4caf50;
}

.toast.success {
    border-left-color: #4caf50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.info {
    border-left-color: #2196f3;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 4px;
    font-size: 14px;
}

.toast-message {
    color: var(--dark-gray);
    font-size: 13px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-gray);
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

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

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        top: 70px;
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }
}

/* Notifications Modal Styles */
.notifications-modal-content {
    max-width: 600px;
    max-height: 70vh;
}

.notifications-container {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-gray);
    transition: background-color 0.2s ease;
}

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

.notification-item.unread {
    background-color: var(--light-gray);
    border-left: 4px solid var(--primary-black);
}

.notification-item.clickable {
    cursor: pointer;
}

.notification-item:hover {
    background-color: var(--medium-gray);
}

.notification-icon {
    font-size: 20px;
    min-width: 20px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-message {
    color: var(--dark-gray);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 12px;
    color: var(--dark-gray);
}

.notification-actions {
    display: flex;
    gap: 4px;
}

.mark-read-btn,
.delete-notification-btn {
    background: transparent;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.mark-read-btn {
    color: #28a745;
    border-color: #28a745;
}

.mark-read-btn:hover {
    background: #28a745;
    color: var(--white);
}

.delete-notification-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.delete-notification-btn:hover {
    background: #dc3545;
    color: var(--white);
}

.empty-notifications {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-notifications h3 {
    color: var(--primary-black);
    margin-bottom: 8px;
}

.empty-notifications p {
    color: var(--dark-gray);
    font-size: 14px;
}

.notifications-actions {
    padding: 16px;
    border-top: 1px solid var(--border-gray);
    text-align: center;
}

@media (max-width: 480px) {

    /* Even smaller logo for very small screens */
    .logo h1 {
        font-size: 16px;
    }

    .logo-image {
        height: 22px;
        max-width: 90px;
    }

    /* Bigger and more prominent button for small screens */
    .nav-link {
        padding: 14px 24px;
        font-size: 17px;
        font-weight: 600;
        min-height: 48px;
        width: 100%;
        margin-top: 4px;
    }

    .hero-title {
        font-size: 20px;
    }

    /* Reduce professor card title sizes on mobile */
    .professor-info h3 {
        font-size: 14px;
    }

    .top-professors h2 {
        font-size: 18px;
    }

    .section-subtitle {
        font-size: 12px;
    }

    .professor-list h2 {
        font-size: 16px;
    }

    .feature-card h3 {
        font-size: 14px;
    }

    .popular-universities h3 {
        font-size: 12px;
    }

    /* PROFESSOR PAGE SPECIFIC MOBILE FIXES */

    /* Make those specific huge titles medium size */
    .professor-tags-section h3,
    .rating-distribution h3,
    .similar-professors h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }

    .reviews-header h3 {
        font-size: 1rem !important;
    }

    /* Rating bars mobile optimization */
    .rating-row {
        flex-direction: column;
        gap: 0.3rem;
        align-items: stretch;
    }

    .bar-container {
        width: 100%;
        height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
        overflow: hidden;
    }

    .rating-bar {
        height: 100%;
        border-radius: 2px;
    }

    .rating-label {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }

    .star-label {
        font-size: 0.7rem;
    }

    .professor-card {
        padding: 16px;
    }

    .feature-card {
        padding: 24px 16px;
    }

    .vote-btn {
        padding: 6px 12px;
        font-size: 13px;
        margin-right: 4px;
    }

    .review-rating-value {
        padding: 1px 4px;
        font-size: 13px;
    }

    /* Mobile auth modal adjustments */
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .google-auth-btn,
    .microsoft-auth-btn,
    .email-auth-btn,
    .telegram-auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .user-dropdown {
        right: -8px;
        min-width: 260px;
    }

    .notifications-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 80vh;
    }

    .notification-item {
        padding: 12px;
        gap: 10px;
    }
}

/* Star Rating Styles */
.star {
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 2px;
}

.star.full {
    color: #f6ad55;
}

.star.half {
    color: #f6ad55;
    position: relative;
}

.star.half::after {
    content: '★';
    position: absolute;
    left: 50%;
    color: #e2e8f0;
    z-index: -1;
}

.star.empty {
    color: #e2e8f0;
}

.stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 8px;
}

/* Telegram Button Styles */
.telegram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.telegram-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transform: translateY(-1px);
}

.telegram-icon {
    width: 28px;
    height: 28px;
    filter: brightness(0);
    opacity: 0.8;
}

.telegram-btn:hover .telegram-icon {
    opacity: 1;
}

/* Desktop Telegram Button */
.desktop-telegram {
    margin-left: 16px;
}

/* Mobile Telegram Button */
.mobile-telegram {
    margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .desktop-telegram {
        display: none;
    }

    .mobile-telegram {
        display: inline-flex;
    }
}

@media (min-width: 769px) {
    .mobile-telegram {
        display: none;
    }

    .desktop-telegram {
        display: inline-flex;
    }
}

/* Disabled Authentication Buttons */
.disabled-auth-btn {
    opacity: 0.6;
    cursor: not-allowed !important;
    position: relative;
}

.disabled-auth-btn:hover {
    background-color: inherit !important;
    border-color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
}

.disabled-auth-btn small {
    font-style: italic;
    font-weight: 400;
}

.email-auth-btn.disabled-auth-btn {
    background: var(--light-gray);
    border-color: var(--border-gray);
}

.telegram-auth-btn.disabled-auth-btn {
    background: #cccccc;
    border-color: #cccccc;
}

/* Peek-out Club Card */
.peek-out-club-card {
    position: fixed;
    top: 100px;
    right: -240px;
    width: 320px;
    background: var(--white);
    border-radius: 24px 0 0 24px;
    box-shadow: -4px 4px 20px rgba(32, 33, 36, 0.25);
    z-index: 1;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-gray);
    border-right: none;
    overflow: hidden;
    display: none;
    /* Hidden by default, controlled by admin panel */
}

.peek-out-club-card.active {
    display: block;
}

.peek-out-club-card:hover {
    right: 0;
    box-shadow: -8px 4px 30px rgba(32, 33, 36, 0.3);
}

.peek-card-link {
    text-decoration: none;
    color: var(--primary-black);
    display: block;
}

.peek-card-inner {
    padding: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.peek-club-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-gray);
    flex-shrink: 0;
}

.peek-club-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.peek-club-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.peek-club-desc {
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.peek-club-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.peek-instagram {
    font-size: 11px;
    color: var(--secondary-black);
    background: var(--light-gray);
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Mobile: hide on small screens */
@media (max-width: 768px) {
    .peek-out-club-card {
        display: none;
    }
}


/* Notification Popup Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Skeleton Loading Styles */
.skeleton-loading {
    pointer-events: none;
    cursor: default !important;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

    100% {
        background-position: -200% 0;
    }
}

.skeleton-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.skeleton-name {
    width: 80%;
    height: 24px;
    margin-bottom: 8px;
}

.skeleton-dept {
    width: 90%;
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-rating {
    width: 60%;
    height: 20px;
}

.top-professor-card.skeleton-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Recent Votes Carousel Section */
.recent-votes-section {
    padding: 60px 0;
    background: #f8f9fa;
    overflow: hidden;
}

.recent-votes-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
}

.recent-votes-section .section-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.recent-votes-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.recent-votes-carousel {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
    will-change: transform;
}

.recent-vote-card,
.recent-review-card {
    flex: 0 0 380px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 200px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

@media (max-width: 768px) {
    .recent-votes-carousel-wrapper {
        padding: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .recent-votes-carousel {
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        justify-content: center;
    }

    .recent-vote-card,
    .recent-review-card {
        flex: 0 0 calc(100vw - 60px);
        max-width: 320px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
}

.recent-vote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.recent-vote-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.recent-vote-prof-info h3 {
    font-size: 1.25rem;
    margin: 0 0 4px 0;
    color: var(--primary-black);
}

.recent-vote-prof-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.recent-vote-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.recent-vote-stars {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 4px;
}

.recent-vote-average {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-black);
}

.recent-vote-time {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.recent-vote-time::before {
    content: "🕐";
}

@media (max-width: 768px) {
    .recent-vote-card {
        flex: 0 0 280px;
    }

    .recent-votes-section h2 {
        font-size: 2rem;
    }
}

/* Dark theme for recent votes */
[data-theme="dark"] .recent-votes-section {
    background: #1a1a1a;
}

[data-theme="dark"] .recent-vote-card,
[data-theme="dark"] .recent-review-card {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .recent-vote-card:hover,
[data-theme="dark"] .recent-review-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .recent-vote-prof-info h3,
[data-theme="dark"] .professor-name {
    color: #ffffff;
}

[data-theme="dark"] .recent-vote-average,
[data-theme="dark"] .professor-dept {
    color: #cccccc;
}

[data-theme="dark"] .review-preview {
    background: #1a1a1a;
    color: #cccccc;
    border-left: 3px solid #444;
}

[data-theme="dark"] .review-count-text {
    color: #999;
}

[data-theme="dark"] .rating-display {
    background: #2a2a2a !important;
}

/* Instagram Button Styles */
.instagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.instagram-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transform: translateY(-1px);
}

.instagram-icon {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    object-fit: contain;
}

.instagram-btn:hover .instagram-icon {
    opacity: 1;
}

/* Desktop Instagram Button */
.desktop-instagram {
    display: inline-flex;
}

/* Mobile Instagram Button */
.mobile-instagram {
    display: none;
}

/* Footer Social Links */
.footer-social {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
}

/* Dark mode adjustments */
[data-theme="dark"] .instagram-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-link {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .social-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .desktop-instagram {
        display: none;
    }

    .mobile-instagram {
        display: inline-flex;
    }
}

/* Dark mode - invert Instagram icon to white */
[data-theme="dark"] .instagram-icon,
[data-theme="dark"] .social-icon {
    filter: invert(1);
}