/* Professor Page Specific Styles */

/* Professor Claim Section */
.professor-claim-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.professor-claim-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    text-align: right;
}

.professor-claim-text a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.professor-claim-text a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header {
    padding: 2rem 2rem 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: #6b7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #374151;
}

.modal-body {
    padding: 0 2rem 2rem 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.required {
    color: #dc2626;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message h3 {
    color: #059669;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.success-message p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 640px) {
    .modal-content {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }

    .modal-header,
    .modal-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .professor-claim-text {
        font-size: 0.8rem;
    }
}

/* Similar Professors Styling */
.similar-professors {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.similar-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.similar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: #1a73e8;
}

.similar-professor-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.professor-rating-section {
    min-width: 80px;
    text-align: center;
}

.rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e8eaed;
}

.rating-display.rating-excellent {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    color: white;
    border-color: #4caf50;
}

.rating-display.rating-good {
    background: linear-gradient(135deg, #8bc34a, #cddc39);
    color: white;
    border-color: #8bc34a;
}

.rating-display.rating-average {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    border-color: #ffc107;
}

.rating-display.rating-poor {
    background: linear-gradient(135deg, #ff9800, #f44336);
    color: white;
    border-color: #ff9800;
}

.rating-display.rating-very-poor {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-color: #f44336;
}

.rating-number {
    font-size: 1.8rem;
    font-weight: 700;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.star {
    font-size: 0.9rem;
}

.star.full {
    color: #ffd700;
}

.star.half {
    color: #ffd700;
    opacity: 0.6;
}

.star.empty {
    color: rgba(255, 255, 255, 0.4);
}

.professor-info-section {
    flex: 1;
}

.professor-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.professor-department {
    font-size: 1rem;
    color: #5f6368;
    margin-bottom: 0.75rem;
}

.professor-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-count {
    font-size: 0.9rem;
    color: #34a853;
    font-weight: 500;
}

.same-department-badge {
    background: #e8f5e8;
    color: #137333;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Icon Styling */
.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #34c759, #30d158);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    margin-left: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(52, 199, 89, 0.3);
}

.contact-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(52, 199, 89, 0.4);
}

.contact-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #202124;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.contact-icon::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top: 5px solid #202124;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.contact-icon:hover::after,
.contact-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

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

    .similar-professor-card {
        flex-direction: column;
        text-align: center;
    }

    .professor-rating-section {
        min-width: auto;
    }

    .professor-stats {
        justify-content: center;
    }
}

.professor-main {
    background: #f8f9fa;
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

.professor-header {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.professor-info {
    flex: 1;
}

.professor-name {
    font-size: 2.5rem;
    color: #202124;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.professor-title {
    font-size: 1.2rem;
    color: #5f6368;
    margin-bottom: 2rem;
}

.main-rating {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: transparent;
}

.rating-score {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    background: transparent;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #202124;
    background: transparent;
}

.rating-max {
    font-size: 1.5rem;
    color: #5f6368;
}

.rating-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rating-label {
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.rating-count {
    color: #5f6368;
    margin: 0;
    font-size: 0.9rem;
}

.professor-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1a73e8;
}

/* Dynamic stat-item colors based on rating class */
.stat-item.rating-excellent {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%) !important;
    border-left-color: #4caf50 !important;
}

.stat-item.rating-good {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.1) 0%, rgba(139, 195, 74, 0.05) 100%) !important;
    border-left-color: #8bc34a !important;
}

.stat-item.rating-average {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%) !important;
    border-left-color: #ff9800 !important;
}

.stat-item.rating-poor {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(244, 67, 54, 0.05) 100%) !important;
    border-left-color: #f44336 !important;
}

.stat-item.rating-very-poor {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1) 0%, rgba(211, 47, 47, 0.05) 100%) !important;
    border-left-color: #d32f2f !important;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a73e8;
}

.stat-label {
    font-size: 0.9rem;
    color: #5f6368;
    margin-top: 0.25rem;
}

