@charset "UTF-8";

:root {
  --primary: #2b7cff;
  --bg: #0f0f12;
  --card-bg: #16161a;
  --text: #e0e0e0;
  --border: #242427;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--card-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; gap: 20px; }
.header h1 { margin: 0; font-size: 24px; color: #fff; font-weight: 800; letter-spacing: -0.5px; display:flex; align-items:center; gap:10px; }
.site-logo-img { max-height: 80px; display:block; }
.site-logo-text { display:none; }
.header svg { width: 28px; height: 28px; fill: currentColor; }
#translateToggle,
.menu-toggle {
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.1); }
.menu-close-btn { display: none; }

/* Navigation */
.nav { margin: 0; }
.menu { display: flex; flex-wrap: wrap; }
.menu > li > a { display: block; padding: 15px 20px; color: #d0d0d7; font-weight: 500; font-size: 16px; text-decoration: none; transition: color 0.2s; display:flex; align-items:center; }
.menu > li > a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.has-sub { position: relative; }
.cat-arrow { width: 18px; height: 18px; vertical-align: middle; margin-left: 4px; opacity: 0.9; fill: currentColor; }

/* Search */
.search-container { flex: 1; max-width: 600px; position: relative; display: flex; align-items: center; gap: 15px; }
.search-input { width: 100%; background: #0f0f12; border: 1px solid #2a2a2e; padding: 10px 15px; border-radius: 8px; color: #fff; font-size: 15px; transition: border-color 0.2s; outline: none; }
.search-input:focus { border-color: var(--primary); }
.sort-controls { display: flex; gap: 15px; font-size: 13px; color: #aaa; white-space: nowrap; }
.sort-option { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.sort-option input { accent-color: var(--primary); cursor: pointer; }

/* Layout */
.main-layout { max-width: 1400px; margin: 0 auto; padding: 20px; display: flex; gap: 20px; align-items: flex-start; }

/* Sidebar */
.ad-sidebar { width: 300px; display: flex; flex-direction: column; gap: 20px; flex-shrink: 0; position: sticky; top: 90px; }
.ad-slot, .lazy-ad-slot { background: #1a1a1e; border: 1px solid #2a2a2e; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; color: #444; font-size: 12px; overflow: hidden; }
.ad-sidebar .ad-slot, .ad-sidebar .lazy-ad-slot { width: 300px; height: 250px; }
.ad-sidebar .ad-slot img, .ad-sidebar .lazy-ad-slot img { width: 300px !important; height: 250px !important; object-fit: contain; display: block; }

/* Cards Grid */
.cards-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; width: 100%; }

/* Card */
.card { background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; position: relative; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.4); border-color: #3a3a3e; }
.rank-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.8); color: #fff; padding: 4px 8px; border-radius: 6px; font-weight: bold; font-size: 14px; z-index: 20; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); }
.rank-1 { background: linear-gradient(135deg, #ffd700, #e6ac00); color: #000; border: none; box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3); }
.rank-2 { background: linear-gradient(135deg, #e0e0e0, #bdbdbd); color: #000; border: none; box-shadow: 0 2px 10px rgba(224, 224, 224, 0.3); }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a0522d); color: #fff; border: none; box-shadow: 0 2px 10px rgba(205, 127, 50, 0.3); }

/* Media */
.media { width: 100%; aspect-ratio: 1/1; background: #000; position: relative; overflow: hidden; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Video Facade */
.video-facade {
  width: 100%;
  height: 100%;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.2s, background 0.2s;
  z-index: 2;
}
.play-button::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
  margin-left: 4px;
}
.video-facade:hover .play-button {
  transform: scale(1.1);
  background: rgba(43, 124, 255, 0.8);
}
.video-facade span {
  position: absolute;
  bottom: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Info */
.info { padding: 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-header-flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.info h2 { margin: 0; font-size: 18px; line-height: 1.3; color: #fff; font-weight: 600; }
.info h2 a { text-decoration: none; color: inherit; }
.info h2 a:hover { color: var(--primary); text-decoration: underline; }
.category { display: inline-block; font-size: 13px; color: #4da3ff; background: rgba(43,124,255,0.1); padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(43,124,255,0.2); font-weight: 600; }
.category a { color: inherit; text-decoration: none; }
.category:hover { background: rgba(43,124,255,0.2); border-color: #6bbaff; color: #6bbaff; }
.desc { font-size: 14px; color: #a0a0a5; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 3; box-orient: vertical; }
.read-more-btn { color: var(--primary); font-size: 13px; cursor: pointer; display: inline-block; margin-top: 4px; }
.read-more-btn:hover { text-decoration: underline; }

/* Rating */
.rating-container { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding-top: 10px; border-top: 1px solid #242427; }
.stars { display: flex; gap: 2px; cursor: pointer; }
.star { font-size: 20px; color: #444; transition: color 0.2s; }
.star.filled { color: #ffd700; }
.rating-text { font-size: 13px; color: #888; }
.total-score { color: #fff; font-weight: bold; }
.user-vote-msg { font-size: 12px; height: 16px; margin-top: 2px; }

/* Links */
.links-title { font-size: 14px; color: #b0b0b5; margin: 10px 0 5px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; border-top: 1px solid #242427; padding-top: 10px; }
.links { display: flex; flex-direction: column; gap: 8px; }
.link-item { display: flex; justify-content: space-between; align-items: center; background: #1a1a1e; padding: 8px 12px; border-radius: 6px; border: 1px solid #2a2a2e; transition: background 0.2s; cursor: pointer; }
.link-item:hover { background: #222226; border-color: #3a3a3e; }
.link-meta { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.link-meta .icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: rgba(255,255,255,0.05); font-size: 14px; }
.link-meta .name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e0e0e0; }
.ext { font-size: 13px; color: #4da3ff; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.ext:hover { text-decoration: underline; color: #6bbaff; }
.ext::after { content: '↗'; font-size: 14px; }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content { background: #16161a; width: 90%; max-width: 500px; border-radius: 12px; border: 1px solid #2a2a2e; overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-header { padding: 15px 20px; border-bottom: 1px solid #2a2a2e; display: flex; justify-content: space-between; align-items: center; background: #1a1a1e; }
.modal-header h3 { margin: 0; font-size: 18px; }
.close-modal { font-size: 24px; cursor: pointer; color: #888; }
.close-modal:hover { color: #fff; }
.desc-modal-content { overflow-y: auto; color: #ccc; }

/* Chat */
.chat-messages { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: #333 #16161a; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.chat-msg { background: #1f1f23; padding: 10px; border-radius: 8px; border: 1px solid #2a2a2e; }
.chat-msg-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: #888; }
.chat-msg-header strong { color: var(--primary); font-size: 13px; }
.chat-msg-content { font-size: 14px; line-height: 1.4; word-break: break-word; }
.chat-input-area { padding: 15px; border-top: 1px solid #2a2a2e; display: flex; gap: 10px; background: #1a1a1e; }
.chat-input-area input { flex: 1; background: #0f0f12; border: 1px solid #2a2a2e; border-radius: 20px; padding: 8px 15px; color: #fff; outline: none; }
.chat-input-area input:focus { border-color: var(--primary); }
.chat-input-area button { background: var(--primary); color: #fff; border: none; padding: 0 20px; border-radius: 20px; cursor: pointer; font-weight: 600; }
.chat-setup { padding: 30px; text-align: center; }
.chat-setup input { display: block; width: 100%; margin: 15px 0; padding: 10px; background: #0f0f12; border: 1px solid #2a2a2e; border-radius: 6px; color: #fff; }
.chat-setup button { background: var(--primary); color: #fff; border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; }
.chat-action { display: flex; align-items: center; gap: 4px; cursor: pointer; color: #888; font-size: 12px; transition: color 0.2s; padding: 4px 8px; border-radius: 4px; }
.chat-action:hover { background: rgba(255,255,255,0.05); color: #ccc; }
.chat-action.liked { color: #eac452; }
.chat-action svg { fill: currentColor; }
.chat-msg-actions { display: flex; gap: 10px; margin-top: 8px; border-top: 1px solid #2a2a2e; padding-top: 6px; }

/* Chat Icon */
.chat-icon:hover { color: var(--primary); }

/* Submenu */
.submenu { display: none; position: absolute; top: 100%; left: 0; background: #16161a; border: 1px solid #242427; border-radius: 8px; padding: 15px; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 200; }
.has-sub:hover .submenu { display: block; }
.subgroup { margin-bottom: 5px; }
.subgroup a.cat { display: block; padding: 8px 12px; color: #c0c0c7; text-decoration: none; font-size: 14px; border-radius: 4px; transition: background 0.2s, color 0.2s; }
.subgroup a.cat:hover { background: rgba(255,255,255,0.05); color: #fff; }
.subitems { display: flex; flex-direction: column; padding-left: 15px; border-left: 1px solid #333; margin-top: 5px; }
.subitems a { font-size: 14px; padding: 5px 0; color: #aaa; }
.subitems a:hover { color: #fff; background: none; }

/* Contact Page */
.contact-page { display: flex; justify-content: center; width: 100%; }
.contact-card { background: var(--card-bg); padding: 40px; border-radius: 12px; border: 1px solid var(--border); max-width: 600px; width: 100%; text-align: center; }
.contact-label { color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 15px; }
.contact-card h2 { font-size: 32px; color: #fff; margin: 0 0 20px; font-weight: 800; }
.contact-subtitle { color: #a0a0a5; font-size: 16px; line-height: 1.6; margin-bottom: 30px; }
.contact-email { background: rgba(43,124,255,0.05); padding: 20px; border-radius: 12px; border: 1px dashed rgba(43,124,255,0.3); display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: #fff; transition: background 0.2s; }
.contact-email:hover { background: rgba(43,124,255,0.1); }
.contact-email a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-note { margin-top: 30px; font-size: 13px; color: #666; }

/* Fade In */
.fade-in-section { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; will-change: opacity, visibility; }
.fade-in-section.is-visible { opacity: 1; transform: none; }

/* Carousel */
.carousel { position: relative; }
.carousel-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: opacity 0.5s; }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: #fff; border: none; font-size: 24px; padding: 10px; cursor: pointer; z-index: 10; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,0.8); }

/* Footer */
.site-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  color: #a0a0a5;
  text-align: center;
  margin-top: 40px;
}

.site-footer p {
  margin: 5px 0;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 5px;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .header { padding: 10px 15px; }
  .header h1 { font-size: 20px; }
  .menu { display: none; width: 100%; flex-direction: column; background: var(--card-bg); position: absolute; top: 100%; left: 0; border-bottom: 1px solid var(--border); box-shadow: 0 10px 20px rgba(0,0,0,0.5); padding: 10px 0; }
  .menu.active { display: flex; }
  .menu-toggle { display: inline-flex; }
  .search-container { display: none; }
  .main-layout { flex-direction: column; padding: 10px; gap: 30px; }
  .ad-sidebar { width: 100%; align-items: center; position: static; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 40px; }
  .ad-slot { width: 300px; }
  .has-sub:hover .submenu { position: static; box-shadow: none; border: none; padding-left: 20px; background: rgba(0,0,0,0.2); display: none; }
  .has-sub.active .submenu { display: block; }
}

@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  /* Show ads on mobile/tablet up to 1024px? 
     Wait, user said "apartir de 769". So < 769 shows ads. >= 769 NO ads.
     But previous code had max-width: 1024px for .mobile-ad-wrapper display:flex.
     Let's adjust this. 
  */
}

@media (min-width: 769px) {
    .mobile-ad-wrapper { display: none !important; }
}

@media (max-width: 768px) {
   .mobile-ad-wrapper { display: flex !important; grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
}
