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

:root{
  --bg:#0b0b0f;
  --panel:#14141c;
  --panel-2:#1b1b25;
  --text:#ffffff;
  --muted:#a9a9b6;
  --accent:#7c5cff;
  --accent-2:#9b7bff;
  --border:rgba(255,255,255,0.08);
  --shadow:0 18px 40px rgba(0,0,0,0.28);
  --radius:16px;
  --radius-lg:20px;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}

img{
  display:block;
  max-width:100%;
}

a{
  color:inherit;
  text-decoration:none;
}

button,
input{
  font:inherit;
}

button{
  cursor:pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible{
  outline:3px solid var(--accent-2);
  outline-offset:2px;
}

.skip-link{
  position:absolute;
  left:16px;
  top:-48px;
  z-index:1000;
  padding:10px 14px;
  border-radius:999px;
  background:var(--text);
  color:var(--bg);
  transition:top 0.2s ease;
}

.skip-link:focus{
  top:16px;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.app{
  display:grid;
  grid-template-columns:240px minmax(0,1fr) 280px;
  gap:20px;
  padding:20px;
}

.sidebar,
.wallet,
.stories,
.sellers,
.creators{
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

.sidebar{
  min-height:calc(100vh - 40px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px;
  border-radius:var(--radius-lg);
}

.sidebar-top{
  display:flex;
  flex-direction:column;
  gap:20px;
}

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

.profile img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
}

.profile-text{
  display:flex;
  flex-direction:column;
}

.sub{
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.06em;
}

.logo{
  font-size:1.125rem;
  font-weight:700;
  line-height:1.2;
}

.nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.nav a{
  padding:10px 12px;
  color:var(--muted);
  border-radius:10px;
  transition:background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover{
  background:rgba(255,255,255,0.05);
  color:var(--text);
}

.nav a.active{
  background:rgba(124,92,255,0.2);
  color:var(--text);
}

.sidebar-bottom{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.wallet-connect,
.btn-theme,
.wallet-actions button,
.btn-main,
.btn-secondary{
  min-height:44px;
}

.wallet-connect{
  padding:12px;
  border:none;
  border-radius:10px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:var(--text);
}

.btn-theme{
  padding:10px;
  border-radius:10px;
  background:var(--panel-2);
  color:var(--text);
  border:1px solid var(--border);
}

.socials{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.socials a{
  color:var(--muted);
}

.main{
  min-width:0;
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
}

.header h1{
  font-size:clamp(1.5rem, 2vw, 2rem);
  line-height:1.1;
}

.header input{
  width:min(100%,280px);
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--text);
}

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);
  align-items:center;
  gap:20px;
  padding:30px;
  border-radius:var(--radius-lg);
  background:linear-gradient(135deg,var(--accent),#ff7ad9);
  margin-bottom:20px;
  box-shadow:var(--shadow);
}

.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.18);
  font-size:0.875rem;
}

.hero-content h2{
  font-size:clamp(2rem, 4vw, 3rem);
  margin:10px 0;
  line-height:1.05;
}

.hero-content p{
  color:rgba(255,255,255,0.9);
  max-width:42ch;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:20px;
}

.hero-img{
  width:100%;
  max-width:280px;
  justify-self:end;
  border-radius:20px;
}

.btn-main{
  background:var(--text);
  color:var(--bg);
  padding:10px 18px;
  border:none;
  border-radius:10px;
}

.btn-secondary{
  border:1px solid rgba(255,255,255,0.8);
  background:transparent;
  color:var(--text);
  padding:10px 18px;
  border-radius:10px;
}

section h3{
  margin:0 0 14px;
  font-size:1.125rem;
}

.carousel{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:24px;
}

.card{
  border-radius:14px;
  overflow:hidden;
  background:var(--panel);
  border:1px solid var(--border);
}

.card img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  transition:transform 0.3s ease;
}

.card:hover img{
  transform:scale(1.05);
}

.posts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.post{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
}

.post img{
  width:100%;
  height:180px;
  object-fit:cover;
}

.post h4{
  padding:12px 14px 14px;
  font-size:1rem;
}

.right{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0;
}

.wallet,
.stories,
.sellers,
.creators{
  padding:16px;
  border-radius:14px;
}

.wallet,
.stories,
.sellers,
.creators,
.sidebar{
  backdrop-filter:blur(10px);
}

.wallet h2{
  margin:6px 0 14px;
}

.coins{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.coin{
  display:grid;
  grid-template-columns:28px auto auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--panel-2);
}

.coin img{
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
}

.coin span:last-child{
  margin-left:auto;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}

.muted{
  color:var(--muted);
  font-size:0.95rem;
}

.wallet-actions{
  display:flex;
  gap:10px;
}

.wallet-actions button{
  flex:1;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--panel-2);
  color:var(--text);
}

.seller,
.creator{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:8px 0;
}

.seller a{
  background:var(--accent);
  padding:6px 10px;
  border-radius:8px;
  color:var(--text);
}

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

  .sidebar{
    min-height:auto;
  }

  .right{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .wallet,
  .stories,
  .sellers,
  .creators{
    min-width:0;
  }
}

@media (max-width:720px){
  .app{
    padding:16px;
    gap:16px;
  }

  .header,
  .hero{
    grid-template-columns:1fr;
    display:grid;
  }

  .header{
    margin-bottom:16px;
  }

  .header input{
    width:100%;
  }

  .hero{
    padding:20px;
  }

  .hero-img{
    justify-self:start;
    max-width:220px;
  }

  .carousel,
  .posts{
    grid-template-columns:1fr;
  }

  .right{
    display:flex;
    flex-direction:column;
  }
}
