/* Facebook 2004 Inspired Styles for dormsyde */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #e6edf5;
    color: #333;
    font-size: 11px;
    line-height: 1.3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles with dormsyde branding */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid #4a5568;
    padding: 8px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.binary-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 30"><text x="5" y="10" font-family="monospace" font-size="6" fill="%23ffffff" opacity="0.06">dorm dorm dorm dorm dorm dorm</text><text x="5" y="20" font-family="monospace" font-size="6" fill="%23ffffff" opacity="0.06">syde syde syde syde syde syde</text></svg>') repeat;
    pointer-events: none;
}

.header-content {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    position: relative;
    z-index: 10;
}

.logo-section .logo {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-family: 'Trebuchet MS', sans-serif;
}

.nav-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.15);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Main Layout */
.main-layout {
    max-width: 760px;
    margin: 10px auto;
    display: flex;
    gap: 10px;
    padding: 0 10px;
    flex: 1;
    min-height: 0;
}

.left-sidebar {
    width: 180px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
}

.right-sidebar {
    width: 180px;
    flex-shrink: 0;
}

/* Panel Styles with dormsyde branding */
.welcome-panel,
.sidebar-panel,
.content-panel,
.form-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.welcome-panel:hover,
.sidebar-panel:hover,
.content-panel:hover,
.form-panel:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.welcome-header,
.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.welcome-content,
.panel-content {
    padding: 12px;
}

.welcome-content p {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
}

.welcome-content ul {
    margin: 10px 0 10px 20px;
}

.welcome-content li {
    margin-bottom: 4px;
    font-size: 12px;
}