.professor-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-rate {
    padding: 12px 32px;
    background: #202124;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
}

.btn-rate:hover {
    background: #000000;
}

.btn-compare {
    padding: 12px 32px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    background: white;
    color: #3c4043;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
}

.btn-compare:hover {
    border-color: #9aa0a6;
    background: #f8f9fa;
}

/* Professor Tags Section */
.professor-tags-section {
    background: white;
    border-radius: 24px;
    padding: 5rem;
    margin-bottom: 5rem;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.12);
}

.professor-tags-section h3 {
    font-size: 2rem;
    color: #202124;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

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

.professor-tag {
    padding: 12px 24px;
    background: #e8f0fe;
    color: #1a73e8;
    border: 2px solid #e8f0fe;
    border-radius: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.professor-tag.popular {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

/* Rating Distribution - More compact on desktop */
.rating-distribution {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.rating-distribution h3 {
    font-size: 1.25rem;
    color: #202124;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-row {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
}

/* Hide rating text labels on desktop in distribution chart - keep only stars */
.rating-distribution .rating-row .rating-label {
    display: none !important;
}

.star-label {
    color: #fbbc04;
    font-weight: 600;
    display: flex;
    gap: 2px;
    justify-content: flex-start;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    background: transparent !important;
    margin-top: 0.5rem;
}

.star {
    font-size: 0.95rem;
    line-height: 1;
    background: transparent !important;
}

.star.full {
    color: #fbbc04;
}

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

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

.star.empty {
    color: #e2e8f0;
}

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

.bar {
    height: 100%;
    background: #1a73e8;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.count {
    color: #5f6368;
    font-weight: 500;
    text-align: right;
}

/* Similar Professors */
.similar-professors {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.similar-professors h3 {
    font-size: 2rem;
    color: #202124;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.similar-professor-card {
    padding: 1.5rem;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.similar-professor-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.1);
}

.similar-professor-name {
    font-weight: 600;
    color: #202124;
    margin-bottom: 0.5rem;
}

.similar-professor-department {
    color: #5f6368;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.similar-professor-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.similar-rating-box {
    background: linear-gradient(135deg, #1a73e8 0%, #0f4c81 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.similar-stars {
    display: flex;
    gap: 2px;
}

.similar-star {
    color: #fbbc04;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.similar-star.empty {
    color: #e8eaed;
}

/* Reviews Section */
.reviews-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.reviews-header h3 {
    font-size: 1.8rem;
    color: #202124;
    margin: 0;
    font-weight: 700;
}

.reviews-filters {
    display: flex;
    gap: 1rem;
}

.reviews-filters select {
    padding: 8px 12px;
    border: 2px solid #dadce0;
    border-radius: 6px;
    background: white;
    color: #3c4043;
    cursor: pointer;
}

.reviews-filters select:focus {
    outline: none;
    border-color: #1a73e8;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    padding: 1.5rem;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

.review-card:hover {
    border-color: #dadce0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1a73e8;
}

.review-meta {
    text-align: right;
    color: #5f6368;
    font-size: 0.85rem;
}

.review-course {
    font-weight: 500;
    color: #202124;
    margin-bottom: 0.25rem;
}

.review-date {
    color: #5f6368;
}

.review-content {
    line-height: 1.6;
    color: #3c4043;
    margin-bottom: 1rem;
}

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

.review-tag {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #5f6368;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    border: 1px solid #e8eaed;
}

.review-grade {
    display: inline-block;
    padding: 4px 8px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #5f6368;
}

.no-data h4 {
    margin-bottom: 0.5rem;
    color: #202124;
}

/* Review Item Styling (Enhanced) */
.review-item {
    padding: 2rem;
    border: 2px solid #f1f3f4;
    border-radius: 16px;
    background: white;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.review-item:hover {
    border-color: #dadce0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.review-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.review-ratings {
    display: flex;
    gap: 2rem;
}

.review-rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
}

.review-rating-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 60px;
    color: white !important;
    background: linear-gradient(135deg, #1a73e8 0%, #0f4c81 100%);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

/* Dynamic rating colors based on value */
.review-rating-value.rating-excellent {
    background: #4caf50 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

.review-rating-value.rating-good {
    background: #8bc34a !important;
    box-shadow: 0 2px 8px rgba(139, 195, 74, 0.3) !important;
}

.review-rating-value.rating-average {
    background: #ff9800 !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3) !important;
}

.review-rating-value.rating-poor {
    background: #f44336 !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3) !important;
}

.review-rating-value.rating-very-poor {
    background: #d32f2f !important;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3) !important;
}

/* Legacy support for static classes */
.review-rating-value.quality-rating {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.review-rating-value.difficulty-rating {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}


/* Stat value styling with colored backgrounds and white text */
.stat-item.rating-excellent .stat-value {
    background: #4caf50 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.stat-item.rating-good .stat-value {
    background: #8bc34a !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.stat-item.rating-average .stat-value {
    background: #ff9800 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.stat-item.rating-poor .stat-value {
    background: #f44336 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

.stat-item.rating-very-poor .stat-value {
    background: #d32f2f !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}


.review-rating-label {
    font-size: 0.9rem;
    color: #5f6368;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-info {
    text-align: right;
    flex-grow: 1;
}

.review-course {
    font-size: 1.3rem;
    font-weight: 700;
    color: #202124;
    margin-bottom: 0.5rem;
}

.review-date {
    font-size: 1.1rem;
    color: #5f6368;
    margin-bottom: 1rem;
}

.online-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.review-metadata {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    color: #5f6368;
    flex-wrap: wrap;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #3c4043;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #6b7280;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

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

.vote-buttons {
    display: flex;
    gap: 2rem;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.report-btn {
    background: #dc2626;
    color: white;
    border: 2px solid #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.flag-icon {
    font-size: 1rem;
}

.vote-btn:hover:not(:disabled) {
    border-color: #1a73e8;
    background: #f8f9fa;
}

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

.vote-btn.voted {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #5f6368;
}

.vote-status,
.vote-help {
    font-weight: 500;
}

.admin-delete-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.admin-delete-btn:hover {
    background: #b91c1c;
}

/* Rating color classes - DO NOT apply background to .rating-display itself */
.rating-number.rating-excellent,
.rating-excellent .rating-number:not(.rating-display .rating-number),
.stat-value.rating-excellent {
    color: white !important;
    background-color: #4caf50 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.rating-number.rating-good,
.rating-good .rating-number:not(.rating-display .rating-number),
.stat-value.rating-good {
    color: white !important;
    background-color: #8bc34a !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.rating-number.rating-average,
.rating-average .rating-number:not(.rating-display .rating-number),
.stat-value.rating-average {
    color: white !important;
    background-color: #ff9800 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.rating-number.rating-poor,
.rating-poor .rating-number:not(.rating-display .rating-number),
.stat-value.rating-poor {
    color: white !important;
    background-color: #f44336 !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.rating-number.rating-very-poor,
.rating-very-poor .rating-number:not(.rating-display .rating-number),
.stat-value.rating-very-poor {
    color: white !important;
    background-color: #d32f2f !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .professor-main {
        padding: 1rem 0;
    }

    .professor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .professor-name {
        font-size: 2rem;
    }

    .main-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .professor-stats {
        gap: 1rem;
    }

    .professor-actions {
        flex-direction: row;
    }

    .rating-row {
        grid-template-columns: 50px 25px 1fr 40px;
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .similar-grid {
        grid-template-columns: 1fr;
    }

    .reviews-header {
        flex-direction: column;
        align-items: stretch;
    }

    .reviews-filters {
        flex-direction: column;
    }

    .review-header-info {
        flex-direction: column;
        gap: 1rem;
    }

    .review-info {
        text-align: left;
    }

    .review-metadata {
        gap: 1rem;
    }

    .review-ratings {
        gap: 1rem;
    }

    .vote-buttons {
        gap: 0.5rem;
    }

    .review-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .professor-tags-section,
    .rating-distribution,
    .similar-professors,
    .reviews-section {
        margin: 0 1rem 1.5rem;
        border-radius: 12px;
        padding: 1.5rem;
    }

    /* Fix those huge titles on mobile! */
    .professor-tags-section h3,
    .rating-distribution h3,
    .similar-professors h3 {
        font-size: 1.1rem !important;
    }

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

    /* Fix rating grid for mobile - stars, bar and count */
    .rating-row {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
        text-align: left;
        align-items: center;
    }

    .rating-label {
        display: none;
        /* Hide text label on mobile, stars are enough */
    }

    .star-label {
        font-size: 1.1rem;
        white-space: nowrap;
        min-width: 80px;
    }

    .count {
        font-weight: 600;
        min-width: 35px;
        text-align: right;
    }

    /* Make review cards more compact on mobile */
    .review-card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .review-header {
        margin-bottom: 0.75rem !important;
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .review-meta {
        text-align: left !important;
        font-size: 0.75rem !important;
    }

    .review-content {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.75rem !important;
    }

    .review-ratings {
        gap: 1rem !important;
    }

    /* Make comment rating boxes smaller and more compact */
    .review-rating-value {
        font-size: 1rem !important;
        padding: 0.5rem 0.75rem !important;
        min-width: 45px !important;
        margin-bottom: 0.25rem !important;
    }

    .review-rating-label {
        font-size: 0.7rem !important;
    }

    .review-rating-item {
        min-width: 60px !important;
    }

    .review-tag {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .professor-actions {
        flex-direction: column;
    }

    .btn-rate,
    .btn-compare {
        width: 100%;
        text-align: center;
    }

    .professor-stats {
        justify-content: space-around;
    }

    .rating-number {
        font-size: 2.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Even smaller titles for very small screens */
    .professor-tags-section h3,
    .rating-distribution h3,
    .similar-professors h3 {
        font-size: 1rem !important;
    }

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

    /* Adjust star size for very small screens */
    .star-label {
        font-size: 1rem;
        min-width: 70px;
    }

    /* Make review cards even more compact for very small screens */
    .review-card {
        padding: 1rem !important;
        margin: 0 -4px !important;
    }

    .review-content {
        font-size: 0.85rem !important;
    }

    /* Comment rating boxes - even smaller for very small screens */
    .review-rating-value {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.6rem !important;
        min-width: 40px !important;
    }

    .review-rating-label {
        font-size: 0.65rem !important;
    }

    .review-rating-item {
        min-width: 50px !important;
    }

    .review-ratings {
        gap: 0.75rem !important;
    }
}

/* ==================== REPLY SYSTEM ==================== */

.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 6px;
    color: #5f6368;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-btn:hover {
    background: #e8eaed;
    border-color: #c1c4c7;
}

.replies-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #1a1a1a;
}

.replies-list {
    margin-bottom: 1rem;
}

.no-replies {
    text-align: center;
    padding: 1rem;
    color: #80868b;
    font-size: 0.9rem;
    font-style: italic;
}

.reply-item {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border: 1px solid #e8eaed;
}

.reply-item.professor-reply {
    background: #e8f5e9;
    border-left: 3px solid #34a853;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.reply-author {
    font-weight: 600;
    color: #202124;
    font-size: 0.9rem;
}

.professor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #34a853;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.reply-date {
    color: #80868b;
    font-size: 0.8rem;
    margin-left: auto;
}

.admin-delete-reply-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-delete-reply-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.reply-text {
    color: #3c4043;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Nested Reply Styles */
.reply-item.nested-reply {
    background: #f8f9fa;
    border-left: 3px solid #dadce0;
}

.reply-indicator {
    color: #5f6368;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    background: #e8eaed;
    border-radius: 12px;
}

.reply-actions {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reply-vote-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.reply-vote-btn {
    background: #f8f9fa;
    border: 1px solid #dadce0;
    color: #5f6368;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reply-vote-btn:hover {
    background: #e8eaed;
    transform: scale(1.05);
}

.reply-vote-btn.voted,
.reply-vote-helpful.voted {
    background: #e8f5e9;
    border-color: #34a853;
    color: #1e7e34;
}

.reply-vote-not-helpful.voted {
    background: #fce8e6;
    border-color: #ea4335;
    color: #d93025;
}

.reply-to-comment-btn {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reply-to-comment-btn:hover {
    background: #e8f0fe;
}

/* Nested reply styling */
.nested-reply {
    margin-top: 0.5rem;
    border-radius: 6px;
    background: #fafafa;
}

.nested-reply .reply-text {
    font-size: 0.85rem;
}

/* Reply Context Indicator */
.reply-context {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #e8f0fe;
    border: 1px solid #1a73e8;
    border-radius: 6px 6px 0 0;
    margin-bottom: -1px;
    font-size: 0.85rem;
    color: #1967d2;
}

.reply-context strong {
    font-weight: 600;
}

.cancel-reply-btn {
    background: none;
    border: none;
    color: #5f6368;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cancel-reply-btn:hover {
    background: #dadce0;
    color: #202124;
}

.reply-form {
    margin-top: 1rem;
}

.reply-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

.reply-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.anonymity-toggle-container {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.anonymity-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.anonymity-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #202124;
}

.anonymity-explanation {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #5f6368;
    margin-left: 26px;
}

.deyerver-staff-badge,
.stuconnect-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.deyerver-staff-badge {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: white;
}

.stuconnect-badge {
    background: linear-gradient(135deg, #34a853, #2d8e47);
    color: white;
}

.reply-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.char-count {
    color: #80868b;
    font-size: 0.8rem;
}

.btn-cancel,
.btn-submit-reply {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #f1f3f4;
    color: #5f6368;
}

.btn-cancel:hover {
    background: #e8eaed;
}

.btn-submit-reply {
    background: #1a73e8;
    color: white;
}

.btn-submit-reply:hover {
    background: #1557b0;
}

@media (max-width: 768px) {
    .reply-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        gap: 0.15rem;
    }

    .replies-section {
        padding: 0.75rem;
    }

    .reply-form-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .char-count {
        width: 100%;
        order: -1;
        margin-bottom: 0.5rem;
        text-align: center;
    }
}

/* Mobile Reply Styles - Make replies MUCH wider and more readable */
@media (max-width: 768px) {
    .replies-section {
        margin-top: 0.75rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0.75rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .reply-item {
        padding: 0.65rem !important;
        margin-bottom: 0.65rem;
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 6px;
    }

    .reply-text {
        font-size: 0.95rem !important;
        line-height: 1.7;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .reply-header {
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 0.6rem;
    }

    .reply-author {
        font-size: 0.85rem;
    }

    .reply-date {
        font-size: 0.75rem;
    }

    .reply-form {
        width: 100%;
        box-sizing: border-box;
    }

    .reply-form textarea {
        width: 100% !important;
        box-sizing: border-box;
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .replies-section {
        padding: 0.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 6px;
    }

    .reply-item {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem;
    }

    .reply-text {
        font-size: 1rem !important;
        line-height: 1.7;
        padding-right: 0 !important;
    }

    .reply-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .reply-to-comment-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .reply-form textarea {
        font-size: 1rem;
        padding: 0.65rem;
        min-height: 80px;
    }

    .reply-submit-btn {
        width: 100%;
        padding: 0.75rem;
    }
}

/* CRITICAL MOBILE FIX - Review Items */
@media (max-width: 768px) {

    /* Expand reviews list beyond container */
    .reviews-list {
        margin: 0 -12px !important;
        width: calc(100% + 24px) !important;
    }

    .review-item {
        padding: 0.75rem !important;
        margin: 0 0 0.75rem 0 !important;
        border-radius: 6px !important;
    }

    .review-text {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
        line-height: 1.5;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .review-metadata {
        padding: 0.5rem !important;
        gap: 0.5rem;
        font-size: 0.85rem !important;
    }

    .review-header-info {
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .review-course {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .review-date {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    .review-tags {
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 480px) {
    .reviews-list {
        margin: 0 -12px !important;
        width: calc(100% + 24px) !important;
    }

    .review-item {
        padding: 0.65rem !important;
        margin: 0 0 0.65rem 0 !important;
        border-radius: 4px !important;
    }

    .review-text {
        font-size: 0.85rem !important;
        padding: 0.4rem !important;
        line-height: 1.5;
        word-wrap: break-word !important;
        word-break: break-word !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .review-metadata {
        padding: 0.4rem !important;
        font-size: 0.8rem !important;
    }

    .review-header-info {
        margin-bottom: 0.5rem;
    }

    .review-course {
        font-size: 1rem !important;
        margin-bottom: 0.2rem !important;
    }

    .review-date {
        font-size: 0.85rem !important;
        margin-bottom: 0.4rem !important;
    }

    .review-tags {
        gap: 0.4rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* Admin Comment Styles */
.review-item.admin-comment {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border-left: 4px solid #f59e0b;
    position: relative;
}

[data-theme="dark"] .review-item.admin-comment {
    background: linear-gradient(135deg, #2d2416 0%, #3a2d1a 100%);
    border-left: 4px solid #fbbf24;
}

.admin-comment-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .admin-comment-badge {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
}

.admin-badge-icon {
    font-size: 24px;
    background: #f59e0b;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .admin-badge-icon {
    background: #fbbf24;
    color: #1a1a2e;
}

.admin-badge-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-badge-text strong {
    color: #b45309;
    font-size: 15px;
}

[data-theme="dark"] .admin-badge-text strong {
    color: #fbbf24;
}

.admin-badge-text span {
    color: #78716c;
    font-size: 13px;
}

[data-theme="dark"] .admin-badge-text span {
    color: #a8a29e;
}

.admin-comment-placeholder {
    min-height: 60px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .admin-comment-badge {
        padding: 10px 12px;
        gap: 10px;
    }

    .admin-badge-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .admin-badge-text strong {
        font-size: 14px;
    }

    .admin-badge-text span {
        font-size: 12px;
    }
}

/* Compact Similar Professors Styling */
.similar-professors .top-professor-card {
    padding: 24px;
    min-height: auto;
}

.similar-professors .professor-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
}

.similar-professors .professor-dept {
    font-size: 13px;
    margin-bottom: 10px;
}

.similar-professors .professor-stats {
    gap: 4px;
    margin-bottom: 12px;
}

.similar-professors .rating-display {
    flex-direction: row;
    gap: 10px;
    background: none !important;
    justify-content: flex-start;
}

.similar-professors .rating-number {
    font-size: 15px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    order: 2;
}

.similar-professors .stars {
    font-size: 14px;
    color: #202124 !important;
    background: none !important;
    order: 1;
}

.similar-professors .review-count-text {
    font-size: 12px;
    margin-top: 0;
}

.similar-professors .professor-tags {
    gap: 8px;
}

.similar-professors .top-tag {
    font-size: 11px;
    padding: 4px 8px;
}

/* Mobile adjustments for similar professors */
@media (max-width: 768px) {
    .similar-professors {
        padding: 1.5rem 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .similar-professors .top-professors-grid {
        gap: 16px;
        padding: 0;
    }

    .similar-professors .top-professor-card {
        padding: 16px;
    }

    .similar-professors .professor-name {
        font-size: 14px;
    }

    .similar-professors .professor-dept {
        font-size: 12px;
    }

    .similar-professors .rating-number {
        font-size: 13px;
        padding: 3px 8px;
    }

    .similar-professors .stars {
        font-size: 12px;
    }

    .similar-professors .review-count-text {
        font-size: 11px;
    }

    .similar-professors .top-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
}