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

html, body { height: 100%; }

body {
  min-height: 100dvh;
  font-family: Arial, Helvetica, sans-serif;
  color: #e5e7eb;
  position: relative;
  overflow-x: hidden;

  background: linear-gradient(
    #06bf72,
    #05a663,
    #048d54,
    #047345,
    #035935
  );

  display: flex;
  flex-direction: column;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  min-height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.14),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

nav {
  height: 64px;
  background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.15));
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  z-index: 5;
  width: 100%;
}

.nav-inner {
  width: 100%;
  padding: 0 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 800;
  opacity: 0.95;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Right-side auth UI */
.nav-right{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
}

/* Login button (purple, text-only) */
.discord-login-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  font-size:14px;
  line-height:1;
  background: #5865F2; /* Discord blurple */
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.discord-login-btn:hover{ filter: brightness(1.08); transform: translateY(-1px); }

/* Logged-in user pill */
.discord-user{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
}
.discord-avatar{
  width:26px;
  height:26px;
  border-radius:999px;
  object-fit:cover;
}
.discord-name{
  font-weight:900;
  max-width: 160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.discord-logout{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.16);
  color: inherit;
  font-weight:900;
  padding:6px 8px;
  border-radius:10px;
  cursor:pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.discord-logout:hover{ filter: brightness(1.05); transform: translateY(-1px); }

/* HOME HERO */
.hero {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  padding: 40px 20px;
  z-index: 1;
}

.bg-logo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.bg-logo img {
  width: min(740px, 92vw);
  height: auto;
  opacity: 0.18;
  filter: blur(0.4px);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.tagline {
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(52px, 8vw, 78px);
  font-weight: 900;
  margin-bottom: 24px;
}

.cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta {
  min-width: 190px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease, filter 0.15s ease;
  background: #caff00;
  color: #000;
}

.cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.cta-icon {
  width: 26px;
  height: 26px;
  display: inline-block;
  object-fit: contain;
}

.cta-icon.youtube {
  transform: scale(2);
  transform-origin: center;
}

/* GENERIC PAGE LAYOUT */
.page{
  flex: 1;
  z-index: 1;
  padding: 26px 14px 40px;
  display: grid;
  place-items: start center;
}

.panel{
  width: min(980px, 96vw);
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(6px);
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title{
  font-size: 26px;
  font-weight: 900;
}

.panel-subtitle{
  margin-top: 8px;
  opacity: 0.9;
}

/* BUTTONS */
.btn-primary, .btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary{
  background: #caff00;
  color: #000;
}

.btn-secondary{
  background: rgba(0,0,0,0.18);
  color: #e5e7eb;
}

.btn-primary:hover, .btn-secondary:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-primary:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

/* UPLOAD UI */
.upload-box{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

.upload-box input[type="file"]{
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 10px;
  color: inherit;
}

/* STATUS */
.status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 42px;
  display:flex;
  align-items:center;
}
.status-ok{ border-color: rgba(175,255,175,0.35); }
.status-bad{ border-color: rgba(255,175,175,0.35); }
.status-info{ opacity: 0.95; }

/* RESULT */
.result{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}

.result-row{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items:center;
}

.label{ font-weight: 900; opacity: 0.95; }

.value{
  display:flex;
  gap: 10px;
  align-items:center;
}

.copy-input{
  flex: 1;
  min-width: 200px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 10px;
  color: inherit;
}

.copy-textarea{
  flex: 1;
  min-width: 200px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 10px;
  color: inherit;
  resize: vertical;
}

.preview{
  margin-top: 10px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 12px;
  display:grid;
  place-items:center;
}
.preview img{
  max-width: 100%;
  max-height: 520px;
  border-radius: 12px;
}

/* MY IMAGES GRID */
.img-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.img-card{
  display:block;
  text-decoration:none;
  color: inherit;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.img-card:hover{
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.img-card img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  display:block;
}
.img-meta{
  padding: 10px;
  font-size: 12px;
  opacity: 0.92;
  font-weight: 800;
}

.pager{
  margin-top: 14px;
  display:flex;
  justify-content:center;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 14px;
  font-size: 13px;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.15));
  z-index: 5;
}

@media (max-width: 520px) {
  .cta {
    min-width: 260px;
  }

  .tagline {
    font-size: 15px;
  }

  .result-row{
    grid-template-columns: 1fr;
  }
}
