/* Chuomingle - Modern Campus Mingling App Styles */

:root {
    --primary-color: #FF6B9D;
    --primary-dark: #E5568A;
    --secondary-color: #C44569;
    --accent-color: #F8B500;
    --background: #F5F7FA;
    --card-background: #FFFFFF;
    --text-primary: #2D3748;
    --text-secondary: #718096;
    --border-color: #E2E8F0;
    --success-color: #48BB78;
    --error-color: #F56565;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

html {
    height: -webkit-fill-available;
    margin: 0;
    padding: 0;
}

/* Messages/Alerts */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: var(--success-color);
    color: white;
}

.alert-error {
    background-color: var(--error-color);
    color: white;
}

.alert-info {
    background-color: #4299E1;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

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

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    opacity: 0.3;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.auth-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.logo-accent {
    color: var(--primary-color);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Form Styles */
.auth-form {
    margin-top: 30px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: #F7FAFC;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.checkbox-group {
    margin-top: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    margin-left: 5px;
}

.error-list {
    margin-top: 5px;
    color: var(--error-color);
    font-size: 0.85rem;
    list-style: none;
}

.error-list li {
    margin-bottom: 3px;
}

/* Button Styles */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
}

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

.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: var(--background);
}

.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 15px;
    border-radius: 8px;
}

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

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.dashboard-card p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.status-enabled {
    color: var(--success-color);
    font-weight: 600;
}

