/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Use global body styles from ../style.css for consistency */

/* Topbar */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-left .profile-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff2;
}
.topbar-left .name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.topbar-center .nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.topbar-center .nav-links li a {
  color: #ccc;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
}
.topbar-center .nav-links li a:hover,
.topbar-center .nav-links li a.active {
  color: var(--accent);
}
.topbar-center .nav-links i {
  font-size: 1rem;
}
.topbar-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.topbar-right .social-link {
  color: white;
  background: #2a2a2e;
  padding: 0.5rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.topbar-right .social-link:hover {
  background: var(--hover);
  transform: scale(1.1);
}

/* Auth Button */
.auth-button {
  background-color: #9146ff;
  color: #fff;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-button:hover {
  background-color: #7a34d6;
}

/* User Info Dropdown */
.user-dropdown {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0.5rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #9146ff;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  right: 0;
  background: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 1000;
}

.dropdown-menu a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
}

.dropdown-menu a:hover {
  background: #333;
}

.dropdown-menu hr {
  border: 0;
  border-top: 1px solid #333;
  margin: 0.3rem 0;
}

/* Search & Sort Bar */
.search-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 800px;
  padding: 0 1rem;
}

.search-bar input,
.search-bar select {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #1c1c1c;
  color: #fff;
  width: 100%;
  max-width: 300px;
}

/* Grid Layout */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem;
}

/* Widget Card */
.widget-card {
  background: #1c1c1c;
  border-radius: 12px;
  overflow: hidden;
  width: 320px;
  display: flex;
  flex-direction: column;
  border: 1px solid #2a2a2a;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.widget-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); border-color: #333; }

.widget-media { position: relative; overflow: hidden; background: #111; }
.widget-media img { width: 100%; height: 180px; object-fit: cover; display: block; transform: scale(1.02); transition: transform .25s ease, opacity .25s ease; }
.widget-card:hover .widget-media img { transform: scale(1.06); }

.ribbon { position: absolute; top: 10px; left: 10px; padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: .02em; }
.ribbon.free { background: #2e7d32; color: #fff; }
.ribbon.new { left: auto; right: 10px; background: #9146ff; color: #fff; }
.price-pill { position: absolute; bottom: 10px; right: 10px; background: #101010cc; color: #fff; border: 1px solid #333; padding: 0.3rem 0.5rem; border-radius: 8px; font-weight: 700; font-size: 0.85rem; }

.widget-body { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.widget-name { font-weight: 800; font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.widget-desc { color: #bbb; font-size: 0.92rem; line-height: 1.4; min-height: 2.6em; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; color: #9a9aa3; font-size: 0.8rem; }
.compat i { margin-right: 0.35rem; opacity: .9; }

.widget-actions { display: flex; gap: 0.5rem; padding: 0 1rem 1rem; }
.widget-actions .btn { flex: 1; justify-content: center; }

.new-badge,
.free-badge {
  background: #9146ff;
  color: #fff;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Price Button */
.price-button {
  background: #9146ff;
  color: white;
  padding: 0.6rem;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.price-button:hover {
  background: #7a34d6;
}

.price-button.free {
  background: #4caf50;
}

.price-button.free:hover {
  background: #3e9141;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Auth Modal Specifics */
.auth-modal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-modal input {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #333;
  background: #121212;
  color: #fff;
}

.auth-submit.green {
  background-color: #4caf50;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 0.6rem;
  cursor: pointer;
}

.auth-submit.green:hover {
  background-color: #3e9141;
}

.oauth-buttons button {
  background: #2e2e2e;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem;
  width: 100%;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  cursor: pointer;
}

.oauth-buttons button:hover {
  background: #3c3c3c;
}

.separator {
  text-align: center;
  margin: 1rem 0;
  position: relative;
  font-size: 0.8rem;
  color: #777;
}

.separator span {
  background: #1e1e1e;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.separator::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background: #444;
  top: 50%;
  left: 0;
  z-index: 1;
}

/* Footer */
footer, .copyright {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: #666;
}


/* Discord copy affordance */
.skills-note [role="button"] { cursor: pointer; color: var(--accent); }
.skills-note [role="button"]:hover { text-decoration: underline; }
.skills-note [role="button"]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Coming soon layout */
.coming-soon-hero {
  margin-top: 3rem;
}

.coming-soon-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(145, 70, 255, 0.14);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.hero-cta.single {
  justify-content: center;
}

.coming-soon.section {
  display: flex;
  justify-content: center;
  padding: 3rem 0 5rem;
}

.coming-soon-card {
  max-width: 720px;
  width: min(100%, 720px);
  padding: 2.5rem;
  border-radius: 18px;
  background: rgba(30, 30, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.coming-soon-card h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.coming-soon-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.coming-soon-list li {
  background: rgba(17, 17, 20, 0.8);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

.coming-soon-note {
  color: #c0c4d6;
  font-size: 1rem;
}

.coming-soon-note a {
  color: var(--accent);
  text-decoration: none;
}

.coming-soon-note a:hover {
  text-decoration: underline;
}