/* Buttons with dormsyde styling */
.action-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.btn-facebook {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 3px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-facebook:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Search and Filters with enhanced styling */
.search-input,
.filter-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 6px;
    transition: border-color 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Simple Form Styling - Very Small and Compact */
.form-panel {
    background: #fff;
    border: 1px solid #dadde1;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 12px;
    max-width: 350px;
    font-size: 11px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table td {
    padding: 3px;
    vertical-align: top;
}

.form-label {
    width: 70px;
    font-weight: bold;
    text-align: right;
    padding-right: 6px;
    color: #1c1e21;
    font-size: 11px;
    white-space: nowrap;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    max-width: 240px;
    padding: 3px 4px;
    border: 1px solid #dddfe2;
    border-radius: 3px;
    font-size: 11px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.form-textarea {
    resize: vertical;
    min-height: 40px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1877f2;
}

/* Small submit button */
.form-table .btn-facebook {
    background: #1877f2;
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
}

.form-table .btn-facebook:hover {
    background: #166fe5;
}
    
    .form-label {
        width: 100%;
        text-align: left;
        padding-right: 0;
        padding-bottom: 5px;
        font-size: 13px;
    }
    
/* Sidebar Links with enhanced styling */
.sidebar-link {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.tips-list {
    font-size: 11px;
    margin-left: 18px;
}

.tips-list li {
    margin-bottom: 4px;
    line-height: 1.4;
}

.recent-item {
    font-size: 11px;
    margin-bottom: 6px;
    color: #4a5568;
    padding: 3px 0;
    border-bottom: 1px dotted #e2e8f0;
}

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

/* Content styling with enhanced typography */
.content-panel h3 {
    color: #667eea;
    font-size: 16px;
    margin: 12px 0 8px 0;
    font-weight: bold;
}

.content-panel h4 {
    color: #4a5568;
    font-size: 13px;
    margin: 10px 0 6px 0;
    font-weight: bold;
}

.content-panel p {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #2d3748;
}

.content-panel ul {
    margin: 6px 0 10px 20px;
    font-size: 12px;
}

.content-panel li {
    margin-bottom: 3px;
    line-height: 1.4;
}

.content-panel a {
    color: #667eea;
    transition: color 0.2s ease;
}

.content-panel a:hover {
    color: #764ba2;
}

/* Page header styling - Simple Facebook 2004 style */
.page-header {
    background: #fff;
    border: 1px solid #dadde1;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.page-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: bold;
    color: #1c1e21;
}

.page-header p {
    margin: 0;
    font-size: 14px;
    color: #65676b;
}

/* Footer with improved styling */
.footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #cbd5e0;
    text-align: center;
    padding: 30px 20px 25px;
    font-size: 11px;
    color: #4a5568;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
    margin-top: auto;
    flex-shrink: 0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-links {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: #764ba2;
    background-color: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.footer-tagline {
    margin: 12px 0;
    color: #718096;
    font-style: italic;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.footer-copyright {
    margin-top: 8px;
    color: #a0aec0;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Project items with enhanced styling */
.project-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.project-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.project-title {
    color: #667eea;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    text-decoration: none;
}

.project-title:hover {
    color: #764ba2;
    text-decoration: underline;
}

.project-meta {
    font-size: 11px;
    color: #718096;
    margin-bottom: 8px;
}

.project-description {
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #2d3748;
}

.project-looking-for {
    font-size: 11px;
    color: #4a5568;
    font-style: italic;
    margin-bottom: 8px;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 3px;
    border-left: 3px solid #667eea;
}

.project-tags {
    margin-bottom: 8px;
}

.project-tag {
    background: linear-gradient(135deg, #e6f2ff 0%, #cce7ff 100%);
    color: #667eea;
    padding: 2px 6px;
    font-size: 10px;
    margin-right: 4px;
    border-radius: 12px;
    border: 1px solid #b3d9ff;
    font-weight: 500;
}

.contact-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #d9d9d9;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    background: white;
    color: #3b5998;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f7f7f7;
    border-color: #3b5998;
}

.pagination-btn:disabled {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination-btn.active {
    background: #3b5998;
    color: white;
    border-color: #3b5998;
}

.pagination-btn.page-number {
    min-width: 35px;
    text-align: center;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-size: 11px;
}

.pagination-info {
    color: #777;
    font-size: 10px;
    margin-top: 8px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .pagination-btn {
        padding: 6px 8px;
        font-size: 10px;
        min-width: 30px;
    }
    
    .pagination-info {
        font-size: 9px;
    }
}

/* Responsive Design */
@media (max-width: 800px) {
    .main-layout {
        flex-direction: column;
        max-width: 100%;
        flex: 1;
    }
    
    .left-sidebar,
    .right-sidebar {
        width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav-section {
        justify-content: center;
    }
    
    /* Ensure footer stays at bottom on mobile */
    body {
        min-height: 100vh;
    }
    
    .footer {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .footer-links {
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .footer-links a {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .footer-tagline {
        font-size: 11px;
        padding: 0 10px;
        line-height: 1.4;
    }
    
    .footer-copyright {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .main-layout {
        padding: 0 5px;
        flex: 1;
    }
    
    .welcome-content,
    .panel-content {
        padding: 10px;
    }
    
    .form-table {
        display: block;
    }
    
    .form-table tr,
    .form-table td {
        display: block;
        width: 100%;
    }
    
    .form-label {
        text-align: left;
        padding-right: 0;
        padding-bottom: 2px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .footer-links a {
        margin: 0 5px;
        font-size: 10px;
    }
}

/* Responsive Navigation Fixes */
@media (max-width: 768px) {
    .nav-section {
        gap: 8px;
    }
    
    .nav-link {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    #authNav .user-profile {
        gap: 6px;
        padding: 3px 6px;
    }
    
    #authNav .user-avatar {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    #authNav .user-name {
        font-size: 10px;
    }
    
    #authNav .user-university {
        font-size: 8px;
    }
    
    #authNav .profile-link,
    #authNav .logout-btn {
        font-size: 10px;
        padding: 2px 4px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 10px;
    }
    
    .nav-section {
        gap: 5px;
    }
    
    .nav-link {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    #authNav .user-info {
        display: none; /* Hide user details on very small screens */
    }
    
    #authNav .user-profile {
        gap: 4px;
    }
}

/* Main Container */
.main-container {
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 15px;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 25px;
}

.welcome-box {
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.welcome-box h2 {
    color: #3b5998;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: normal;
}

.welcome-text {
    font-size: 11px;
    margin-bottom: 8px;
    color: #333;
}

.feature-list {
    margin: 8px 0 8px 20px;
    font-size: 11px;
}

.feature-list li {
    margin-bottom: 3px;
    color: #333;
}

.action-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: #3b5998;
    color: white;
    border: 1px solid #29447e;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #2d4373;
}

.btn-secondary {
    background: #f7f7f7;
    color: #3b5998;
    border: 1px solid #ccc;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s;
}

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

/* Search Section */
.search-section {
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

#searchInput {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #bdc7d8;
    border-radius: 2px;
    font-size: 11px;
    font-family: inherit;
}

#searchBtn {
    background: #3b5998;
    color: white;
    border: 1px solid #29447e;
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
}

.filter-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-section select {
    padding: 3px 5px;
    border: 1px solid #bdc7d8;
    border-radius: 2px;
    font-size: 11px;
    font-family: inherit;
    background: white;
}

/* Projects Board */
.projects-board h3 {
    color: #3b5998;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: normal;
}

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

.project-card {
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.project-title {
    color: #3b5998;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 6px;
    text-decoration: none;
}

.project-title:hover {
    text-decoration: underline;
}

.project-meta {
    font-size: 10px;
    color: #777;
    margin-bottom: 8px;
}

.project-description {
    font-size: 11px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-looking-for {
    font-size: 10px;
    color: #555;
    margin-bottom: 8px;
    font-style: italic;
}

.project-tags {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.project-tag {
    background: #f0f2f5;
    color: #365899;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: 9px;
    border: 1px solid #ddd;
}

.project-contact {
    text-align: right;
}

.contact-btn {
    background: #42b883;
    color: white;
    border: none;
    padding: 3px 8px;
    font-size: 10px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.contact-btn:hover {
    background: #369870;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: black;
}

.modal h2 {
    color: #3b5998;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: normal;
}

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #bdc7d8;
    border-radius: 2px;
    font-size: 11px;
    font-family: inherit;
}

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

/* Project Details Modal */
.project-detail-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.project-detail-title {
    color: #3b5998;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.project-detail-meta {
    font-size: 11px;
    color: #777;
}

.project-detail-section {
    margin-bottom: 15px;
}

.project-detail-section h4 {
    color: #3b5998;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: bold;
}

.project-detail-section p {
    font-size: 11px;
    color: #333;
    line-height: 1.4;
}

.contact-info {
    background: #f0f2f5;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.contact-email-btn {
    background: #42b883;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 8px;
}

.contact-email-btn:hover {
    background: #369870;
}

/* Footer */
.footer {
    background: #f7f7f7;
    border-top: 1px solid #d9d9d9;
    padding: 15px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 15px;
}

.footer-link {
    color: #3b5998;
    text-decoration: none;
    font-size: 10px;
    margin: 0 8px;
}

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

.footer-text {
    color: #777;
    font-size: 10px;
    margin: 0 8px;
}

/* Profile Page Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-photo-section {
    flex-shrink: 0;
}

.profile-photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-photo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.profile-photo-container.uploading .profile-photo {
    opacity: 0.7;
}

.profile-photo-container.uploading::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    animation: pulse 1.5s infinite;
}

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

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0 0 8px 0;
}

.profile-university {
    font-size: 16px;
    color: #667eea;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.profile-study-level {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}


.stat-item strong {
    color: #333;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    background: white;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Tab Content */
.tab-content {
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 400px;
}

.tab-pane {
    display: none;
    padding: 30px;
}

.tab-pane.active {
    display: block;
}

.profile-section {
    margin-bottom: 30px;
}

.profile-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.bio-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.bio-display p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

.skills-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.no-skills, .no-activity, .loading-text {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.contact-info p {
    margin: 12px 0;
    color: #666;
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.contact-info p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-info strong {
    color: #333;
    min-width: 120px;
    font-weight: 600;
    margin-right: 15px;
}

.contact-info span {
    color: #667eea;
    font-weight: 500;
}

/* User Projects */
.user-projects {
    display: grid;
    gap: 15px;
}

.user-project-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.user-project-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.project-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.project-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.project-description {
    color: #555;
    line-height: 1.5;
}

/* Activity Feed */

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #333;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #666;
}

/* Edit Profile Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.profile-edit-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.edit-profile-form {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
    padding-right: 40px;
}

.char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    display: block;
    margin-top: 5px;
}

.skill-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.skill-input-container input {
    flex: 1;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.skill-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.skill-remove:hover {
    background: rgba(255,255,255,0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Public Profile Specific Styles */
.public-photo {
    cursor: default;
}

.public-photo:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.public-project {
    border-left-color: #28a745;
}

.project-contact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.project-contact small {
    color: #666;
    font-size: 11px;
}

.contact-info-modal {
    padding: 20px 30px 30px;
    text-align: center;
}

.email-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: monospace;
    border: 2px solid #667eea;
}

.contact-note {
    color: #666;
    margin: 15px 0;
}

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

.profile-not-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.not-found-content {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.not-found-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.not-found-content p {
    color: #666;
    margin-bottom: 25px;
}

#authNav .user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

#authNav .user-profile:hover {
    background: rgba(255,255,255,0.15);
}

#authNav .user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

#authNav .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

#authNav .user-name {
    font-size: 11px;
    font-weight: 500;
    color: white;
}

#authNav .user-university {
    font-size: 9px;
    color: rgba(255,255,255,0.8);
}

#authNav .profile-link {
    font-size: 11px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
}

#authNav .profile-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

#authNav .logout-btn {
    background: none;
    border: none;
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

#authNav .logout-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* Authentication Page Styles */
.auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border: 1px solid #e2e8f0;
}

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

.auth-header h2 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.auth-form {
    margin-bottom: 20px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.auth-form.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-20px);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:valid {
    border-color: #38a169;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e53e3e;
}

.form-group input:invalid:not(:placeholder-shown) + .form-hint {
    color: #e53e3e;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
    padding-right: 40px;
}

.form-hint {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    display: block;
}

.form-hint.error {
    color: #e53e3e;
}

.form-hint.success {
    color: #38a169;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 15px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-btn.secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.auth-btn.secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-toggle {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.auth-toggle p {
    color: #718096;
    margin-bottom: 10px;
}

.auth-toggle button {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.auth-toggle button:hover {
    color: #764ba2;
}

.auth-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    border: 1px solid #feb2b2;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    background: #c6f6d5;
    color: #22543d;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    border: 1px solid #9ae6b4;
    display: none;
}

.auth-success.show {
    display: block;
}

/* Auth Check Panel for Post Page */
.auth-check-panel {
    background: white;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.auth-required {
    max-width: 400px;
    margin: 0 auto;
}

.auth-required h3 {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 15px;
}

.auth-required p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Modernized Post Project Form Styles */
.form-panel {
    max-width: 600px;
    margin: 32px auto 24px auto;
    padding: 32px 28px 24px 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(102,126,234,0.08);
    border: 1px solid #e2e8f0;
}

.form-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.form-table td {
    padding: 8px 0;
    vertical-align: top;
}

.form-label {
    width: 160px;
    font-weight: 600;
    text-align: right;
    padding-right: 18px;
    color: #4a5568;
    font-size: 15px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 7px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    margin-bottom: 0;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

.form-panel button[type="submit"], .form-panel .btn-facebook {
    margin-top: 12px;
    float: right;
    font-size: 15px;
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
}

/* Error Message Styling */
.error-message {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.error-message h3 {
    color: #c53030;
    margin-bottom: 10px;
}

.error-message p {
    color: #742a2a;
    margin-bottom: 15px;
}

/* Success Modal Styles */
.success-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.success-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    margin: 5% auto;
    padding: 40px;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 
                0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    animation: slideInUp 0.4s ease-out;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

.success-title {
    color: #1877f2;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.success-message {
    color: #65676b;
    font-size: 1.1rem;
    margin: 0 0 25px 0;
    line-height: 1.4;
}

.success-details {
    background: linear-gradient(135deg, #f0f2ff 0%, #e8f4fd 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
    border-left: 4px solid #1877f2;
}

.success-details p {
    color: #444;
    margin: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.success-details p:first-child {
    font-weight: 600;
    color: #1877f2;
    margin-bottom: 12px;
    text-align: center;
}

.success-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.success-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.success-btn.primary {
    background: linear-gradient(135deg, #1877f2 0%, #0866d6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.success-btn.primary:hover {
    background: linear-gradient(135deg, #0866d6 0%, #0653d3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.success-btn.secondary {
    background: #f0f2f5;
    color: #1c1e21;
    border: 2px solid #dadde1;
}

.success-btn.secondary:hover {
    background: #e4e6ea;
    border-color: #ccd0d5;
    transform: translateY(-1px);
}

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

@keyframes slideInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Animated Success Message Styles */
.animate-success {
    animation: successPulse 0.6s ease-out;
    transform-origin: center;
}

.animated-success {
    text-align: center;
    padding: 10px;
}

.success-title {
    font-size: 14px;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 5px;
    animation: slideInUp 0.6s ease-out;
}

.success-subtitle {
    font-size: 12px;
    color: #388e3c;
    margin-bottom: 8px;
    animation: slideInUp 0.8s ease-out;
}

.success-redirect {
    font-size: 10px;
    color: #4caf50;
    animation: fadeIn 1.2s ease-out;
}

#countdown {
    font-weight: bold;
    color: #2e7d32;
    animation: pulse 1s infinite;
}

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}