@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #071218;
    --surface: rgba(8, 18, 15, 0.78);
    --surface-strong: rgba(6, 14, 12, 0.88);
    --text: #f5f7fb;
    --text-soft: rgba(233, 246, 228, 0.9);
    --muted: rgba(255, 255, 255, 0.78);
    --accent: #7fcf69;
    --accent-dark: #3f7a45;
    --accent-soft: rgba(127, 207, 105, 0.18);
    --border: rgba(255, 255, 255, 0.12);
    --radius: 28px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: #08110d;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.52)), url('https://nextstepcommunity.github.io/NextStep/next-step.png') center/cover no-repeat fixed;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.btn {
    font: inherit;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 13, 12, 0.45);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.nav-toggle {
    display: none;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.85rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link[aria-current='page'] {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link[aria-current='page']::after {
    width: 100%;
}

main {
    padding-top: 110px;
}

.hero {
    min-height: 85vh;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 120px 32px 88px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(127, 207, 105, 0.12), transparent 30%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 65%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(3.6rem, 5vw, 5.8rem);
    line-height: 0.95;
    margin-bottom: 1rem;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.hero p {
    font-size: 1.15rem;
    color: rgba(226, 244, 220, 0.92);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: linear-gradient(135deg, #8ddc8e, #cce9c7);
    color: #081218;
}

.section-title {
    font-size: clamp(2rem, 2.4vw, 2.8rem);
    margin-bottom: 0.75rem;
    text-align: center;
    color: rgba(223, 248, 210, 0.96);
}

.section-intro {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.84);
}

.page-section {
    padding: 100px 32px 84px;
    max-width: 1200px;
    margin: 0 auto;
}

.glass-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 44px;
    backdrop-filter: blur(14px);
    box-shadow: 0 36px 80px rgba(0, 0, 0, 0.18);
}

.glass-box h1 {
    font-size: 2.9rem;
    margin-bottom: 1rem;
}

.glass-box h2 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    color: var(--accent);
}

.glass-box p,
.glass-box li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.glass-box ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 1rem;
    display: grid;
    gap: 0.8rem;
}

.cards,
.community-grid,
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

/* Make server list one card per row */
.server-grid {
    grid-template-columns: 1fr;
}

.card,
.server-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.14);
    transition: 0.35s ease;
    backdrop-filter: blur(10px);
}

.card:hover,
.server-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
}

/* Server card layout: content on the left, image on the right when an image exists */
.server-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
    min-height: 240px;
}

.server-card.server-card--has-image {
    grid-template-columns: 1fr minmax(220px, 320px);
}

.server-card .server-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
}

.server-card.server-card--has-image .server-image {
    grid-column: 2;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    align-self: stretch;
}

.server-card h2,
.server-card p {
    margin: 0;
}

.server-card .btn {
    margin-top: 6px;
}

.card h2,
.server-card h2 {
    font-size: 1.45rem;
    margin-bottom: 14px;
    color: #68b36f;
}

.card p,
.server-card p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
    opacity: 0.9;
}

.quote-section {
    padding: 120px 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(127, 207, 105, 0.08), rgba(255, 255, 255, 0.03));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quote-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: rgba(220, 247, 205, 0.96);
}

.quote-section p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.86);
    opacity: 0.88;
}

.rules-box {
    max-width: 900px;
    margin: 0 auto;
}

.rules-box a {
  color: #66cc66;
}

.rules-box a:hover {
  color: #88dd88;
}

.small-toggle-button {
  display: inline-flex;
  align-items: center;
  margin-left: 0.8rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  color: #e6ffe6;
  background: rgba(102, 204, 102, 0.14);
  border: 1px solid rgba(102, 204, 102, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.small-toggle-button:hover {
  background: rgba(102, 204, 102, 0.24);
  transform: translateY(-1px);
}

.small-toggle-button:focus {
  outline: 2px solid rgba(102, 204, 102, 0.9);
  outline-offset: 2px;
}

.help-links-list {
  margin: 0.8rem 0 1.2rem;
  padding: 1rem 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.help-links-list p {
  margin: 0 0 0.55rem;
  color: rgba(255, 255, 255, 0.76);
}

.help-links-list ul {
  margin: 0;
  padding-left: 1.1rem;
}

.help-links-list li {
  margin-bottom: 0.45rem;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--accent);
}


/* =========================
   RULES
========================= */

.rules-box ul {
    list-style-position: inside;
    padding-left: 20px;
    margin-left: 0;
    margin-top: 0;
}

.rules-box li {
    margin-bottom: 0;
    color: rgba(255,255,255,0.92);
}

/* =========================
   FOOTER
========================= */

footer {
    padding: 30px;
    text-align: center;

    background: rgba(0,0,0,0.22);

    border-top:
        1px solid rgba(255,255,255,0.05);
}

footer p {
    opacity: 0.7;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #071218;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,215,109,0.4);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,215,109,0.7);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

    .header-inner {
        padding: 16px 20px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;

        flex-direction: column;
        align-items: stretch;
        gap: 0;

        background: rgba(8, 13, 12, 0.96);
        backdrop-filter: blur(20px);

        border-top: 1px solid rgba(255,255,255,0.08);

        max-height: 0;
        overflow: hidden;

        transition: max-height 0.35s ease;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-link {
        padding: 18px 24px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .hero {
        padding: 120px 20px 60px;
        min-height: 75vh;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
        line-height: 1;
    }

    .hero p {
        font-size: 1rem;
    }

    .page-section {
        padding: 80px 20px;
    }

    .glass-box {
        padding: 28px;
    }

    .glass-box h1 {
        font-size: 2rem;
    }

    .quote-section {
        padding: 80px 20px;
    }

    .quote-section h2 {
        font-size: 2rem;
    }

    .server-card.server-card--has-image {
        grid-template-columns: 1fr;
    }

    .server-card.server-card--has-image .server-image {
        grid-column: auto;
        height: 220px;
    }
}

@media (max-width: 600px) {

    .logo {
        font-size: 1.4rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .cards,
    .community-grid {
        grid-template-columns: 1fr;
    }

    .glass-box {
        padding: 22px;
        border-radius: 20px;
    }

    .card,
    .server-card {
        padding: 22px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .section-intro {
        font-size: 0.95rem;
    }
}
