 
 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #0a0a0a, #121212);
  color: #f1f1f1;  background: linear-gradient(180deg, #0a0a0a, #121212);
  color: #f1f1f1;
    padding-bottom: 60px;
}

.container {
    max-width: 935px;
    margin: 0 auto;
  background: transparent;
}

/* Mobile Header */
.mobile-header {
    
    display: flex;
    align-items: center;
  justify-content: center;
  position: relative;
      padding: 8px 16px;
    background: white;
    border-bottom: 1px solid #dbdbdb;
}

.mobile-header svg:first-child {
  position: absolute;
  left: 16px;
}

.mobile-header svg:last-child {
  position: absolute;
  right: 16px;
}
.username-header {
    display: flex;
    align-items: center;
    gap: 4px;
  font-size: 17px;
  font-weight: 600;}

.icon {
    width: 24px;
    height: 24px;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.cursor-pointer {
    cursor: pointer;
}

/* Profile Header */
.profile-header {
    display: flex;
    padding: 16px;
  align-items: center;
  gap: 16px;
}

.profile-picture-wrapper {
    flex-shrink: 0;
}

.profile-picture-gradient {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.profile-picture-gradient img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-actions-row {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.username {
    font-size: 20px;
    font-weight: 300;
}

.btn-secondary {
    padding: 7px 16px;
    background: #262626;
      color: #f1f1f1;

    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #2f2f2f;
}

.btn-text {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

/* Profile Stats */
.profile-stats {
    display: none;
    gap: 40px;
    margin-bottom: 20px;
}

.stat {
    font-size: 16px;
}

.stat-number {
    font-weight: 600;
    margin-right: 4px;
}

.profile-bio {
    display: none;
}

.bio-name {
    font-weight: 600;
    font-size: 14px;
}

.bio-text {
  font-size: 13.5px;
  line-height: 1.35;
  opacity: .9;
      margin-top: 4px;
    white-space: pre-line;
}

.bio-link {
    color: #00376b;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: block;
    margin-top: 4px;
}

/* Mobile Stats */
.mobile-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #dbdbdb;
    border-bottom: 1px solid #dbdbdb;
}

.stat-mobile {
    text-align: center;
}

.stat-number-mobile {
    font-weight: 600;
    font-size: 14px;
}

.stat-label-mobile {
    color: #8e8e8e;
    font-size: 13px;
}

/* Mobile Bio */
.mobile-bio {
    padding: 12px 16px;
}

 
.flex-1 {
    flex: 1;
}

/* Story Highlights */
.highlights-section {
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
}

.highlights-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.highlights-container::-webkit-scrollbar {
    display: none;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.highlight-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #dbdbdb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.highlight-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-highlight {
    background: white;
}

.add-highlight svg {
    color: #8e8e8e;
}

.highlight-title {
    font-size: 12px;
    text-align: center;
    width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabs */
.tabs {
    display: flex;
  border-top: none;
  border-bottom: 1px solid #262626;}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
      opacity: .6;

    padding: 10px 0;
    border: none;
    border-top: 1px solid transparent;
    background: none;
    color: #8e8e8e;
    cursor: pointer;
}

.tab.active {
    border-top-color: #262626;
    color: #262626;
      opacity: 1;

}

.tab-icon {
    width: 20px;
    height: 20px;
}

.tab-label {
  display: none !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.tab.active .tab-icon {
    stroke-width: 2.5;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.overlay-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
}

.overlay-stat svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 2px solid #262626;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.empty-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 8px;
}

.empty-subtitle {
    color: #8e8e8e;
    font-size: 14px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
  background: rgba(0,0,0,.95);
  border-top: 1px solid #262626;
    padding: 8px 0;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-btn.active .nav-avatar {
    border: 2px solid #262626;
}

 

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.avatar-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.avatar-edit img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #8e8e8e;
    font-size: 13px;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #dbdbdb;
    outline: none;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #262626;
}

.form-group textarea {
    resize: none;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #8e8e8e;
    margin-top: 4px;
}

/* Post Modal */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
}

.post-modal-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.post-image-section {
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.post-image-section img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.post-details-section {
    display: flex;
    flex-direction: column;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #efefef;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-username {
    font-weight: 600;
    font-size: 14px;
        color: #222; /* texto escuro para fundo branco */

}

.post-caption {
    padding: 16px;
    display: flex;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}

.post-caption p {
    font-size: 14px;
        color: #222; /* texto escuro para fundo branco */

}

.post-date {
    color: #8e8e8e;
    font-size: 12px;
    margin-top: 4px;
}
 
.add-comment {
    display: flex;
    padding: 8px 16px;
    border-top: 1px solid #efefef;
}

.add-comment input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
}

.add-comment button {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    cursor: pointer;
}

.post-actions {
    padding: 16px;
    border-top: 1px solid #efefef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.action-icons {
    display: flex;
    gap: 16px;
}

.action-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.action-icon.liked {
    fill: #ed4956;
    stroke: #ed4956;
}

.action-icon.saved {
    fill: #262626;
}

.likes-count {
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

.post-time {
    color: #8e8e8e;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .profile-header {
        padding: 32px 0;
        gap: 80px;
    }

    .profile-picture-gradient {
        width: 150px;
        height: 150px;
    }

    .profile-actions-row {
        display: flex;
    }

    .profile-stats {
        display: flex;
    }
.stat-number-mobile {
  font-size: 15px;
  font-weight: 600;
}

.stat-label-mobile {
  font-size: 12px;
  opacity: .7;
}

    .profile-bio {
        display: block;
    }

    .mobile-stats,
    .mobile-bio,
 
    .bottom-nav {
        display: none;
    }

  
    .photo-grid {
        gap: 4px;
    }

    .tab-label {
        display: inline;
    }

    .post-modal-content {
        flex-direction: row;
        max-height: 90vh;
    }

    .post-image-section {
        flex: 1;
        min-height: 500px;
    }

    .post-image-section img {
        max-height: 90vh;
    }

    .post-details-section {
        width: 340px;
    }
}



/* MOBILE: foto + stats lado a lado */
@media (max-width: 767px) {

  .profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .profile-info {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  /* mostra stats no mobile */
  .profile-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
  }

  /* esconde stats antigos */
  .mobile-stats {
    display: none;
  }

  .stat {
    text-align: center;
    font-size: 13px;
        color: #f1f1f1;

  }

  .stat span {
    display: block;
  }
  .stat-number {
    display: block;
    font-size: 15px;
        margin-bottom: 2px;

    font-weight: 600;
  }
}   



html,
body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* GRID MOBILE */
@media (max-width: 767px) {

  .container {
    width: 100%;
    overflow-x: hidden;
  }

  .photo-grid {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }

  .photo-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #111;
  }

  .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: 0.3s ease;
  }

  /* evita distorção nas imagens do perfil */
  .profile-picture-gradient {
    width: 90px;
    height: 90px;
    min-width: 90px;
    min-height: 90px;
  }

  .profile-picture-gradient img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* modal da imagem */
  .post-modal-content {
    width: 100%;
    height: auto;
    max-height: 100vh;
    border-radius: 0;
  }

  .post-image-section {
    width: 100%;
    min-height: auto;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
  }

  .post-image-section img {
    width: 100%;
    height: 100%;
    max-height: 60vh;
    object-fit: contain;
  }

  /* highlights */
  .highlight-circle {
    width: 68px;
    height: 68px;
    overflow: hidden;
  }

  .highlight-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* evita imagens estourando lateral */
  .profile-header,
  .highlights-section,
  .tabs,
  .photo-grid {
    max-width: 100vw;
    overflow-x: hidden;
  }
}
 
 .btn-follow{
    padding: 8px 22px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg,#ff0066,#ff3d00);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s ease;
}

.btn-follow:hover{
    transform: scale(1.04);
    opacity: .92;
}

.btn-follow.following{
    background: #262626;
    color: #f1f1f1;
}

/* mobile */
@media (max-width:767px){

    .profile-actions-row{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
    }

    .btn-follow{
        padding: 8px 18px;
        font-size: 13px;
    }
}


/* posts privados */
.private-post img{
    filter: blur(7px) brightness(.7);
    transform: scale(1.05);
}

/* cadeado no post privado */
.private-post::after{
    content:'🔒';
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    font-size:40px;
    z-index:2;
}

/* necessário */
.photo-item{
    position:relative;
    overflow:hidden;
}