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

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f77737 0%, #e1306c 50%, #833ab4 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    background: linear-gradient(135deg, #f77737 0%, #e1306c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #9b1a5a;
    border-color: transparent;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Status Bar */
.status-bar {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.privacy-link {
    color: #6c757d;
    font-size: 0.8rem;
    text-decoration: none;
}
.privacy-link:hover { text-decoration: underline; }

.privacy-policy-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}
.privacy-policy-note a {
    color: #e1306c;
    text-decoration: none;
}
.privacy-policy-note a:hover { text-decoration: underline; }

/* Sections */
.main-content {
    padding: 0;
}

.section {
    display: none;
    min-height: 60vh;
}

.section.active {
    display: block;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 4rem 2rem;
}

.welcome-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.welcome-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    background: linear-gradient(135deg, #f77737 0%, #e1306c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.6;
}

.privacy-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    text-align: left;
}

.privacy-info h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.privacy-info ul {
    list-style: none;
    padding: 0;
}

.privacy-info li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 1rem;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.welcome-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile Setup Section */
.profile-section {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.profile-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    /* transition: border-color 0.3s ease; */
}

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.9rem;
}

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

/* Avatar Selection */
.avatar-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.avatar-option {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    /* transition: all 0.2s ease; */
}

.avatar-option:hover {
    background: #e9ecef;
    /* transform: scale(1.1); */
}

.avatar-option.selected {
    border-color: #e1306c;
    background: #fce7f3;
}

/* Picture Upload */
.picture-upload-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.picture-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.picture-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e1306c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.picture-preview .btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
}

