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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #0d0d0d;
  font-family: 'Inter', sans-serif;
  color: #efeff1;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #18181b;
  border-bottom: 1px solid #ffffff10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
}

.nav-brand {
  font-weight: 900;
  font-size: 1rem;
  color: #bf5af2;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.btn-twitch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: #9146ff;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-twitch:hover {
  background: #772ce8;
  transform: scale(1.05);
}

.clips-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 1.5rem 2rem;
}

.clips-container h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.clips-subtitle {
  color: #ffffff66;
  margin-bottom: 2rem;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.loading {
  text-align: center;
  color: #ffffff44;
  padding: 3rem;
}

/* Lista de clipes */
.clips-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.clip-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #1f1f23;
  border: 1px solid #ffffff10;
  border-radius: 10px;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clip-row:hover {
  border-color: #bf5af2;
  background: #2a2a30;
  box-shadow: 0 4px 15px #bf5af222;
}

.clip-row-thumb {
  position: relative;
  width: 160px;
  min-width: 160px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
}

.clip-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-row-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: #00000044;
  opacity: 0;
  transition: opacity 0.2s;
}

.clip-row:hover .clip-row-play {
  opacity: 1;
}

.clip-row-info {
  flex: 1;
  min-width: 0;
}

.clip-row-info h3 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-row-info p {
  font-size: 0.75rem;
  color: #ffffff66;
}

.clip-creator {
  color: #bf5af2;
  font-weight: 700;
}

.clip-meta {
  margin-top: 0.2rem;
}

.clip-row-duration {
  font-size: 0.75rem;
  color: #ffffff44;
  padding: 0.3rem 0.6rem;
  background: #ffffff08;
  border-radius: 4px;
  white-space: nowrap;
}

/* Modal */
.clip-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clip-modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: #000000dd;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: #1f1f23;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ffffff15;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 0.7;
}

.modal-content iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.modal-info {
  padding: 1rem 1.2rem;
}

.modal-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.modal-info p {
  font-size: 0.8rem;
  color: #ffffff66;
}

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