:root{
  --bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --surface: rgba(255,255,255,0.85);
  --surface-glass: rgba(255,255,255,0.75);
  --text: #1a202c;
  --text-light: #2d3748;
  --muted: #718096;
  --link: #4299e1;
  --accent: #4299e1;
  --accent-hover: #3182ce;
  --accent-600:#2b77b3;
  --chip: rgba(237,242,247,0.8);
  --border: rgba(203,213,224,0.5);
  --shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
  --shadow-hover: 0 25px 50px -12px rgba(0,0,0,0.25);
  --radius: 16px;
  --radius-large: 24px;
  --glass-border: rgba(255,255,255,0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --info: #0ea5e9;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --surface: rgba(30,41,59,0.85);
    --surface-glass: rgba(30,41,59,0.75);
    --text: #f7fafc;
    --text-light: #e2e8f0;
    --muted: #a0aec0;
    --link: #63b3ed;
    --accent: #63b3ed;
    --accent-hover: #4299e1;
    --accent-600:#3182ce;
    --chip: rgba(45,55,72,0.8);
    --border: rgba(74,85,104,0.5);
    --shadow: 0 20px 40px -15px rgba(0,0,0,0.4);
    --shadow-hover: 0 25px 50px -12px rgba(0,0,0,0.6);
    --glass-border: rgba(255,255,255,0.1);
    --success: #059669;
    --warning: #d97706;
    --info: #0284c7;
  }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  background: #f0f2f5;
  color: #050505; 
  font: 14px/1.34 Helvetica, Arial, sans-serif;
  margin: 0;
  overflow-x: hidden;
}



/* Container */
.profile-container{
  max-width: none;
  margin: 0;
  padding: 0;
  background: #F0F2F5;
  min-height: 100vh;
}

/* Profile nav should be full width like Facebook */
.profile-nav{
  background: white;
  border-top: 1px solid #dadde1;
  display: flex; 
  justify-content: center;
  align-items: center;
  padding: 0;
  position: sticky;
  top: 56px;
  z-index: 10;
  width: 100vw;
  max-width: none !important;
  /* left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important; */
}

.profile-nav-left {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 16px;
  position: relative;
}

.profile-nav-right{
  position: absolute;
  right: 16px;
  display: flex; 
  gap: 8px; 
  align-items: center;
}

/* Header / Cover Section - Full width for cover photo */
.cover-section {
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
  overflow: hidden;
  margin-bottom: 16px;
  max-width: none !important;
  margin: 0 0 16px !important;
  border-radius: 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}

.cover-photo{
  position: relative;
  width: 100%;
  height: 348px;
  background: linear-gradient(45deg, #4267B2, #6B73FF);
  overflow: hidden;
}

/* Profile header inside cover section - centered */
.profile-header{
  background: white;
  padding: 16px;
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end;
  gap: 16px;
  max-width: 940px;
  margin: 0 auto;
}
.cover-photo img{
  width: 100%; 
  height: 100%;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.1));
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
}