/* Location Section */
.location-section {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.location-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.location-card h2 {
    margin-bottom: 1rem;
    color: #333;
}

.location-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

.location-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.location-info ul {
    list-style: none;
}

.location-info li {
    margin-bottom: 0.5rem;
    color: #666;
}

.location-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Main App Layout */
.app-layout {
    display: flex;
    height: calc(100vh - 200px);
}

.sidebar {
    width: 350px;
    background: #fff5f7;
    border-right: 1px solid #fce7f3;
    padding: 1.5rem;
    overflow-y: auto;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.user-avatar {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

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

.user-info h3 {
    margin-bottom: 0.25rem;
    color: #333;
}

.user-status {
    color: #28a745;
    font-size: 0.9rem;
}

/* Data Retention Warning */

/* Map area — always visible above the tabs */
.sidebar-map-area {
    margin-bottom: 1rem;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
    gap: 0;
}

.sidebar-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.sidebar-tab:hover {
    color: #e1306c;
}

.sidebar-tab.active {
    color: #e1306c;
    border-bottom-color: #e1306c;
}

.tab-panel {
    display: block;
}

.tab-panel.hidden {
    display: none;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Nearby Users */
.nearby-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.nearby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.distance-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.distance-selector label {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.distance-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.distance-select:focus {
    outline: none;
    border-color: #e1306c;
}

.map-container {
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

#proximity-map {
    width: 100%;
    height: 200px;
    max-height: 200px;
    display: block;
    background: #f0f8ff;
    border: 1px solid #e0e0e0;
}

#location-map {
    width: 100%;
    height: 200px;
    max-height: 200px;
    display: block;
    background: #f0f8ff;
}

.map-info {
    padding: 0.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.location-address {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem;
    background: white;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.nearby-users {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.nearby-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nearby-user:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.nearby-user-avatar {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.nearby-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nearby-user-info h4 {
    margin-bottom: 0.25rem;
    color: #333;
}

.nearby-user-distance {
    color: #666;
    font-size: 0.8rem;
}

.no-users {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Groups Section */
.groups-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

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

.nearby-groups {
    max-height: 250px;
    overflow-y: auto;
}

.group-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #e1306c;
}

.group-item:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

.group-name {
    font-weight: bold;
    color: #333;
}

.group-members {
    font-size: 0.8rem;
    color: #666;
}

.group-description {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.group-admin-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.group-admin-controls button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.group-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.group-controls button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.no-groups {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Chat Area */
.no-chat-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-chat-state h2 {
    margin-bottom: 1rem;
    color: #333;
}

.stats {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    color: #666;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.chat-partner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #fafafa;
}

.message {
    margin-bottom: 1rem;
    max-width: 70%;
}

.message.own {
    margin-left: auto;
}

.message-content {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.message.own .message-content {
    background: #e1306c;
    color: white;
}

.message-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
    text-align: right;
}

.message.own .message-meta {
    text-align: left;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input input:focus {
    border-color: #e1306c;
}

.emoji-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* transition: all 0.2s ease; */
}

.emoji-btn:hover {
    background: #e9ecef;
    /* transform: scale(1.1); */
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 300px;
    margin-bottom: 4px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.emoji-option {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 5px;
    text-align: center;
    /* transition: background 0.2s ease; */
}

.emoji-option:hover {
    background: #f0f0f0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #e1306c, #c13584);
    color: white;
}

.btn-primary:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.35);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    /* transform: translateY(-2px); */
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

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

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

/* Group Management Modal */
.management-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    /* transition: all 0.2s ease; */
}

.tab-btn.active {
    color: #e1306c;
    border-bottom-color: #e1306c;
}

.tab-btn:hover {
    color: #e1306c;
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

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

.members-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.member-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    font-size: 0.9rem;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.member-details h5 {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.member-details span {
    font-size: 0.8rem;
    color: #666;
}

.member-actions {
    display: flex;
    gap: 0.25rem;
}

.member-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.admin-badge {
    background: #ffc107;
    color: #000;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
}

.requests-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fff3cd;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.request-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.request-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    font-size: 0.9rem;
    overflow: hidden;
}

.request-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.request-details h5 {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.request-details span {
    font-size: 0.8rem;
    color: #666;
}

.request-actions {
    display: flex;
    gap: 0.25rem;
}

.request-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.no-requests {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        max-height: none;
        position: relative;
        order: 1;
    }
    
    .content-area {
        width: 100%;
        order: 2;
        min-height: 300px;
    }
    
    .no-chat-state {
        padding: 1rem;
        text-align: center;
        background: #f8f9fa;
        border-radius: 10px;
        margin: 1rem;
    }
    
    .no-chat-state h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .no-chat-state p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .nearby-section {
        margin-top: 1rem;
        max-height: none;
    }
    
    .nearby-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .distance-selector {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .distance-select {
        flex: 1;
        margin-left: 0.5rem;
    }
    
    .map-container {
        margin: 0.5rem 0;
    }
    
    #proximity-map {
        height: 150px;
    }
    
    .map-legend {
        gap: 0.5rem;
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .nearby-users {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .nearby-user {
        padding: 0.8rem;
        margin-bottom: 0.5rem;
        cursor: pointer;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        /* transition: all 0.2s ease; */
    }
    
    .nearby-user:hover {
        /* transform: translateY(-2px); */
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .location-controls {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        margin: 0;
        border-radius: 0;
        padding: 1rem;
    }
    
    /* Hide desktop-specific elements on mobile */
    .user-profile {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .controls {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .controls button {
        flex: 1;
        min-width: auto;
    }
}

/* Animations - DISABLED */
/*
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    animation: slideIn 0.5s ease-out;
}
*/

/* Join Request Notification */
.join-request-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #ffc107;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    max-width: 350px;
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    padding: 1rem;
}

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.notification-content p {
    margin: 0 0 1rem 0;
    color: #666;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notification-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Join request notification styles */
.join-request-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #e1306c;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1001;
    max-width: 350px;
    animation: slideIn 0.3s ease-out;
}

.join-request-notification .notification-content h4 {
    margin: 0 0 0.5rem 0;
    color: #e1306c;
}

.join-request-notification .notification-content p {
    margin: 0 0 1rem 0;
    color: #333;
}

.join-request-notification .notification-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.notification-badge {
    display: inline-block;
    animation: pulse 1.5s infinite;
}

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

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

/* Location Status Indicators */
.location-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.location-status.location-on {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
}

.location-status.location-off {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    animation: pulse 2s infinite;
}

.location-status.location-off:hover {
    background-color: rgba(220, 53, 69, 0.2);
    transform: scale(1.05);
}

.location-status.location-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    animation: pulse 1.5s infinite;
}

/* Location Required Modal Styles */
.location-required-modal,
.distance-disconnection-modal {
    backdrop-filter: blur(5px);
}

.location-required-modal > div,
.distance-disconnection-modal > div {
    animation: slideInScale 0.3s ease;
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

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

/* Message notification badge */
.message-notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    animation: pulse 2s infinite;
    z-index: 10;
}

/* Ensure nearby users have relative positioning for badges */
.nearby-user {
    position: relative;
}

/* =====================================================
   AD SLOTS — shared styles
   ===================================================== */

.ad-slot-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.ad-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.2s;
}

.ad-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ad-card-inner {
    padding: 0.75rem;
}

.ad-sponsored {
    font-size: 0.65rem;
    font-weight: 600;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.ad-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
    margin-bottom: 0.2rem;
}

.ad-tagline {
    font-size: 0.8rem;
    color: #495057;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.ad-distance {
    font-size: 0.75rem;
    color: #6c757d;
}

/* =====================================================
   MOBILE AD SLOT (inside sidebar, replaces privacy notice)
   Visible only on mobile — hidden on desktop
   ===================================================== */

.ad-slot-mobile {
    margin-bottom: 1rem;
    display: none; /* hidden on desktop, shown on mobile via media query below */
}

/* =====================================================
   DESKTOP RIGHT AD PANEL
   Visible only on desktop — hidden on mobile
   ===================================================== */

.ad-panel {
    width: 200px;
    min-width: 200px;
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ad-panel-section {
    display: flex;
    flex-direction: column;
}

.ad-panel-note {
    margin-top: auto;
    font-size: 0.7rem;
    color: #adb5bd;
    line-height: 1.4;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.ad-panel-note a {
    color: #e1306c;
    text-decoration: none;
}

.ad-panel-note a:hover {
    text-decoration: underline;
}

/* =====================================================
   RESPONSIVE OVERRIDES
   - Mobile  (≤768px): show mobile slot, hide desktop panel
   - Desktop (>768px): hide mobile slot, show desktop panel
   ===================================================== */

@media (max-width: 768px) {
    /* Show the mobile ad slot in the sidebar */
    .ad-slot-mobile {
        display: block;
    }

    /* Hide the right desktop ad panel entirely */
    .ad-panel {
        display: none;
    }
}

@media (min-width: 769px) {
    /* Hide the mobile ad slot — it's embedded in the sidebar */
    .ad-slot-mobile {
        display: none;
    }

    /* Show the right ad panel */
    .ad-panel {
        display: flex;
    }
}
