@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --danger-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.nav-brand h1 {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

#user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    color: white;
    border-radius: 8px;
    margin: 2rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.search-box button {
    padding: 0.75rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #3fa861;
}

/* Platform Statistics */
.platform-stats {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 150px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.university-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.university-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.university-stat-badge.clickable {
    cursor: pointer;
}

.university-stat-badge.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #e8f4fc;
}

.university-stat-badge.clickable:active {
    transform: translateY(0);
}

.university-stat-badge .uni-name {
    color: var(--text-color);
    font-weight: 500;
}

.university-stat-badge .uni-count {
    background: var(--primary-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Home Content Grid */
.home-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 992px) {
    .home-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Activity Feed */
.activity-feed {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.activity-header h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0;
}

#refresh-activity-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

#refresh-activity-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
}

#refresh-activity-btn.spinning {
    animation: spin 1s linear infinite;
}

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

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: #e8f4fc;
    transform: translateX(4px);
}

.activity-item.new-activity {
    animation: slideIn 0.3s ease;
    background: #e8f4fc;
}

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

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.activity-text {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.activity-text strong {
    color: var(--primary-color);
}

.activity-course {
    font-weight: 500;
    color: var(--text-color);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.activity-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.activity-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Courses Grid */
.featured-courses {
    margin: 0;
}

.featured-courses h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

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

.course-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.course-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.course-code {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.course-department {
    color: var(--text-color);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.course-university {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.rating {
    color: #f39c12;
    font-weight: bold;
}

.review-count,
.discussion-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Course Detail */
.course-detail-header {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.course-detail-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.course-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.course-info {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.course-info-item {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.course-info-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.course-info-item strong {
    display: inline-block;
    min-width: 140px;
}

.course-info-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.course-info-item a:hover {
    text-decoration: underline;
}

.course-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Reviews */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.review-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-item.permalink-highlight {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
}

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

.review-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.review-title.clickable {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-title.clickable:hover {
    color: var(--primary-color);
}

.expand-icon {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.expand-icon.rotated {
    transform: rotate(90deg);
}

.review-header-left {
    flex: 1;
}

.review-preview {
    transition: all 0.3s ease;
}

.review-content-preview {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.review-expanded {
    animation: expandIn 0.3s ease;
}

.review-content-full {
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 0.5rem;
    white-space: pre-wrap;
}

@keyframes expandIn {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

.review-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.reviewer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.reviewer-link:hover {
    text-decoration: underline;
}

.review-ratings {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.review-content {
    margin-top: 1rem;
    line-height: 1.8;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

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

.btn-primary:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: var(--text-light);
    color: white;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content.modal-large {
    max-width: 900px;
}

/* Compact Review Modal */
.modal-content.modal-review {
    max-width: 950px;
    padding: 1.5rem;
}

.review-form-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-form-top {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
}

.review-form-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-form-left label {
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.review-form-left input[type="text"] {
    padding: 0.5rem;
    font-size: 0.95rem;
}

.review-form-left textarea {
    flex: 1;
    min-height: 120px;
    resize: vertical;
    padding: 0.5rem;
    font-size: 0.95rem;
}

.review-form-right {
    display: flex;
    flex-direction: column;
}

/* Review Header with Star Rating */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.review-header h2 {
    margin: 0;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star-rating .star {
    font-size: 1.8rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.star-rating .star:hover {
    transform: scale(1.1);
}

.star-rating .star.active {
    color: #ffc107;
}

.star-rating .star.hover {
    color: #ffdb4d;
}

.star-rating-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-left: 0.5rem;
    min-width: 1.5rem;
}

.ratings-grid-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-section-compact {
    background: var(--bg-light);
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
}

.rating-section-compact h4 {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin: 0 0 0.35rem 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-color);
}

.rating-row {
    display: grid;
    grid-template-columns: 70px 1fr 25px;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}

.rating-row label {
    font-size: 0.8rem;
    color: var(--text-color);
}

.rating-row input[type="range"] {
    width: 100%;
    height: 6px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    margin: 0;
}

/* Range slider thumb - WebKit browsers */
.rating-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    margin-top: -5px;
}

/* Range slider thumb - Firefox */
.rating-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Range slider track - WebKit browsers */
.rating-row input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

/* Range slider track - Firefox */
.rating-row input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

/* Hover state */
.rating-row input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.rating-row input[type="range"]:hover::-moz-range-thumb {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.rating-row span {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: center;
}

.review-form-compact .btn-primary {
    margin-top: 0.5rem;
    padding: 0.6rem 1.5rem;
}

/* Responsive for compact review form */
@media (max-width: 768px) {
    .review-form-top {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content.modal-review {
        padding: 1rem;
    }
    
    .rating-row {
        grid-template-columns: 70px 1fr 25px;
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

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

/* Forms */
.auth-form h2 {
    margin-bottom: 1.5rem;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input, #review-form input, #review-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form p {
    margin-top: 1rem;
    text-align: center;
}

.auth-form .info-text {
    background-color: #e3f2fd;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    text-align: left;
}

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

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

#review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#review-form label {
    font-weight: bold;
    margin-top: 0.5rem;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-input input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    height: 6px;
    margin: 0;
}

/* Range slider thumb - WebKit browsers */
.rating-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    margin-top: -5px;
}

/* Range slider thumb - Firefox */
.rating-input input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Range slider track - WebKit browsers */
.rating-input input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

/* Range slider track - Firefox */
.rating-input input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}

/* Hover state */
.rating-input input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.rating-input input[type="range"]:hover::-moz-range-thumb {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.rating-input span {
    font-weight: bold;
    color: var(--primary-color);
}

.char-count {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-top: -0.5rem;
}

.ratings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.rating-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.review-ratings-section {
    margin: 1rem 0;
}

.review-ratings-section h4 {
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.review-detailed-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 4px;
}

.review-detailed-ratings span {
    font-size: 0.85rem;
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.review-long-text {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Review Display - Side-by-side layout matching creation form */
.review-display-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.review-display-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-display-content {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.7;
    white-space: pre-wrap;
    min-height: 80px;
}

.review-display-right {
    display: flex;
    flex-direction: column;
}

.review-display-ratings {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-rating-section-display {
    background: var(--bg-light);
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
}

.review-rating-section-display h4 {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin: 0 0 0.35rem 0;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-color);
}

.review-rating-row {
    display: grid;
    grid-template-columns: 70px 1fr 25px;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0;
}

.review-rating-row label {
    font-size: 0.75rem;
    color: var(--text-color);
}

.review-rating-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.review-rating-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.review-rating-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.8rem;
    text-align: center;
}

/* Responsive for review display layout */
@media (max-width: 768px) {
    .review-display-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .review-rating-row {
        grid-template-columns: 70px 1fr 25px;
    }
}

@media (max-width: 768px) {
    .ratings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content.modal-large {
        max-width: 95%;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.error {
    background-color: #fee;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success {
    background-color: #efe;
    color: var(--secondary-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #357abd;
    text-decoration: underline;
}

.ads-notice {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.build-info {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #999;
    font-family: 'Courier New', monospace;
}

.build-info span {
    font-weight: 500;
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    grid-column: 1 / -1; /* Span full width in grid */
}

.no-results-message h4 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.no-results-message p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.no-results-actions button {
    min-width: 150px;
}

/* Contact Form Modal */
#contact-form label {
    font-weight: bold;
    margin-top: 0.5rem;
    display: block;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.25rem;
}

#contact-form textarea {
    resize: vertical;
}

#contact-form button {
    margin-top: 1rem;
    width: 100%;
}

/* Contact Us Form Modal */
#contact-us-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#contact-us-form label {
    font-weight: bold;
    margin-top: 0.5rem;
    display: block;
}

#contact-us-form input,
#contact-us-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-top: 0.25rem;
    box-sizing: border-box;
}

#contact-us-form textarea {
    resize: vertical;
    min-height: 120px;
}

#contact-us-form button {
    margin-top: 1rem;
    width: 100%;
}

#contact-us-modal .info-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Profile Page */
.profile-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.profile-avatar {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto;
    border: 4px solid white;
}

.profile-header h2 {
    font-size: 2rem;
    margin: 1rem 0 0.5rem 0;
}

.profile-email {
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

.public-profile {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.profile-review-item.clickable-review {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-review-item.clickable-review:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.profile-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.profile-stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.profile-details {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.profile-details h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.profile-info-grid {
    display: grid;
    gap: 1rem;
}

.profile-info-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-info-item strong {
    color: var(--text-color);
    min-width: 150px;
}

.profile-info-item span {
    color: var(--text-light);
    word-break: break-all;
}

#user-name {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#user-name:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Reactions */
.review-reactions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

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

.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.reaction-badge:hover {
    background-color: #e8f4fc;
    border-color: var(--primary-color);
}

.reaction-badge.active {
    background-color: #d4edff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.add-reaction-container {
    position: relative;
}

.add-reaction-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px dashed var(--border-color);
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.add-reaction-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.add-reaction-btn.login-to-react {
    opacity: 0.6;
}

.add-icon {
    font-size: 1.2rem;
    font-weight: 300;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    margin-bottom: 0.5rem;
}

.reaction-picker.hidden {
    display: none;
}

.reaction-option {
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reaction-option:hover {
    background-color: var(--bg-light);
    transform: scale(1.2);
}

.reaction-tooltip {
    position: absolute;
    min-width: 220px;
    max-width: 280px;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    padding: 0.75rem;
    z-index: 1000;
    font-size: 0.85rem;
}

.reaction-tooltip.hidden {
    display: none;
}

.reaction-tooltip-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.reaction-tooltip-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reaction-tooltip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.35;
}

.reaction-tooltip-row + .reaction-tooltip-row {
    margin-top: 0.25rem;
}

.reaction-tooltip-emoji {
    width: 1.2rem;
    text-align: center;
}

.reaction-tooltip-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Delete Button */
.review-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-entity-btn {
    background: #eef5ff;
    border: 1px solid #bfd9fb;
    color: #245ea8;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.share-entity-btn:hover {
    background: #dbeafe;
    border-color: #91c2f8;
}

.share-entity-btn.compact {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.share-menu {
    position: absolute;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.share-menu button {
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9rem;
}

.share-menu button:hover {
    background: var(--bg-light);
}

.share-menu-status {
    color: var(--text-light);
    font-size: 0.78rem;
    min-height: 1rem;
    padding: 0.2rem 0.65rem 0.1rem;
}

.delete-review-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.delete-review-btn:hover {
    opacity: 1;
    background-color: #fee;
}

/* Edit Button */
.edit-review-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.edit-review-btn:hover {
    opacity: 1;
    background-color: #e8f4fc;
}

/* Report Button */
.report-review-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.report-review-btn:hover {
    opacity: 1;
    background-color: #fff3e0;
}

/* Edit Review Form */
#edit-review-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#edit-review-form label {
    font-weight: bold;
    margin-top: 0.5rem;
}

#edit-review-form input,
#edit-review-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Profile Reviews */
.profile-reviews {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-reviews h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.profile-review-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.profile-review-item:last-child {
    margin-bottom: 0;
}

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

.profile-review-course {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.profile-review-title {
    font-size: 1.1rem;
    margin: 0.25rem 0;
}

.profile-review-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.profile-review-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-review-content {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 3rem 1.5rem;
        margin: 1.5rem 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    /* Activity Feed Mobile */
    .activity-feed {
        position: static;
        margin-top: 1.5rem;
    }
    
    .activity-list {
        max-height: 400px;
    }
    
    .activity-item {
        padding: 0.6rem;
    }
    
    .activity-icon {
        font-size: 1.3rem;
    }
    
    .activity-text {
        font-size: 0.85rem;
    }
    
    /* Navigation */
    .navbar .container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 12px;
    }
    
    .nav-brand h1 {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
    }
    
    #user-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 1rem;
        margin: 1rem 0.5rem;
        border-radius: 6px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .search-box input {
        padding: 0.9rem 1rem;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .search-box button {
        padding: 0.9rem 1.5rem;
        width: 100%;
    }
    
    /* Courses Grid */
    .featured-courses {
        margin: 2rem 0;
    }
    
    .featured-courses h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-card {
        padding: 1.25rem;
    }
    
    .course-card h4 {
        font-size: 1.1rem;
    }
    
    /* Course Detail */
    .course-detail-header {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .course-detail-header h2 {
        font-size: 1.5rem;
    }

    .course-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .course-info {
        padding: 0.75rem;
    }
    
    .course-info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .course-info-item strong {
        min-width: auto;
        margin-bottom: 0.25rem;
    }
    
    .course-stats {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .stat {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Reviews */
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .reviews-header h3 {
        font-size: 1.3rem;
    }
    
    .review-item {
        padding: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .review-header-actions {
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .review-title {
        font-size: 1rem;
    }
    
    .review-ratings {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .review-detailed-ratings {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .review-detailed-ratings span {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Buttons */
    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.25rem;
        font-size: 0.95rem;
        width: auto;
        max-width: 100%;
        text-align: center;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.25rem;
        margin: 1rem;
        width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-content.modal-large {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }
    
    .close {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 1.3rem;
    }
    
    /* Forms */
    .auth-form h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .auth-form input, #review-form input, #review-form textarea {
        padding: 0.9rem;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .ratings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rating-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .rating-input input[type="range"] {
        width: 100%;
    }
    
    /* Profile Page */
    .profile-header {
        padding: 1.5rem 1rem;
    }
    
    .avatar-circle {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .profile-header h2 {
        font-size: 1.5rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .profile-details, .profile-reviews {
        padding: 1.25rem;
    }
    
    .profile-details h3, .profile-reviews h3 {
        font-size: 1.25rem;
    }
    
    .profile-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .profile-info-item strong {
        min-width: auto;
    }
    
    .profile-review-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Reactions */
    .review-reactions {
        gap: 0.5rem;
    }
    
    .reaction-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .reaction-picker {
        left: -50%;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
        font-size: 0.9rem;
    }
    
    /* Back button */
    #back-btn, #profile-back-btn {
        width: auto;
        margin-bottom: 1rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
    }
    
    .course-card {
        padding: 1rem;
    }
    
    .course-card h4 {
        font-size: 1rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .review-ratings-section h4 {
        font-size: 0.85rem;
    }
    
    .review-detailed-ratings {
        flex-direction: column;
    }
    
    .review-detailed-ratings span {
        width: 100%;
        text-align: center;
    }
    
    .profile-review-item {
        padding: 0.75rem;
    }
    
    .reaction-picker {
        transform: translateX(-25%);
        left: 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-menu a,
    .btn-primary,
    .btn-secondary,
    .reaction-badge,
    .add-reaction-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .reaction-option {
        padding: 0.6rem;
        font-size: 1.6rem;
    }
    
    .delete-review-btn,
    .edit-review-btn,
    .report-review-btn,
    .share-entity-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .course-card:hover {
        transform: none;
    }
    
    .profile-stat-card:hover {
        transform: none;
    }
    
    /* Active states for touch */
    .course-card:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active,
    .btn-secondary:active {
        opacity: 0.8;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 1rem;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .profile-header {
        padding: 1rem;
    }
    
    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    header, footer, .nav-menu, .search-box, .btn-primary, .btn-secondary {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
    }
    
    .review-item {
        break-inside: avoid;
    }
}

/* Suspension UI Styles */
.suspension-banner {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.suspension-banner.suspended {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.suspension-banner.active-user {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.suspension-info {
    flex: 1;
    min-width: 200px;
}

.suspension-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.suspension-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.suspension-reason {
    font-style: italic;
    opacity: 0.9;
}

.suspension-date {
    font-size: 0.85rem;
    opacity: 0.8;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-suspend {
    background-color: #dc2626;
    color: white;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-unsuspend {
    background-color: #059669;
    color: white;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-unsuspend:hover {
    background-color: #047857;
}

.btn-suspend:disabled,
.btn-unsuspend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Suspended user indicator on reviews */
.review-author-suspended {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    background-color: #fee2e2;
    border-radius: 4px;
}

/* Mobile responsive for suspension UI */
@media (max-width: 768px) {
    .suspension-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .admin-actions {
        width: 100%;
    }
    
    .btn-suspend,
    .btn-unsuspend {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   Privacy Note Styles
   ============================================ */
.privacy-note {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    line-height: 1.5;
}

/* ============================================
   Pending Review Notice Styles
   ============================================ */
.pending-review-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.pending-review-notice .notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pending-review-notice .notice-text {
    flex: 1;
}

.pending-review-notice .notice-text strong {
    display: block;
    color: #2e7d32;
    margin-bottom: 0.25rem;
}

.pending-review-notice .notice-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #1b5e20;
}

.pending-review-notice.hidden {
    display: none;
}

.privacy-note a {
    color: var(--primary-color);
    text-decoration: underline;
}

.privacy-note a:hover {
    color: #357abd;
}

/* ============================================
   Request Course Form Styles
   ============================================ */
#contact-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    margin-bottom: 1rem;
}

#contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.course-code-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.course-code-input-group input {
    flex: 3;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.course-code-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.course-code-input-group .btn-secondary {
    flex: 1;
    max-width: 100px;
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
}

.lookup-status {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.lookup-status.success {
    background-color: #d4edda;
    color: #155724;
}

.lookup-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.lookup-loading {
    color: var(--text-light);
}

.lookup-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.lookup-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.lookup-hint a {
    color: var(--primary-color);
}

.handbook-btn {
    display: block;
    text-align: center;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    text-decoration: none;
}

#handbook-link-container {
    margin-bottom: 1rem;
}

#contact-success {
    text-align: center;
    padding: 1rem;
}

#contact-success p {
    margin-top: 0.5rem;
}

#contact-success .btn-primary {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
}

#manual-course-section label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

#manual-course-section input,
#manual-course-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#manual-course-section input:focus,
#manual-course-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

#course-code-section {
    transition: opacity 0.3s ease;
}

/* ============================================
   Button Styles Enhancement
   ============================================ */
.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

/* ============================================
   Request Review Feature Styles
   ============================================ */
.no-reviews-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.no-reviews-message p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.request-review-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 1rem 0;
}

.request-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.request-review-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Fulfilled review request thread styling */
.thread-fulfilled {
    opacity: 0.7;
    background-color: #f0f9f0;
    border-left: 4px solid var(--secondary-color);
}

.thread-fulfilled .thread-title {
    text-decoration: line-through;
}

.thread-locked-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* ============================================
   Unified UI Refresh
   ============================================ */

:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --primary-soft: #eaf3ff;
    --secondary-color: #34a853;
    --danger-color: #d93025;
    --danger-soft: #fce8e6;
    --text-color: #222;
    --text-light: #5f6368;
    --text-muted: #7b8087;
    --border-color: #d7dde5;
    --border-strong: #c3ccd7;
    --bg-light: #f5f8fc;
    --bg-page: #f3f7fb;
    --surface-color: #ffffff;
    --shadow: 0 8px 20px rgba(34, 34, 34, 0.06);
    --shadow-sm: 0 2px 8px rgba(34, 34, 34, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --content-max-width: 720px;
    --page-max-width: 1040px;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #222;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 180px, #ffffff 100%);
}

h1, h2, h3 {
    letter-spacing: -0.01em;
    color: var(--text-color);
}

h1 {
    font-size: 1.866rem;
    line-height: 1.1;
}

h2 {
    font-size: 1.466rem;
    line-height: 1.2;
}

h3 {
    font-size: 1.2rem;
    line-height: 1.25;
}

h4 {
    font-size: 1rem;
    line-height: 1.3;
}

p,
li,
label,
input,
textarea,
select,
button {
    font-size: 1rem;
}

small,
.meta-text,
.build-info,
.ads-notice,
.activity-time,
.thread-meta,
.thread-detail-meta,
.reply-meta,
.review-meta,
.profile-review-meta,
.message-meta .date {
    font-size: 0.8rem;
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.app-shell,
.page-wide {
    max-width: var(--page-max-width);
}

.readable-shell {
    max-width: var(--content-max-width);
}

header {
    background: rgba(74, 144, 226, 0.96);
    backdrop-filter: blur(12px);
    padding: var(--space-3) 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.navbar .container {
    gap: var(--space-4);
}

.nav-brand h1,
.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.nav-brand a,
.logo {
    color: inherit;
    text-decoration: none;
}

.nav-menu {
    gap: var(--space-3);
}

.nav-menu a,
#user-name {
    color: rgba(255, 255, 255, 0.96);
    font-weight: 600;
    font-size: 0.92rem;
}

#user-name {
    padding: 0;
}

#user-name:hover {
    background: transparent;
    color: #fff;
}

.hero,
.profile-header {
    border-radius: var(--radius-md);
    box-shadow: none;
}

.hero {
    padding: var(--space-4);
    margin: var(--space-5) 0;
    text-align: center;
    background: linear-gradient(135deg, #4a90e2 0%, #2f6fb8 100%);
}

.hero h2 {
    max-width: none;
    margin-bottom: var(--space-3);
}

.hero p {
    max-width: 44ch;
    font-size: 1rem;
    margin-bottom: var(--space-4);
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.92);
}

.search-box,
.search-box-large {
    align-items: stretch;
    gap: var(--space-2);
    width: 100%;
}

.search-box {
    max-width: none;
    margin: 0;
}

.search-box input,
.search-box-large input,
.auth-form input,
#review-form input,
#review-form textarea,
#edit-review-form input,
#edit-review-form textarea,
#contact-form input,
#contact-form textarea,
#contact-form select,
#contact-us-form input,
#contact-us-form textarea,
#reply-form textarea,
#new-thread-form input[type="text"],
#new-thread-form textarea,
.admin-notes textarea {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 44px;
    padding: 10px 12px;
    font-family: inherit;
    color: var(--text-color);
    background: #fff;
}

.search-box input,
.search-box-large input {
    flex: 1 1 auto;
    width: 100%;
}

.search-box input:focus,
.search-box-large input:focus,
.auth-form input:focus,
#review-form input:focus,
#review-form textarea:focus,
#edit-review-form input:focus,
#edit-review-form textarea:focus,
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus,
#contact-us-form input:focus,
#contact-us-form textarea:focus,
#reply-form textarea:focus,
#new-thread-form input[type="text"]:focus,
#new-thread-form textarea:focus,
.admin-notes textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.14);
}

.btn-primary,
.btn-secondary,
.btn-new-thread,
.btn-discussion,
.btn-action,
.btn-delete,
.btn-archive,
.btn-restore,
.view-course-btn,
.request-review-btn,
.search-box button,
.search-box-large button,
.handbook-btn,
.btn-suspend,
.btn-unsuspend,
.search-share-btn,
.share-entity-btn,
.thread-share-btn,
.btn-text,
#refresh-activity-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    width: auto;
    max-width: 100%;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary,
.btn-secondary,
.btn-new-thread,
.btn-discussion,
.btn-action,
.btn-delete,
.btn-archive,
.btn-restore,
.view-course-btn,
.request-review-btn,
.handbook-btn,
.btn-suspend,
.btn-unsuspend,
.btn-text,
#refresh-activity-btn,
.search-box button,
.search-box-large button,
.search-share-btn,
.share-entity-btn,
.thread-share-btn {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: none;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-new-thread:hover,
.btn-discussion:hover,
.btn-action:hover,
.btn-delete:hover,
.btn-archive:hover,
.btn-restore:hover,
.view-course-btn:hover,
.request-review-btn:hover,
.handbook-btn:hover,
.btn-suspend:hover,
.btn-unsuspend:hover,
.btn-text:hover,
#refresh-activity-btn:hover,
.search-box button:hover,
.search-box-large button:hover,
.search-share-btn:hover,
.share-entity-btn:hover,
.thread-share-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.delete-review-btn,
.edit-review-btn,
.report-review-btn,
.thread-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    opacity: 1;
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.delete-review-btn:hover,
.edit-review-btn:hover,
.report-review-btn:hover,
.thread-delete-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    opacity: 1;
}

.platform-stats,
.activity-feed,
.course-card,
.course-detail-header,
.review-item,
.profile-stat-card,
.profile-reviews,
.profile-details,
.message-card,
.search-filters,
.course-result-card,
.thread-detail-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.platform-stats {
    margin: 0 0 var(--space-5);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.92);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.stat-card,
.profile-stat-card,
.stat-box {
    padding: var(--space-3);
    border-radius: 12px;
    min-width: 0;
    text-align: left;
    background: var(--bg-light);
    border: 1px solid rgba(74, 144, 226, 0.08);
    box-shadow: none;
}

.stat-card:hover,
.profile-stat-card:hover,
.course-card:hover,
.message-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon,
.stat-icon {
    font-size: 1.4rem;
    margin-bottom: var(--space-1);
}

.stat-card .stat-number,
.profile-stat-card .stat-value,
.stat-box h3,
.stat-value {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.stat-card .stat-label,
.profile-stat-card .stat-label,
.stat-box p,
.stat-label {
    color: var(--text-light);
    font-size: 0.8rem;
}

.university-stats {
    gap: var(--space-2);
    justify-content: flex-start;
}

.university-stat-badge {
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 0.85rem;
}

.home-content-grid {
    align-items: start;
    gap: var(--space-4);
    margin: 0 0 var(--space-5);
}

.featured-courses {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
}

.featured-courses h3,
.activity-header h3,
.reviews-header h3,
.profile-reviews h3,
.profile-details h3,
.admin-header h1 {
    font-size: 1.2rem;
}

.courses-grid {
    gap: var(--space-3);
}

.course-card {
    padding: var(--space-4);
}

.course-card h4 {
    font-size: 1.1rem;
    margin-bottom: var(--space-1);
    color: var(--text-color);
}

.course-code,
.course-department,
.course-university {
    margin-bottom: 2px;
}

.course-code {
    color: var(--primary-color);
    font-weight: 700;
}

.course-department,
.course-university {
    color: var(--text-light);
    font-size: 0.85rem;
}

.course-meta {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
}

.activity-feed {
    padding: var(--space-4);
    position: sticky;
    top: 16px;
}

.activity-header {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
}

.activity-list {
    gap: var(--space-2);
}

.activity-item {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-light);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
}

.activity-item:hover {
    background: #eef5ff;
    border-color: rgba(74, 144, 226, 0.16);
    transform: none;
}

.activity-icon {
    font-size: 1.2rem;
}

.activity-text {
    font-size: 0.86rem;
}

.course-detail-header {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.course-detail-header h2 {
    font-size: 1.466rem;
    margin-bottom: var(--space-1);
}

.course-title-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
}

.course-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.course-info {
    display: grid;
    gap: 0;
    margin: var(--space-3) 0 0;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    border-left: none;
    background: var(--bg-light);
}

.course-info-item {
    padding: 10px 0;
    font-size: 0.9rem;
}

.course-info-item strong {
    min-width: 104px;
}

.course-stats {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0;
    padding: var(--space-2) 0;
}

#report-form {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

#report-form textarea {
    min-height: 120px;
}

.review-item {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.review-header,
.profile-review-header,
.message-header {
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.review-title,
.profile-review-title {
    font-size: 1rem;
}

.review-content-preview,
.profile-review-content,
.message-body {
    font-size: 0.9rem;
    line-height: 1.5;
}

.review-display-layout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: var(--space-3);
}

.review-display-content,
.review-long-text {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border-left: none;
    background: var(--bg-light);
}

.review-expanded {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.review-rating-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.review-rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: #245ea8;
    font-size: 0.8rem;
}

.review-display-ratings,
.ratings-grid-compact,
.ratings-grid {
    gap: var(--space-2);
}

.review-rating-section-display,
.rating-section-compact {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.review-rating-section-display h4,
.rating-section-compact h4,
.review-ratings-section h4,
.rating-section h3 {
    color: var(--text-color);
    border-bottom-color: rgba(34, 34, 34, 0.08);
}

.review-rating-row label,
.rating-row label {
    font-size: 0.78rem;
    color: var(--text-light);
}

.review-reactions,
.review-reactions-mini {
    gap: var(--space-2);
}

.reaction-badge,
.reaction-btn {
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-size: 0.82rem;
}

.reaction-badge.active,
.reaction-btn.active,
.reaction-badge:hover,
.reaction-btn:hover {
    background: var(--primary-soft);
    border-color: rgba(74, 144, 226, 0.26);
    color: var(--primary-color);
}

.reaction-badge.non-interactive {
    cursor: default;
}

.add-reaction-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px dashed rgba(74, 144, 226, 0.28);
    background: var(--primary-soft);
    color: var(--primary-color);
}

.modal {
    background: rgba(22, 28, 37, 0.42);
}

.modal-content {
    max-width: 560px;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(74, 144, 226, 0.1);
    box-shadow: var(--shadow);
}

.modal-content.modal-large,
.modal-content.modal-review {
    max-width: 960px;
}

.close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-light);
}

.auth-form h2 {
    margin-bottom: var(--space-4);
}

.auth-form .info-text,
.privacy-note,
.pending-review-notice,
.lookup-status,
.success,
.error,
.login-to-reply,
.discussion-empty,
.no-results-message,
.no-reviews-message,
.empty-state,
.access-denied {
    border-radius: 12px;
    border-left: none;
    border: 1px solid var(--border-color);
}

.privacy-note,
.auth-form .info-text,
.lookup-status,
.login-to-reply,
.no-results-message,
.no-reviews-message,
.empty-state {
    background: var(--bg-light);
}

.profile-header {
    padding: 32px 24px;
    text-align: left;
    background: linear-gradient(135deg, #4a90e2 0%, #2f6fb8 100%);
}

.public-profile {
    background: linear-gradient(135deg, #4a90e2 0%, #316fb5 100%);
}

.avatar-circle {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    border-width: 2px;
}

.profile-stats,
.admin-stats {
    gap: var(--space-3);
}

.profile-details,
.profile-reviews,
.admin-container {
    padding: var(--space-4);
}

.profile-info-item {
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

footer {
    margin-top: var(--space-6);
    padding: var(--space-5) 0;
}

.ads-notice,
.build-info {
    color: var(--text-muted);
}

.legal-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--space-5) 0;
    line-height: 1.6;
}

.legal-content h1 {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.legal-content h2,
.legal-content h3 {
    margin-top: var(--space-5);
    margin-bottom: var(--space-3);
    color: var(--text-color);
}

.legal-content p + p,
.legal-content ul + p,
.legal-content p + ul {
    margin-top: var(--space-3);
}

.legal-content ul {
    margin-left: 20px;
}

.legal-content li + li {
    margin-top: 6px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-4);
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.highlight-box {
    margin: var(--space-4) 0;
    padding: var(--space-4);
    border-radius: 12px;
    background: var(--primary-soft);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.admin-container {
    max-width: var(--page-max-width);
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: var(--space-4);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
}

.filter-tab.active,
.filter-tab:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.message-card {
    padding: var(--space-4);
}

.message-card.pending {
    border-left: 3px solid var(--primary-color);
}

.message-card.actioned {
    border-left: 3px solid #2e8b57;
}

.message-card.archived {
    border-left: 3px solid #8892a0;
}

.message-meta h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.message-meta .from {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.message-status {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.message-status.pending {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.message-status.actioned {
    background: #e8f5ec;
    color: #2e8b57;
}

.message-status.archived {
    background: #eef2f7;
    color: #6f7782;
}

.message-body {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-light);
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.admin-notes {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-color);
}

.admin-notes label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 0.8rem;
}

.admin-notes .btn-secondary {
    margin-top: 8px;
}

.admin-notes .actioned-info {
    margin-top: 6px;
    color: #2e8b57;
    font-size: 0.8rem;
}

.empty-state,
.access-denied {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-3);
    opacity: 0.45;
}

.deployment-steps {
    text-align: left;
    margin-top: 12px;
    padding-left: 18px;
}

.deployment-steps li + li {
    margin-top: 6px;
}

@media (max-width: 992px) {
    .stats-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .navbar .container {
        padding: 0 12px;
    }

    .hero {
        padding: var(--space-3);
        margin: var(--space-4) 0 16px;
        text-align: center;
    }

    .hero h2 {
        max-width: none;
    }

    .platform-stats,
    .activity-feed,
    .course-card,
    .review-item,
    .profile-stat-card,
    .profile-reviews,
    .profile-details,
    .message-card,
    .course-detail-header,
    .modal-content {
        padding: var(--space-3);
    }

    .stats-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-content-grid {
        gap: var(--space-3);
    }

    .featured-courses {
        padding: var(--space-3);
    }

    .activity-feed {
        position: static;
    }

    .review-header,
    .profile-review-header,
    .message-header,
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-header-actions,
    .message-actions {
        width: 100%;
    }

    .review-display-layout {
        grid-template-columns: 1fr;
    }

    .auth-form .btn-primary,
    #review-form .btn-primary,
    #edit-review-form .btn-primary,
    #contact-form .btn-primary,
    #contact-us-form .btn-primary,
    #reply-form .btn-primary,
    #new-thread-form .btn-primary {
        width: 100%;
    }

    .legal-content {
        padding: var(--space-4) 0;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card,
    .profile-stat-card,
    .stat-box {
        padding: 10px 12px;
    }

    .course-stats {
        flex-direction: column;
        gap: 8px;
    }

    .filter-tabs {
        flex-direction: column;
    }
}
