body { margin:0; font-family: Segoe UI, Helvetica, Arial, sans-serif; background:#18191a; color:#e4e6eb; overflow-x: hidden; }

/* HEADER */
.header { background:#242526; border-bottom:1px solid #3a3b3c; position: relative; }
.cover { height:180px; background:linear-gradient(135deg,#3b5998,#192f6a); transition: opacity 0.3s ease; }

button, .action-item, .story-trigger {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus, .action-item:focus, .story-trigger:focus { outline: none; }

.menu-btn {
  position: absolute; top: 10px; right: 15px; z-index: 1001;
  background: rgba(0,0,0,0.3); border: none; padding: 10px; border-radius: 50%;
  cursor: pointer; color: white; display: flex; align-items: center; justify-content: center;
}

/* ==================== MENU HAMBÚRGUER (CARD) ==================== */
.contact-dropdown {
  position: absolute;
  top: 55px;
  right: 15px;
  width: 280px;
  background: #242526;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}
.contact-dropdown.active {
  display: flex;
}
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #2c2d2f;
  border-bottom: 1px solid #3a3b3c;
  font-weight: bold;
}
.close-dropdown {
  background: none;
  border: none;
  color: #b0b3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.close-dropdown:hover {
  background: #3a3b3c;
}
.contact-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b0b3b8;
  font-size: 14px;
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.contact-item:hover {
  background: #3a3b3c;
}

/* ==================== SEÇÃO DE AUTENTICAÇÃO (DENTRO DO MENU) ==================== */
#auth-section {
  margin-top: 8px;
  border-top: 1px solid #3a3b3c;
  padding-top: 8px;
}
.auth-button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  color: #e4e6eb;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.auth-button:hover {
  background: #3a3b3c;
}
.auth-button.delete {
  color: #e44;
}

.profile {
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin-top: -40px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  background: #242526;
  border-radius: 12px 12px 0 0;
}
.story-ring, .story-ring-sm {
  padding:3px; border-radius:50%;
  background: linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
  display: inline-flex; cursor: pointer;
}
.story-ring-sm { padding: 2px; margin-right: 10px; }
.viewed { background: #3a3b3c !important; }
.avatar { width:90px; height:90px; border-radius:50%; background:#333; border:4px solid #242526; transition: all 0.3s ease; }
.post-avatar { width:36px; height:36px; border-radius:50%; background:#333; border: 2px solid #242526; }

.info { margin-left:15px; flex-grow: 1; transition: all 0.3s ease; }
.info h1 { margin:0; font-size:20px; transition: font-size 0.3s ease; }
.info p { margin:2px 0; color:#b0b3b8; font-size:14px; transition: opacity 0.3s ease, visibility 0.3s ease; }
.btn-seguir { padding:8px 16px; border-radius:6px; border:none; background:#2374e1; color:white; cursor:pointer; font-weight: 600; margin-top: 8px; transition: all 0.3s ease; }

.tabs {
  display: flex;
  gap: 15px;
  padding: 10px 15px;
  margin-top: 10px;
  background: #242526;
  transition: all 0.3s ease;
}
.tab { color:#b0b3b8; cursor: pointer; padding-bottom: 5px; transition: color 0.2s; }
.tab.active { color:#2374e1; font-weight:bold; border-bottom: 2px solid #2374e1; }

/* Estilos quando a página está rolada */
body.header-scrolled .cover {
  opacity: 0;
  visibility: hidden;
}
body.header-scrolled .profile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  padding: 8px 15px;
  border-radius: 0;
  z-index: 1002;
  background: #242526;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
body.header-scrolled .profile .avatar {
  width: 40px;
  height: 40px;
}
body.header-scrolled .profile .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: 12px;
  flex: 1;
}
body.header-scrolled .profile .info h1 {
  font-size: 16px;
  margin: 0;
}
body.header-scrolled .profile .info p {
  display: none;
}
body.header-scrolled .profile .btn-seguir {
  margin-top: 0;
  padding: 6px 14px;
  font-size: 13px;
}
body.header-scrolled .tabs {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  justify-content: center;
  background: #242526;
  z-index: 1001;
  margin-top: 0;
  padding: 8px 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
body.header-scrolled .feed {
  padding-top: 92px;
}

/* FEED */
.feed { padding:15px; max-width: 500px; margin: 0 auto; transition: padding-top 0.3s ease; }
.post { background:#242526; padding:15px; border-radius:10px; margin-bottom:15px; }
.post-header { display:flex; align-items:center; margin-bottom:10px; }
.post-content p { line-height: 1.5; font-size: 15px; margin-bottom: 10px; }
blockquote {
  margin: 15px 0; padding: 10px 15px;
  border-left: 3px solid #54a3e5; background: rgba(84, 163, 229, 0.08);
  border-radius: 4px; font-style: italic; color: #d1d1d1;
}
.post-footer { margin-top: 15px; font-size: 12px; color: #8a8d91; border-top: 1px solid #3a3b3c; padding-top: 10px; }
.post-content img { width:100%; border-radius:8px; margin-top:10px; }

/* BARRA DE AÇÕES */
.actions-bar {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid #3a3b3c;
}
.action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b0b3b8;
  cursor: pointer;
  font-size: 14px;
}
.icon-svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* MODAL STORY */
.story-modal {
  position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.95);
  display:none; align-items:center; justify-content:center; z-index:2000;
  user-select: none;
  -webkit-touch-callout: none;
}
.story-modal.active { display:flex; }
.story-progress {
  position: absolute; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(45deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
  transition: width linear;
}
.close-story-btn {
  position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.6);
  border: none; border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2001;
  color: white; font-size: 24px; font-weight: bold;
}
.story-content { text-align: center; color: white; pointer-events: none; }

/* MODAL DE COMENTÁRIOS */
.comments-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); display: flex; align-items: flex-end; justify-content: center;
  z-index: 3000; visibility: hidden; opacity: 0; transition: visibility 0.2s, opacity 0.2s;
}
.comments-modal.active {
  visibility: visible; opacity: 1;
}
.comments-modal-content {
  background: #242526; width: 100%; max-width: 500px; height: 85%;
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.3s ease-out;
}
.comments-modal.active .comments-modal-content {
  transform: translateY(0);
}
.comments-modal-header {
  padding: 16px; border-bottom: 1px solid #3a3b3c; display: flex;
  justify-content: space-between; align-items: center;
}
.comments-modal-header h3 { margin: 0; font-size: 18px; }
.close-comments-modal {
  background: none; border: none; color: #e4e6eb; font-size: 24px;
  cursor: pointer; padding: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s;
}
.close-comments-modal:hover { background: #3a3b3c; }
.comments-list-container {
  flex: 1; overflow-y: auto; padding: 16px;
}
.comment-item {
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #3a3b3c;
}
.comment-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-author { font-weight: bold; font-size: 13px; }
.comment-time { font-size: 11px; color: #b0b3b8; }
.comment-text { font-size: 14px; margin: 6px 0; word-break: break-word; }
.comment-actions {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  margin-top: 8px; gap: 8px;
}
.like-buttons {
  display: flex; gap: 12px; align-items: center;
}
.like-btn, .dislike-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: #b0b3b8; cursor: pointer;
  font-size: 12px; padding: 4px 6px; border-radius: 6px;
  transition: background 0.2s;
}
.like-btn:hover, .dislike-btn:hover {
  background: #3a3b3c;
}
.like-btn svg, .dislike-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
}
.reply-btn {
  background: none; border: none; color: #b0b3b8; cursor: pointer;
  font-size: 12px; padding: 4px 6px; border-radius: 6px;
}
.reply-btn:hover {
  background: #3a3b3c;
}
.replies-container {
  margin-left: 24px; margin-top: 12px; border-left: 2px solid #3a3b3c;
  padding-left: 12px;
}
.reply-item {
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #3a3b3c;
}
.reply-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
}
.reply-text { font-size: 13px; margin: 4px 0; word-break: break-word; }
.reply-actions {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  margin-top: 6px; gap: 8px;
}
.reply-like-buttons {
  display: flex; gap: 12px; align-items: center;
}
.toggle-replies {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #b0b3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  margin-top: 8px;
  border-radius: 16px;
  transition: background 0.2s;
}
.toggle-replies:hover {
  background: #3a3b3c;
}
.toggle-replies svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform 0.2s;
}
.new-comment-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #3a3b3c;
  background: #242526;
}
.new-comment-form textarea,
.reply-form-inline textarea {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: none;
  background: #3a3b3c;
  color: #e4e6eb;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
  line-height: 1.4;
  overflow: hidden;
  transition: height 0.1s ease;
}
.new-comment-form textarea:focus,
.reply-form-inline textarea:focus {
  outline: none;
  background: #4a4b4c;
}
.new-comment-form button {
  background: #2374e1;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
}
.reply-form-inline {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ==================== MODAL DE NOME ==================== */
.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: 4000;
}
.modal-content {
  background: #242526;
  padding: 24px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.modal-content input {
  width: 100%;
  padding: 8px;
  margin: 12px 0;
  border-radius: 20px;
  border: none;
  background: #3a3b3c;
  color: #e4e6eb;
  font-size: 14px;
}
.modal-content button {
  background: #2374e1;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.action-item.liked svg {
    stroke: #2374e1;
    fill: #2374e1;
}

.action-item.liked svg {
    stroke: #2374e1;
    fill: #2374e1;
}

.vote-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.like-comment, .dislike-comment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #b0b3b8;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.like-comment:hover, .dislike-comment:hover {
    background: #3a3b3c;
}

.like-comment svg, .dislike-comment svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
}

.like-comment.active svg {
    stroke: #2374e1;
    fill: #2374e1;
}

.dislike-comment.active svg {
    stroke: #e44;
    fill: #e44;
}