.edit-cover-btn{
  background: white;
  color: #050505;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex; 
  gap: 8px; 
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.edit-cover-btn:hover{ 
  background: #f2f2f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.edit-cover-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.edit-cover-btn:disabled:hover {
  background: white;
  transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Profile info strip */
.profile-header{
  background: white;
  padding: 16px 16px 0;
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end;
  gap: 16px;
}

.profile-info-left{
  display: flex; 
  gap: 16px; 
  align-items: flex-end;
}

.profile-picture-container{
  position: relative;
  width: 168px; 
  height: 168px;
  margin-bottom: 8px;
  margin-top: -84px; /* Overlap the cover photo */
  border-radius: 50%;
  border: 4px solid white;
  overflow: hidden;
  background: white;
  flex-shrink: 0;
}
.profile-picture{
  width: 100%; 
  height: 100%; 
  object-fit: cover;
}
.profile-pic-overlay{
  position: absolute; 
  bottom: 8px; 
  right: 8px;
  width: 36px;
  height: 36px;
  background: #e4e6ea;
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.profile-pic-overlay:hover{
  background: #d8dadf;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.profile-pic-overlay i{
  color: #050505;
  font-size: 14px;
}

/* Loading state for profile picture */
.profile-picture-container.loading .profile-pic-overlay {
  background: #1877f2;
}
.profile-picture-container.loading .profile-pic-overlay i {
  color: white;
}

.profile-details {
  margin-bottom: 16px;
}

.profile-details .profile-name{
  margin: 0 0 4px;
  font-size: 32px;
  font-weight: 800;
  color: #050505;
  line-height: 1.1875;
}
.friends-count{ 
  color: #65676b;
  font-size: 15px;
  margin: 0 0 2px;
}

.mutual-friends{ 
  display: flex; 
  align-items: center; 
  gap: 8px;
  margin-top: 8px;
}
.mutual-friends .friend-pics{ 
  display: flex; 
}
.mutual-friends .friend-pics img{
  width: 20px; 
  height: 20px; 
  border-radius: 50%;
  border: 1px solid white;
  margin-left: -4px;
  object-fit: cover;
}
.mutual-friends .friend-pics img:first-child{ 
  margin-left: 0;
}
.mutual-friends span{
  color: #65676b;
  font-size: 15px;
}

/* Header actions */
.profile-actions{ 
  display: flex; 
  gap: 8px; 
  align-items: center;
  margin-bottom: 16px;
}
.profile-actions button{
  background: #e4e6ea;
  color: #050505;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex; 
  gap: 6px; 
  align-items: center; 
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.2s;
}
.profile-actions .add-story-btn,
.profile-actions .edit-profile-btn{
  background: #1877f2;
  color: white;
}

/* Friend action buttons */
.profile-actions .add-friend-btn {
  background: #1877f2;
  color: white;
}

.profile-actions .friend-request-sent-btn {
  background: #e4e6ea;
  color: #65676b;
  cursor: not-allowed;
}

.profile-actions .respond-friend-request-btn {
  background: #42b883;
  color: white;
}

.profile-actions .friends-btn {
  background: #e4e6ea;
  color: #050505;
  position: relative;
}

.profile-actions .message-btn {
  background: #e4e6ea;
  color: #050505;
}

.friends-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #dadde1;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 200px;
  margin-top: 4px;
}

.friends-dropdown button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #050505;
  cursor: pointer;
  transition: background-color 0.2s;
}

.friends-dropdown button:hover {
  background: #f2f3f5;
}
.profile-actions button:hover{ 
  filter: brightness(0.96);
}

.profile-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-actions .add-story-btn:hover,
.profile-actions .edit-profile-btn:hover{
  background: #166fe5;
}

.profile-actions .add-friend-btn:hover {
  background: #166fe5;
}

.profile-actions .respond-friend-request-btn:hover {
  background: #369870;
}
.more-options-btn{ 
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  min-width: auto;
}

/* Tabs / Nav */
.profile-nav{
  background: white;
  border-top: 1px solid #dadde1;
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  padding: 0 16px;
  position: sticky;
  top: 56px;
  z-index: 10;
}
.profile-nav.stuck{ 
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}
.profile-nav-left,.profile-nav-right{ 
  display: flex; 
  gap: 0; 
  align-items: center;
}

.nav-tab{
  position: relative;
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  padding: 16px 16px;
  color: #65676b;
  text-decoration: none; 
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  border-bottom: 4px solid transparent;
  border-radius: 0;
  margin: 0;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}
.nav-tab:hover{ 
  background: rgba(0, 0, 0, 0.05);
  color: #1c1e21;
  border-radius: 8px 8px 0 0;
}
.nav-tab.active{
  color: #1877f2;
  border-bottom-color: #1877f2;
}
.nav-tab.active:hover{
  background: rgba(24, 119, 242, 0.1);
}

@keyframes slideIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.activity-log-btn{
  color: #050505;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  background: #e4e6ea;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.2s;
}
.activity-log-btn:hover{ 
  background: #d8dadf;
}

/* Content layout - Full width like Facebook */
.profile-content{
  max-width: 940px;
  margin: 0 auto;
  padding: 0 16px;
  background: #F0F2F5;
  min-height: 100vh;
  display: grid; 
  grid-template-columns: 380px 1fr; 
  gap: 24px;
  margin-top: 0;
}
@media (max-width: 1000px){
  .profile-content{ grid-template-columns: 1fr; }
  .profile-picture-container{ width:140px; height:140px; margin-top:-70px; }
  .profile-header{ flex-direction: column; align-items: center; text-align: center; gap: 16px; }
}

/* Sidebar cards */
.profile-left .intro-card,
.profile-left .photos-card,
.profile-left .friends-card,
.profile-main .tab-content{
  background: var(--surface-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}

.profile-left .intro-card:hover,
.profile-left .photos-card:hover,
.profile-left .friends-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.profile-left .intro-card,
.profile-left .photos-card,
.profile-left .friends-card{ 
  padding:24px; 
  margin-bottom: 20px;
}
.profile-left .card-header{
  display:flex; align-items:center; justify-content: space-between;
  margin-bottom: 16px;
}
.profile-left h3{ 
  margin:0 0 12px; 
  font-size:20px; 
  font-weight: 700;
  color: var(--text);
}
.see-all{ 
  color: var(--link); 
  text-decoration:none; 
  font-weight:600;
  transition: all 0.2s ease;
}
.see-all:hover{ 
  text-decoration:underline;
  color: var(--accent-hover);
}

.intro-item{
  display:flex; gap:12px; align-items:flex-start;
  padding: 10px 0; 
  color: var(--text-light);
  transition: all 0.2s ease;
}
.intro-item:hover{
  padding-left: 8px;
}
.intro-item i{ 
  width:20px; 
  text-align:center; 
  color: var(--accent);
  margin-top: 2px;
}
.edit-details-btn,
.add-hobbies-btn,
.edit-featured-btn{ 
  display: block;
  width: 100%;
  margin-top: 12px;
  padding:10px 16px; 
  border-radius:12px; 
  border:1px solid var(--glass-border);
  background: var(--chip); 
  cursor:pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}
.edit-details-btn:hover,
.add-hobbies-btn:hover,
.edit-featured-btn:hover{
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* Photos (sidebar) */
.photos-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:8px;
}
.photos-grid img{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:12px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.photos-grid img:hover{
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Friends (sidebar) */
.friends-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:12px;
}
.friend-item{ 
  display:flex; flex-direction:column; align-items:center; gap:8px; 
  text-align:center;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.friend-item:hover{
  background: var(--chip);
  transform: translateY(-2px);
}
.friend-item img{ 
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:12px;
  transition: transform 0.3s ease;
}
.friend-item:hover img{
  transform: scale(1.1);
}
.friend-item span{ 
  font-size:13px; 
  color: var(--text);
  font-weight: 600;
}
.friends-count-detail{
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 15px;
}
.no-friends{ 
  color: var(--muted); 
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Main Column Tabs */
.tab-content{ 
  display: none !important; 
  padding: 24px;
  animation: fadeIn 0.4s ease;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
  margin-bottom: 16px;
}
.tab-content.active{ 
  display: block !important; 
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Create Post */
.create-post{
  background: var(--surface-glass);
  border:1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}
.create-post:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.create-post-top{ display:flex; align-items:center; gap:12px; }
.post-profile-pic{ 
  width:48px; height:48px; border-radius:50%; object-fit:cover;
  border: 2px solid var(--accent);
}
.post-input{
  flex:1; 
  background: var(--chip); 
  border:1px solid var(--glass-border);
  border-radius: 25px; 
  padding: 12px 18px; 
  outline:none;
  font-size: 16px;
  transition: all 0.3s ease;
}
.post-input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}
.create-post-bottom{
  display:flex; gap:16px; margin-top:16px; 
  border-top:1px solid var(--border); 
  padding-top:16px;
}
.post-option{ 
  display:flex; align-items:center; gap:10px; 
  color: var(--muted); cursor:pointer; 
  padding:12px 16px; border-radius:12px;
  transition: all 0.3s ease;
  font-weight: 600;
}
.post-option:hover{ 
  background: var(--chip);
  color: var(--text);
  transform: translateY(-1px);
}

/* Posts feed */
.posts-feed > * + *{ margin-top:12px }

/* About */
.about-section h3{ margin:0 0 10px }
.about-categories{ display:grid; gap:14px; }
.about-category{ background: rgba(0,0,0,.02); border:1px dashed var(--border); border-radius:12px; padding:12px; }
.about-category h4{ margin:0 0 10px; display:flex; align-items:center; gap:8px }
.about-item{ display:flex; align-items:flex-start; gap:10px; padding:6px 0; }

/* Friends (main) */
.friends-section .friends-header{
  display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;
}

.friends-list{
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 16px;
  padding: 16px 0;
}

/* Responsive grid for friends list */
@media (max-width: 768px) {
  .friends-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .friends-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.friend-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; 
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.friend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.friend-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.friend-cover {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.friend-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.friend-card:hover .friend-cover-img {
  transform: scale(1.05);
}

.friend-avatar-overlay {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.friend-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.friend-info-card {
  padding: 35px 16px 12px;
  text-align: center;
}

.friend-name {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.friend-mutual-count {
  font-size: 13px;
  color: var(--muted);
  display: block;
}

.friend-actions { 
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.btn-friend-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chip);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
}

.btn-add-friend:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-message:hover {
  background: var(--surface-glass);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-accept {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-accept:hover {
  background: #059862;
  border-color: #059862;
  transform: translateY(-1px);
}

.btn-pending {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
  opacity: 0.8;
  cursor: not-allowed;
}

.btn-friends {
  background: var(--info);
  color: white;
  border-color: var(--info);
}

.btn-friends:hover {
  background: #0084c7;
  border-color: #0084c7;
}

.friend-status-info {
  padding: 12px 16px 16px;
  text-align: center;
}

.friend-since,
.friend-self-indicator,
.friend-mutual {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.friend-self-indicator {
  color: var(--accent);
  font-weight: 600;
}

/* Legacy button styles for backward compatibility */
.add-friend-btn-small,
.message-btn-small,
.friend-request-sent-btn-small,
.respond-friend-request-btn-small,
.friends-btn-small {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chip);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.add-friend-btn-small:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.message-btn-small:hover {
  background: var(--surface-glass);
  border-color: var(--accent);
}

.no-friends-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.no-friends-message i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--border);
}

.no-friends-message h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text);
}

.no-friends-message p {
  margin: 0;
  font-size: 14px;
}

/* Profile Action Buttons Enhancement */
.add-friend-btn, .message-btn, .friends-btn, 
.friend-request-sent-btn, .respond-friend-request-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.add-friend-btn {
  background: var(--accent);
  color: white;
}

.add-friend-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.friend-request-sent-btn {
  background: var(--chip);
  color: var(--muted);
  cursor: default;
}

.respond-friend-request-btn {
  background: #42b883;
  color: white;
}

.respond-friend-request-btn:hover {
  background: #369870;
  transform: translateY(-1px);
}

.friends-btn {
  background: var(--chip);
  color: var(--text);
  position: relative;
}

.friends-btn:hover {
  background: var(--surface-glass);
}

.friends-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  min-width: 160px;
  margin-top: 4px;
}

.friends-dropdown button {
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s ease;
}

.friends-dropdown button:hover {
  background: var(--chip);
}

.message-btn {
  background: var(--chip);
  color: var(--text);
}

.message-btn:hover {
  background: var(--surface-glass);
}

/* Photos (main) */
.photos-section .photos-filter,
.videos-section .videos-filter,
.checkins-section .checkins-filter{
  display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap;
}
.filter-btn{
  padding:8px 12px; border-radius:999px; border:1px solid var(--border);
  background: var(--chip); color: var(--text); cursor:pointer;
}
.filter-btn.active{ background: var(--accent); color:#fff; border-color: transparent; }

.photos-gallery{
  display:grid; grid-template-columns: repeat(4, 1fr); gap:8px;
}
@media (max-width: 900px){ .photos-gallery{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 640px){ .photos-gallery{ grid-template-columns: repeat(2, 1fr);} }
.photos-gallery img{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:12px; transition: transform .15s ease;
}
.photos-gallery img:hover{ transform: scale(1.01) }

/* Videos */
.videos-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:12px;
}
@media (max-width: 900px){ .videos-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 640px){ .videos-grid{ grid-template-columns: 1fr; } }
.video-item{ cursor:pointer }
.video-thumbnail{ position:relative; overflow:hidden; border-radius:12px; }
.video-thumbnail img{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.video-overlay{ position:absolute; inset:0; display:grid; place-items:center; background:linear-gradient(180deg, transparent, rgba(0,0,0,.35)); color:#fff; opacity:0; transition:.2s; }
.video-thumbnail:hover .video-overlay{ opacity:1 }
.video-duration{
  position:absolute; right:8px; bottom:8px; font-size:12px;
  background: rgba(0,0,0,.65); color:#fff; padding:4px 6px; border-radius:6px;
}
.video-info h4{ margin:8px 0 2px }
.video-info p{ margin:0; color: var(--muted) }

/* Check-ins */
.checkins-map .map-placeholder{
  border:1px dashed var(--border);
  border-radius:12px; padding:20px; text-align:center; color: var(--muted);
}
.checkins-list{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.checkin-item{
  display:grid; grid-template-columns: 40px 1fr 120px; gap:12px;
  align-items:center; padding:12px; border:1px solid var(--border);
  border-radius:12px; background: var(--surface);
}
@media (max-width: 640px){ .checkin-item{ grid-template-columns: 36px 1fr; } .checkin-map{ display:none } }
.checkin-icon{ display:grid; place-items:center; color: var(--accent) }
.checkin-header{ display:flex; justify-content:space-between; gap:8px; }
.checkin-time{ color: var(--muted); font-size:13px }
.checkin-map img{ width:100%; height:auto; border-radius:10px; }

/* More */
.more-categories{ display:grid; gap:12px; }
.more-category{
  border:1px solid var(--border);
  background: var(--surface);
  border-radius:12px; padding:12px;
}
.category-header{ display:flex; justify-content:space-between; align-items:center; }
.add-btn{
  padding:8px 12px; border-radius:10px; border:1px solid var(--border);
  background: var(--chip); cursor:pointer;
}
.life-events{ display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.life-event{ display:flex; gap:10px; align-items:flex-start; }
.event-icon{ width:36px; height:36px; border-radius:10px; background: var(--chip); display:grid; place-items:center; color: var(--accent) }

/* Utilities */
a{ color: var(--link) }
button{ font: inherit }
img{ max-width:100%; display:block }
Section */
.friends-section {
    background: rgba(255,255,255,0.75);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,230,0.18);
}

.friends-header {
    margin-bottom: 20px;
}

.friends-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 4px 0;
}

.friends-header p {
    font-size: 15px;
    color: #65676b;
    margin: 0;
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.friend-card {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e4e6ea;
    transition: box-shadow 0.2s ease;
}

.friend-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.friend-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
}

.friend-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 4px 0;
}

.friend-card p {
    font-size: 13px;
    color: #65676b;
    margin: 0 0 12px 0;
}

.message-btn {
    background: #e4e6ea;
    color: #1c1e21;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.message-btn:hover {
    background: #d8dadf;
}

/* Photos Section */
.photos-section {
    background: rgba(255,255,255,0.75);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,230,0.18);
}

.photos-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 16px 0;
}

.photos-filter {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e4e6ea;
}

.filter-btn {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: #1c1e21;
}

.filter-btn.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px;
}

.photos-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.photos-gallery img:hover {
    opacity: 0.8;
}

/* Videos Section */
.videos-section {
    background: rgba(255,255,255,0.75);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,230,0.18);
}

.videos-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 16px 0;
}

.videos-filter {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e4e6ea;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.video-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.video-item:hover {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: background-color 0.2s ease;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 12px 0;
}

.video-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.video-info p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

/* Check-ins Section */
.checkins-section {
    background: rgba(255,255,255,0.75);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,230,0.18);
}

.checkins-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 16px 0;
}

.checkins-filter {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e4e6ea;
}

.checkins-map {
    margin-bottom: 24px;
}

.map-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 200px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.map-placeholder i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.map-placeholder p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.checkins-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkin-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.checkin-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkin-icon {
    width: 40px;
    height: 40px;
    background: #1877f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.checkin-content {
    flex: 1;
}

.checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.checkin-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0;
}

.checkin-time {
    font-size: 13px;
    color: #65676b;
    white-space: nowrap;
}

.checkin-location {
    font-size: 13px;
    color: #65676b;
    margin: 0 0 8px 0;
}

.checkin-description {
    font-size: 15px;
    color: #1c1e21;
    margin: 0 0 12px 0;
    line-height: 1.33;
}

.checkin-photos {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.checkin-photos img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.checkin-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #f39c12;
    font-size: 14px;
}

.checkin-rating span {
    font-size: 14px;
    font-weight: 600;
    color: #1c1e21;
}

/* More Section */
.more-section {
    background: rgba(255,255,255,0.75);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(30, 41, 59, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(200,210,230,0.18);
}

.more-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    margin: 0 0 20px 0;
}

.more-categories {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.more-category {
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e4e6ea;
}

.category-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-header i {
    color: #1877f2;
}

.add-btn {
    background: #e4e6ea;
    color: #1c1e21;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-btn:hover {
    background: #d8dadf;
}

/* Life Events */
.life-events {
    padding: 16px 20px;
}

.life-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.life-event:last-child {
    border-bottom: none;
}

.event-icon {
    width: 40px;
    height: 40px;
    background: #1877f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.event-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 2px 0;
}

.event-content p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

/* Sports */
.sports-list {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.sport-item {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

.sport-item:hover {
    background: #e9ecef;
}

.sport-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.sport-item span {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    display: block;
    margin-bottom: 4px;
}

.sport-item p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

/* Music */
.music-list {
    padding: 16px 20px;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.music-item:last-child {
    border-bottom: none;
}

.music-item img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.music-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 2px 0;
}

.music-content p {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

/* Movies */
.movies-list {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.movie-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

.movie-item:hover {
    background: #e9ecef;
}

.movie-item img {
    width: 60px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
}

.movie-content {
    flex: 1;
}

.movie-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 4px 0;
}

.movie-content p {
    font-size: 13px;
    color: #65676b;
    margin: 0 0 8px 0;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.movie-rating i {
    color: #f39c12;
    font-size: 12px;
}

.movie-rating span {
    font-size: 13px;
    font-weight: 600;
    color: #1c1e21;
}

/* Books */
.books-list {
    padding: 16px 20px;
}

.book-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.book-item:last-child {
    border-bottom: none;
}

.book-item img {
    width: 50px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
}

.book-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 2px 0;
}

.book-content p {
    font-size: 13px;
    color: #65676b;
    margin: 0 0 4px 0;
}

.book-status {
    font-size: 12px;
    color: #1877f2;
    font-weight: 600;
    margin: 0 !important;
}

.comment-section {
    display: none;
}

/* Modal Styles for Profile Tabs */
.video-modal,
.location-modal,
.add-modal {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.location-modal{
    z-index: 99999;
    justify-self: anchor-center;
    align-self: center;
 }

.video-container {
    padding: 20px;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
}

.video-loading,
.video-error {
    background: #f5f5f5;
    height: 300px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
}

.video-loading i {
    font-size: 2em;
    margin-bottom: 10px;
}

.video-error {
    background: #fee;
    color: #c33;
}

.video-details {
    margin-top: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.video-meta {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: #666;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-placeholder {
    background: #000;
    height: 300px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-placeholder i {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.video-placeholder p {
    font-size: 16px;
    margin: 0;
    opacity: 0.8;
}

.video-actions {
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
    border-top: 1px solid #e4e6ea;
}

.video-action-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #65676b;
    transition: background-color 0.2s ease;
}

.video-action-btn:hover {
    background: #f2f3f5;
}

.location-content {
    padding: 20px;
}

.location-map {
    margin-bottom: 20px;
}

.location-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 8px 0;
}

.location-info p {
    font-size: 15px;
    color: #65676b;
    margin: 0 0 16px 0;
}

.location-actions {
    display: flex;
    gap: 12px;
}

.location-btn {
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.location-btn:hover {
    background: #166fe5;
}

.add-modal {
    padding: 20px;
}

.add-modal h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 16px 0;
}

.add-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-form input,
.add-form select,
.add-form textarea {
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    font-family: inherit;
}

.add-form input:focus,
.add-form select:focus,
.add-form textarea:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.form-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-actions button[type="button"] {
    background: #e4e6ea;
    color: #1c1e21;
}

.form-actions button[type="button"]:hover {
    background: #d8dadf;
}

.form-actions button[type="submit"] {
    background: #1877f2;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: #166fe5;
}

/* Create Post Form Elements */
.quick-post-btn {
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-left: 12px;
}

.quick-post-btn:hover {
  background: #166fe5;
}

.quick-post-btn:disabled {
  background: #e4e6ea;
  color: #bcc0c4;
  cursor: not-allowed;
}

.quick-post-form {
  width: 100%;
}

.quick-post-location {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f0f2f5;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selected-location-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1877f2;
  font-weight: 600;
}

.clear-location-btn {
  background: none;
  border: none;
  color: #65676b;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-location-btn:hover {
  background: #e4e6ea;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e4e6ea;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1c1e21;
}

.modal-close {
  background: #e4e6ea;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: #65676b;
}

.modal-close:hover {
  background: #d8dadf;
}

.modal-body {
  padding: 16px 20px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.author-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1c1e21;
}

.privacy-selector select {
  background: #e4e6ea;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  color: #65676b;
  cursor: pointer;
}

.post-textarea-container {
  margin-bottom: 16px;
}

#post-content {
  width: 100%;
  min-height: 120px;
  border: none;
  outline: none;
  resize: none;
  font-size: 24px;
  font-family: inherit;
  color: #1c1e21;
  line-height: 1.34;
}

#post-content::placeholder {
  color: #65676b;
}

.post-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #e4e6ea;
  border-radius: 8px;
  margin-bottom: 16px;
}

.post-options span {
  font-size: 15px;
  font-weight: 600;
  color: #65676b;
}

.options-icons {
  display: flex;
  gap: 8px;
}

.option-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #42b883;
  font-size: 20px;
  transition: background-color 0.2s ease;
}

.option-btn:hover {
  background: #f0f2f5;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e4e6ea;
}

.post-btn {
  width: 100%;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.post-btn:hover {
  background: #166fe5;
}

.post-btn:disabled {
  background: #e4e6ea;
  color: #bcc0c4;
  cursor: not-allowed;
}

.modal-overlay {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .profile-content {
        grid-template-columns: 320px 1fr;
        padding: 0 16px;
    }
}

@media (max-width: 992px) {
    .profile-content {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
    
    .profile-left {
        order: 2;
    }
    
    .profile-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    .profile-info-left {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
        margin-top: -60px;
    }
    
    .profile-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cover-photo {
        height: 200px;
    }
    
    .profile-nav {
        padding: 0 16px;
        overflow-x: auto;
    }
    
    .profile-nav-left {
        white-space: nowrap;
    }
    
    .friends-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .profile-content {
        padding: 0 8px;
    }
    
    .cover-section,
    .profile-nav {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .profile-header {
        padding: 20px 16px 16px;
    }
    
    .friends-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Feeling Display Styles for Profile Post Creation */
.quick-post-feeling-display {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f0f2f5;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: none;
}

.quick-post-feeling-display.active {
    display: block;
}

.quick-feeling-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1c1e21;
}

.quick-feeling-emoji {
    font-size: 16px;
}

.quick-feeling-text {
    font-weight: 500;
}

.quick-feeling-remove {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    color: #8a8d91;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.quick-feeling-remove:hover {
    background-color: #e4e6ea;
}

/* Media Upload and Management Styles */

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.btn-upload-media {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-upload-media:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Photo Gallery Styles */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.photo-item:hover img {
    transform: scale(1.02);
}

.photo-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-item:hover .photo-actions {
    opacity: 1;
}

.btn-photo-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-photo-action:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 16px 12px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-stats {
    display: flex;
    gap: 16px;
    color: white;
    font-size: 14px;
}

.photo-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Video Grid Styles */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.video-item {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.02);
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.2s ease;
}

.video-item:hover .video-overlay {
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.video-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-item:hover .video-actions {
    opacity: 1;
}

.btn-video-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-video-action:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-info {
    padding: 12px;
}

.video-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

/* No Media Message */
.no-media-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.no-media-message i {
    font-size: 64px;
    margin-bottom: 16px;
    color: var(--border);
}

.no-media-message h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text);
}

.no-media-message p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* Modal Styles */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content.modal-large {
    max-width: 90vw;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--chip);
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Upload Area */
.upload-area {
    margin-bottom: 20px;
}

.upload-placeholder {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-placeholder:hover {
    border-color: var(--accent);
    background: rgba(66, 153, 225, 0.1);
}

.upload-placeholder i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.upload-placeholder p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.preview-container {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--chip);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-glass);
}

/* Photo/Video Viewer */
.photo-viewer,
.video-viewer {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-height: 80vh;
}

.photo-display,
.video-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.photo-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.video-display video {
    width: 100%;
    height: auto;
    max-height: 100%;
    background: #000;
}

/* Video loading states */
.video-display video[poster] {
    object-fit: contain;
}

.video-display video:focus {
    outline: none;
}

.video-display {
    min-height: 300px;
}

.photo-details,
.video-details {
    padding: 16px 0;
}

.photo-author,
.video-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.photo-author img,
.video-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.photo-author h4,
.video-author h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.photo-author span,
.video-author span {
    font-size: 13px;
    color: var(--muted);
}

.photo-caption,
.video-description {
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.4;
}

.video-title-display {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.video-stats {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.photo-interactions,
.video-interactions {
    display: flex;
    gap: 16px;
}

.btn-like,
.btn-comment {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-like:hover,
.btn-comment:hover {
    background: var(--chip);
    color: var(--text);
}

.btn-like.liked {
    color: #e41e3f;
}

.btn-like.liked:hover {
    color: #c41230;
}

/* Responsive Design */
@media (max-width: 768px) {
    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .photo-viewer,
    .video-viewer {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-content.modal-large {
        max-width: 95vw;
        margin: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-upload-media {
        justify-content: center;
    }
}