.status-disabled {
    color: var(--error-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .welcome-section {
        padding: 25px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .messages-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Feed Page Styles */
.feed-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    background: var(--background);
    width: 100%;
}

.feed-navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
}

.feed-navbar .nav-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.feed-center {
    width: 100%;
}

/* Create Post Card */
.create-post-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.btn-create-post {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.btn-create-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.plus-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Post Card */
.posts-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-card {
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: none;
}

.post-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.user-details .username {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.post-location {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

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

.post-image-container {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.post-image {
    width: 100%;
    max-height: none;
    height: auto;
    object-fit: cover;
    display: block;
    aspect-ratio: 1;
}

.post-actions {
    padding: 10px 16px;
    border-bottom: none;
}

@media (min-width: 769px) {
    .post-actions {
        padding: 12px 20px;
        border-bottom: 1px solid var(--border-color);
    }
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.like-btn.liked .heart-icon {
    animation: heartBeat 0.3s;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.heart-icon {
    font-size: 1.5rem;
}

.likes-count {
    font-weight: 600;
    color: var(--text-primary);
}

.post-caption {
    padding: 8px 16px 16px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.post-caption strong {
    font-weight: 600;
    margin-right: 5px;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.no-posts p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.page-link {
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.page-link:hover {
    background: var(--primary-dark);
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

.modal-content.post-modal {
    background-color: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

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

/* Modal Header with Gradient */
.modal-header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 25px 30px;
    color: white;
}

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

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.modal-icon {
    font-size: 1.8rem;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    padding: 0;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Enhanced Modal Body */
.modal-body-enhanced {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Upload Section */
.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #F7FAFC;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #FFF5F8;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #FFF5F8;
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.upload-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.image-preview-enhanced {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.preview-image-enhanced {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-label-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

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

.optional-text {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.textarea-wrapper,
.input-wrapper {
    position: relative;
}

.textarea-wrapper textarea,
.input-wrapper input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
    background: #F7FAFC;
    resize: vertical;
    box-sizing: border-box;
}

.textarea-wrapper textarea::placeholder,
.input-wrapper input::placeholder {
    color: #A0AEC0;
}

.textarea-wrapper textarea:focus,
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.textarea-wrapper textarea {
    min-height: 120px;
}

.char-count-enhanced {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Enhanced Modal Footer */
.modal-footer-enhanced {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 30px;
    background: #F7FAFC;
    border-top: 1px solid var(--border-color);
}

.btn-cancel {
    padding: 12px 30px;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-cancel:hover {
    border-color: var(--text-secondary);
    background: #F7FAFC;
    transform: translateY(-2px);
}

.btn-post {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-post:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
}

.btn-post:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Nav Link Active State */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Notification Bell */
.notification-bell {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.mobile-tabbar .notification-bell {
    position: relative;
}

.mobile-tabbar .notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--error-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hide CSRF token in feed */
.posts-feed input[name="csrfmiddlewaretoken"] {
    display: none;
}

/* Responsive Feed - Desktop */
@media (min-width: 769px) {
    .post-card {
        border-radius: 15px;
        box-shadow: var(--shadow);
        margin-bottom: 20px;
        border-bottom: none;
    }
    
    .posts-feed {
        gap: 20px;
    }
    
    .post-header {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .post-caption {
        padding: 15px 20px;
    }
    
    .post-image {
        max-height: 600px;
        object-fit: contain;
        aspect-ratio: auto;
    }
}

/* Responsive Feed - Tablet */
@media (max-width: 768px) {
    .feed-main {
        padding: 0;
    }
    
    .feed-navbar {
        padding: 12px 0;
    }
    
    .feed-navbar .nav-content {
        padding: 0 16px;
    }
    
    .create-post-card {
        border-radius: 0;
        margin-bottom: 0;
        padding: 16px;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .post-card {
        border-bottom: 1px solid var(--border-color);
    }
    
    .post-card:last-child {
        border-bottom: none;
    }
    
    .post-image {
        aspect-ratio: 4/3;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Responsive Feed - Mobile (Edge-to-Edge) */
@media (max-width: 480px) {
    .feed-container {
        padding-top: 0;
    }
    
    .feed-navbar {
        padding: 0;
        padding-top: env(safe-area-inset-top, 0);
    }
    
    .feed-navbar .nav-content {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0));
    }
    
    .feed-main {
        padding: 0;
        margin-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .create-post-card {
        border-radius: 0;
        margin-bottom: 0;
        padding: 12px 16px;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .btn-create-post {
        border-radius: 8px;
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .post-card {
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid #E2E8F0;
    }
    
    .post-card:last-child {
        border-bottom: none;
    }
    
    .post-header {
        padding: 12px 16px;
    }
    
    .post-actions {
        padding: 10px 16px;
    }
    
    .post-caption {
        padding: 8px 16px 12px 16px;
    }
    
    .post-image {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 36px;
        height: 36px;
    }
    
    .user-details .username {
        font-size: 0.9rem;
    }
    
    .post-time {
        font-size: 0.75rem;
    }
    
    /* Modal adjustments for mobile */
    .modal {
        padding: 0;
    }
    
    .modal-content.post-modal {
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header-gradient {
        padding: 16px;
        padding-top: calc(16px + env(safe-area-inset-top, 0));
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-body-enhanced {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
    }
    
    .upload-area {
        padding: 30px 15px;
        min-height: 200px;
        border-radius: 12px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-text {
        font-size: 0.95rem;
    }
    
    .upload-subtext {
        font-size: 0.85rem;
    }
    
    .modal-footer-enhanced {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
        flex-direction: column;
        background: white;
        border-top: 1px solid var(--border-color);
    }
    
    .modal-footer-enhanced .btn-cancel,
    .modal-footer-enhanced .btn-post {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    
    .form-section {
        margin-bottom: 20px;
    }
    
    .textarea-wrapper textarea,
    .input-wrapper input {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    /* Hide gap in posts feed on mobile */
    .posts-feed {
        gap: 0;
    }
    
    /* Pagination adjustments */
    .pagination {
        border-radius: 0;
        margin-top: 0;
        padding: 16px;
        border-top: 1px solid var(--border-color);
    }
    
    .no-posts {
        border-radius: 0;
        padding: 40px 20px;
    }
}

/* Mobile Tab Bar (WAP-like navigation) */
.mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-tabbar a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
}

.mobile-tabbar a.active {
    color: var(--primary-color);
}

/* Make desktop nav compact on mobile and show tabbar */
@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
    .mobile-tabbar {
        display: flex;
    }
    .feed-main {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); /* avoid overlap with tabbar */
    }
    .dashboard-container .dashboard-content {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }
}

/* Modern Dashboard Styles */
.dashboard-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hero-avatar {
    position: relative;
    flex-shrink: 0;
}

.hero-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.location-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--success-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    font-size: 1rem;
}

.hero-text h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
}

.hero-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    margin: 0 0 5px 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Quick Actions */
.quick-actions {
    margin-bottom: 30px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
    display: block;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.action-card-highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.action-card-highlight:hover {
    color: white;
    transform: translateY(-5px) scale(1.02);
}

.action-card-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #38A169 100%);
    color: white;
    cursor: default;
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.action-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.action-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Nearby Users Section */
.nearby-section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 25px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

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

.user-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.user-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.user-card-header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 100%);
    text-align: center;
}

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-card-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.distance-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.4);
}

.user-card-body {
    padding: 20px;
    flex: 1;
}

.user-card-name {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.user-card-university {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
}

.user-card-course {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.user-card-bio {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
}

.user-card-footer {
    padding: 15px 20px;
    background: #F7FAFC;
    border-top: 1px solid var(--border-color);
}

.user-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.user-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.follow-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.follow-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

.follow-btn.following:hover {
    background: var(--primary-dark);
}

.follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-btn {
    flex: 1;
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.contact-btn:hover {
    background: #38A169;
    transform: translateY(-2px);
    color: white;
}

.location-indicator {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    display: block;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.empty-state p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.empty-state-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Location Prompt */
.location-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.location-prompt-content {
    max-width: 500px;
    margin: 0 auto;
}

.location-prompt-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.location-prompt h3 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.location-prompt p {
    margin: 0 0 25px 0;
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.6;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Profile Completion Card */
.profile-completion-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

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

.completion-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.progress-text {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.completion-items {
    margin-bottom: 20px;
}

.completion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.completion-icon {
    font-size: 1.3rem;
}

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Nearby Users Section */
.nearby-users-section {
    margin-top: 30px;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.nearby-users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.nearby-user-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.nearby-user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.user-avatar-container {
    flex-shrink: 0;
}

.user-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.user-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
    border: 3px solid var(--primary-color);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.user-university {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 5px 0;
}

.user-distance {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
}

.no-nearby-users {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.no-nearby-users p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Responsive Map Styles */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
        border-radius: 0;
    }
    
    .nearby-users-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nearby-user-card {
        padding: 15px;
    }
    
    .user-avatar-img,
    .user-avatar-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .user-name {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        padding: 0 20px 10px 20px;
    }
    
    .nearby-users-section {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .map-container {
        height: 300px;
    }
    
    .section-title {
        padding: 0 16px 10px 16px;
        font-size: 1.2rem;
    }
    
    .nearby-users-section {
        padding: 0 16px;
    }
    
    .no-nearby-users {
        padding: 30px 20px;
        border-radius: 0;
    }
}

/* Location Toggle Styles */
.location-toggle-section {
    margin-top: 20px;
}

.location-status-text {
    margin-bottom: 10px;
    font-size: 1rem;
}

.location-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-activate {
    background: linear-gradient(135deg, var(--success-color) 0%, #38A169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.btn-activate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.6);
}

.btn-deactivate {
    background: linear-gradient(135deg, var(--error-color) 0%, #E53E3E 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.btn-deactivate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.6);
}

.btn-activate:disabled,
.btn-deactivate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.location-status-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.location-status-message.success {
    background-color: #C6F6D5;
    color: #22543D;
    border: 1px solid #9AE6B4;
    display: block;
}

.location-status-message.error {
    background-color: #FED7D7;
    color: #742A2A;
    border: 1px solid #FC8181;
    display: block;
}

.location-status-message:empty {
    display: none;
}

/* Responsive Location Toggle */
@media (max-width: 768px) {
    .location-toggle-section {
        margin-top: 15px;
    }
    
    .location-description {
        font-size: 0.85rem;
    }
}

/* Responsive Dashboard Styles */
@media (max-width: 768px) {
    .dashboard-hero {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .hero-text h2 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .location-prompt {
        padding: 40px 25px;
        border-radius: 15px;
    }
    
    .location-prompt h3 {
        font-size: 1.5rem;
    }
    
    .profile-completion-card {
        padding: 25px 20px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .dashboard-hero {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
    
    .hero-avatar-img,
    .hero-avatar-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .location-badge {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .hero-text h2 {
        font-size: 1.4rem;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .action-card {
        padding: 20px;
    }
    
    .action-icon {
        font-size: 2rem;
    }
    
    .user-card {
        border-radius: 15px;
    }
    
    .user-card-avatar,
    .user-card-avatar-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .distance-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .empty-state {
        padding: 40px 25px;
        border-radius: 15px;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .location-prompt {
        padding: 30px 20px;
    }
    
    .location-prompt-icon {
        font-size: 3rem;
    }
    
    .location-prompt h3 {
        font-size: 1.3rem;
    }
    
    .location-prompt p {
        font-size: 0.95rem;
    }
}

/* User Profile Page Styles */
.profile-header-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    flex-shrink: 0;
}

.profile-avatar-img-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.profile-avatar-placeholder-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3rem;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.profile-username {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.profile-university,
.profile-course {
    margin: 5px 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.profile-actions-header {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.follow-btn-large {
    padding: 12px 30px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

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

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

.contact-btn-large {
    padding: 12px 30px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.contact-btn-large:hover {
    background: #38A169;
    transform: translateY(-2px);
    color: white;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.profile-details-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-details-card h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.profile-bio {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

.profile-bio-empty {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 25px;
}

.profile-details-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 150px;
}

.detail-value {
    color: var(--text-secondary);
}

.profile-posts-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-posts-card h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.post-thumbnail {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #F7FAFC;
    position: relative;
}

.post-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 10px;
    font-size: 0.8rem;
}

/* University Search Styles */
.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h2 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 2rem;
}

.search-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    gap: 15px;
    position: relative;
}

.autocomplete-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

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

.university-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
    display: block;
}

.university-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.university-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.university-name {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.university-count {
    margin: 0 0 15px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.count-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.university-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.search-prompt {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.search-prompt-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.search-prompt h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.search-prompt p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Autocomplete Dropdown Styles */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #F7FAFC;
}

.autocomplete-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.autocomplete-item-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Responsive Autocomplete */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 250px;
    }
    
    .autocomplete-item {
        padding: 10px 15px;
    }
    
    .autocomplete-item-name {
        font-size: 0.9rem;
    }
    
    .autocomplete-item-count {
        font-size: 0.8rem;
    }
}

/* University Users Page */
.university-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

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

.university-header h2 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 2rem;
}

.university-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Photo Gallery Styles */
.photo-upload-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.upload-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.upload-label:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.upload-text {
    font-size: 0.95rem;
}

.upload-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.upload-status.success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.upload-status.error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #F7FAFC;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.photo-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: #F8D7DA;
}

.set-primary-btn:hover {
    background: #FFF3CD;
}

.photo-caption {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

.empty-photos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Profile Photo Gallery (for viewing other users) */
.profile-photos-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.profile-photos-card h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.profile-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.profile-photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #F7FAFC;
    box-shadow: var(--shadow);
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.profile-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.profile-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
}

/* Responsive Photo Gallery */
@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .upload-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-label {
        justify-content: center;
    }
    
    .profile-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .photo-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Responsive Profile Styles */
@media (max-width: 768px) {
    .profile-header-card {
        padding: 30px 20px;
    }
    
    .profile-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-username {
        font-size: 1.8rem;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-actions-header {
        width: 100%;
        justify-content: center;
    }
    
    .follow-btn-large,
    .contact-btn-large {
        flex: 1;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .universities-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   REDESIGNED PROFILE PAGE STYLES
   ============================================ */

/* Profile Hero Section */
.profile-hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 30px;
    color: white;
}

.profile-hero-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-hero-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.profile-hero-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3rem;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.profile-hero-edit-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-hero-edit-badge:hover {
    transform: scale(1.1);
}

.profile-hero-info {
    flex: 1;
}

.profile-hero-name {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.profile-hero-university,
.profile-hero-course {
    margin: 5px 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.profile-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.profile-tab:hover {
    background: #F7FAFC;
    color: var(--primary-color);
}

.profile-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Profile Form Card */
.profile-form-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.profile-form-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.profile-form-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.profile-form-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-form-section {
    margin-bottom: 35px;
}

.profile-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.label-icon {
    font-size: 1.3rem;
}

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

.profile-form-group {
    margin-bottom: 0;
}

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

.profile-form-group input,
.profile-form-group select,
.profile-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: #F7FAFC;
    box-sizing: border-box;
}

.profile-form-group input:focus,
.profile-form-group select:focus,
.profile-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.profile-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

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

.profile-save-btn {
    margin-top: 30px;
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Profile Photo Upload Area */
.profile-photo-upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F7FAFC;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-upload-area:hover {
    border-color: var(--primary-color);
    background: #FFF5F8;
}

.profile-photo-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #FFF5F8;
    transform: scale(1.02);
}

.profile-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.profile-upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.profile-upload-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.profile-image-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.profile-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.profile-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Photo Gallery Redesign */
.profile-photos-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.profile-photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.profile-photos-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.profile-photos-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.photo-count-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.photo-upload-form {
    margin-bottom: 30px;
}

.photo-upload-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.photo-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.photo-upload-label:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.photo-upload-icon {
    font-size: 1.2rem;
}

.photo-upload-text {
    font-size: 0.95rem;
}

.photo-caption-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.photo-caption-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.photo-upload-btn {
    padding: 12px 25px;
    white-space: nowrap;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.photo-gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #F7FAFC;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.photo-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.photo-gallery-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.photo-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-gallery-item:hover .photo-gallery-overlay {
    opacity: 1;
}

.photo-gallery-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-gallery-action-btn:hover {
    background: white;
    transform: scale(1.15);
}

.delete-btn:hover {
    background: #F8D7DA;
}

.set-primary-btn:hover {
    background: #FFF3CD;
}

.photo-gallery-caption {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
    background: white;
}

.photo-gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.photo-gallery-empty .empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.photo-gallery-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* Location Card Redesign */
.profile-location-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.location-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.location-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-icon {
    font-size: 2rem;
}

.location-header-text h3 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.location-header-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.location-status-card {
    background: #F7FAFC;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.location-status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.active {
    background: var(--success-color);
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
}

.status-indicator.inactive {
    background: var(--text-secondary);
    box-shadow: 0 0 0 4px rgba(113, 128, 150, 0.2);
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.status-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.location-description-card {
    background: #FFF5F8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary-color);
}

.location-description-text {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.location-toggle-button {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive Profile Redesign */
@media (max-width: 768px) {
    .profile-hero-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .profile-hero-img,
    .profile-hero-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .profile-hero-name {
        font-size: 1.8rem;
    }
    
    .profile-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .profile-tab {
        width: 100%;
    }
    
    .profile-form-card,
    .profile-photos-card,
    .profile-location-card {
        padding: 25px 20px;
    }
    
    .profile-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-photos-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .photo-upload-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .photo-upload-label {
        justify-content: center;
    }
    
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .location-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-hero-section {
        padding: 25px 15px;
    }
    
    .profile-hero-img,
    .profile-hero-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .profile-hero-name {
        font-size: 1.5rem;
    }
    
    .profile-form-card,
    .profile-photos-card,
    .profile-location-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .profile-form-header h3,
    .profile-photos-header h3,
    .location-header-text h3 {
        font-size: 1.5rem;
    }
    
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .photo-gallery-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ============================================
   USER PROFILE VIEW (OTHER USER) STYLES
   ============================================ */

/* User Profile Hero Section */
.user-profile-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 30px;
    color: white;
    flex-wrap: wrap;
}

.user-profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.user-profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.user-profile-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3.5rem;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.user-profile-info {
    flex: 1;
    min-width: 250px;
}

.user-profile-name {
    margin: 0 0 12px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.user-profile-university,
.user-profile-course {
    margin: 8px 0;
    font-size: 1.2rem;
    opacity: 0.95;
}

.user-profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.user-stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.user-stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 5px;
}

.user-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    min-width: 150px;
}

.user-follow-btn {
    padding: 14px 30px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.user-follow-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.user-follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.user-contact-btn {
    padding: 14px 30px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: block;
    width: 100%;
}

.user-contact-btn:hover {
    background: #38A169;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
    color: white;
}

/* User Profile Tabs */
.user-profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.user-profile-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.user-profile-tab:hover {
    background: #F7FAFC;
    color: var(--primary-color);
}

.user-profile-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.user-profile-tab-content {
    display: none;
}

.user-profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* User Profile About Card */
.user-profile-about-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.user-profile-section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.user-profile-section-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.user-profile-bio-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #F7FAFC;
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.user-profile-bio {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.user-profile-bio-empty {
    margin-bottom: 35px;
    padding: 25px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.user-profile-details-section {
    margin-bottom: 35px;
}

.user-details-title {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.user-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #F7FAFC;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.user-detail-item:hover {
    background: #FFF5F8;
    transform: translateX(5px);
}

.user-detail-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.user-detail-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.user-detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.user-detail-value-link {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.user-profile-contact-section {
    margin-bottom: 0;
}

/* User Profile Photos Card */
.user-profile-photos-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.user-photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.user-photos-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.user-photos-count {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.user-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.user-photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #F7FAFC;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.user-photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.user-photo-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.user-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-photo-primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-photo-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    z-index: 2;
}

.user-photo-caption-text {
    margin: 0;
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* User Profile Posts Card */
.user-profile-posts-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.user-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.user-posts-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.user-posts-count {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.user-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.user-post-item {
    border-radius: 15px;
    overflow: hidden;
    background: #F7FAFC;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.user-post-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.user-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.user-post-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.user-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-post-item:hover .user-post-overlay {
    opacity: 1;
}

.user-post-info {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-post-likes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-post-caption {
    padding: 15px;
    background: white;
}

.user-post-caption p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty State */
.user-profile-empty-card {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.user-profile-empty-card .empty-state-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.user-profile-empty-card h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.user-profile-empty-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive User Profile */
@media (max-width: 768px) {
    .user-profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .user-profile-img,
    .user-profile-placeholder {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .user-profile-name {
        font-size: 2rem;
    }
    
    .user-profile-stats {
        justify-content: center;
        width: 100%;
    }
    
    .user-profile-actions {
        width: 100%;
    }
    
    .user-profile-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .user-profile-tab {
        width: 100%;
    }
    
    .user-profile-about-card,
    .user-profile-photos-card,
    .user-profile-posts-card {
        padding: 25px 20px;
    }
    
    .user-details-grid {
        grid-template-columns: 1fr;
    }
    
    .user-photos-grid,
    .user-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .user-photos-header,
    .user-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .user-profile-hero {
        padding: 25px 15px;
    }
    
    .user-profile-img,
    .user-profile-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .user-profile-name {
        font-size: 1.8rem;
    }
    
    .user-profile-about-card,
    .user-profile-photos-card,
    .user-profile-posts-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .user-profile-section-header h3,
    .user-photos-header h3,
    .user-posts-header h3 {
        font-size: 1.5rem;
    }
    
    .user-photos-grid,
    .user-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .user-profile-empty-card {
        padding: 40px 25px;
    }
    
    .user-profile-empty-card .empty-state-icon {
        font-size: 4rem;
    }
}
