/* ============================================
   UHost — Main Stylesheet
   ============================================ */

:root {
    --bg: #0b0e14;
    --bg-elevated: #12161f;
    --bg-card: #151a24;
    --bg-input: #0f131a;
    --border: #252b38;
    --border-soft: #1c2230;
    --text: #ffffff;
    --text-muted: #9aa3b5;
    --text-dim: #6b7385;
    --accent: #00d4ff;
    --accent-hover: #33ddff;
    --accent-dim: rgba(0, 212, 255, 0.12);
    --danger: #ff4d6d;
    --radius: 8px;
    --radius-lg: 12px;
    --container: 1180px;
    --header-h: 72px;
    --font: 'Montserrat', system-ui, sans-serif;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

.text-accent {
    color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--accent);
    color: #041018;
}

.btn--primary:hover {
    background: var(--accent-hover);
}

.btn--outline {
    background: transparent;
    border-color: #3a4254;
    color: var(--text);
}

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--muted {
    background: #1a2030;
    border-color: #2a3344;
    color: var(--text);
}

.btn--muted:hover {
    border-color: var(--accent);
}

/* ---------- Top bar ---------- */
.top-bar {
    background: #080a10;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
}

.top-bar__locale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border-radius: 6px;
}

.icon-btn:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Flags */
.flag {
    display: inline-block;
    width: 18px;
    height: 12px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.flag--us {
    background: linear-gradient(180deg, #b22234 0 7.7%, #fff 7.7% 15.4%, #b22234 15.4% 23.1%, #fff 23.1% 30.8%, #b22234 30.8% 38.5%, #fff 38.5% 46.2%, #b22234 46.2% 53.9%, #fff 53.9% 61.6%, #b22234 61.6% 69.3%, #fff 69.3% 77%, #b22234 77% 84.7%, #fff 84.7% 92.4%, #b22234 92.4% 100%);
    position: relative;
}

.flag--us::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 40%;
    height: 53%;
    background: #3c3b6e;
}

.flag--de {
    background: linear-gradient(180deg, #000 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
}

.flag--fi {
    background:
        linear-gradient(#003580, #003580) 30% 0 / 18% 100% no-repeat,
        linear-gradient(#003580, #003580) 0 42% / 100% 22% no-repeat,
        #fff;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 14, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.logo__text {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.logo__mark {
    display: grid;
    place-items: center;
}

.main-nav {
    flex: 1;
}

.main-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 1.15rem;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.35rem 0;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--text);
}

.main-nav .caret {
    opacity: 0.55;
}

.header-user {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.header-user strong {
    color: var(--text);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 4.5rem 0 3.5rem;
    overflow: hidden;
}

.hero__pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.06), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.04), transparent 30%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%231a2230' stroke-width='1' opacity='0.9'%3E%3Cpath d='M20 30l12-8 12 8v14l-12 8-12-8z'/%3E%3Ccircle cx='120' cy='40' r='6'/%3E%3Cpath d='M90 110h14M97 103v14'/%3E%3Ccircle cx='40' cy='120' r='3'/%3E%3Cpath d='M130 100l8 5v10l-8 5-8-5v-10z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2rem;
}

.hero__content h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero__lead {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 34rem;
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.hero__visual {
    display: flex;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------- Domain Search ---------- */
.domain-search {
    padding: 0.5rem 0 3rem;
}

.domain-search__form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.55rem 0.55rem 0.55rem 1.25rem;
    box-shadow: var(--shadow);
}

.domain-search__field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.domain-search__icon {
    color: var(--text-dim);
    flex-shrink: 0;
}

.domain-search__field input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
    padding: 0.65rem 0;
}

.domain-search__field input::placeholder {
    color: var(--text-dim);
}

.domain-search__buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.domain-search__buttons .btn {
    padding: 0.75rem 1.4rem;
}

.domain-search__link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.domain-search__link a {
    color: var(--accent);
}

.domain-search__link a:hover {
    text-decoration: underline;
}

/* ---------- Section headers ---------- */
.section-header {
    text-align: center;
    margin-bottom: 2.75rem;
}

.section-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

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

.stars {
    color: var(--accent);
    letter-spacing: 0.08em;
}

/* ---------- Features ---------- */
.features {
    padding: 4rem 0 5rem;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
}

.feature-card {
    text-align: left;
}

.feature-card__icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-card__icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    max-width: 22rem;
}

/* ---------- Games ---------- */
.games {
    padding: 2rem 0 5rem;
}

.games__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.game-card {
    position: relative;
    min-height: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--border-soft);
    background-size: cover;
    background-position: center;
    transition: transform var(--transition), border-color var(--transition);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.35);
}

.game-card--minecraft {
    background-image:
        linear-gradient(180deg, rgba(8, 12, 18, 0.15), rgba(8, 12, 18, 0.92)),
        linear-gradient(135deg, #2d6a2e 0%, #1a3d1c 40%, #0d1f10 100%);
}

.game-card--rust {
    background-image:
        linear-gradient(180deg, rgba(8, 12, 18, 0.2), rgba(8, 12, 18, 0.94)),
        linear-gradient(145deg, #8b4513 0%, #3d1f0a 45%, #120a06 100%);
}

.game-card--ark {
    background-image:
        linear-gradient(180deg, rgba(8, 12, 18, 0.15), rgba(8, 12, 18, 0.94)),
        linear-gradient(150deg, #1a5c4a 0%, #0d2e28 50%, #061412 100%);
}

.game-card--gmod {
    background-image:
        linear-gradient(180deg, rgba(8, 12, 18, 0.2), rgba(8, 12, 18, 0.94)),
        linear-gradient(160deg, #2a4a6e 0%, #142436 50%, #0a1018 100%);
}

.game-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(6, 8, 14, 0.85) 70%, rgba(6, 8, 14, 0.98));
}

.game-card__body {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    width: 100%;
}

.game-card h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.game-card__price {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.game-card__price span {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text);
}

.game-card__desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ---------- Locations ---------- */
.locations {
    padding: 4rem 0 5.5rem;
    overflow: hidden;
}

.locations__inner {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) 1.28fr;
    gap: 1rem 2rem;
    align-items: center;
    position: relative;
}

.locations__content {
    position: relative;
    z-index: 2;
}

.locations__content h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.locations__content > p {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    max-width: 26rem;
    font-size: 0.92rem;
    line-height: 1.7;
}

.locations__list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.locations__list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    color: #c5cede;
}

.locations__map {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    min-height: 320px;
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.12));
}

.locations__map img {
    width: min(120%, 820px);
    max-width: none;
    height: auto;
    margin-right: -2rem;
}

/* ---------- Reviews ---------- */
.reviews {
    padding: 2rem 0 5.5rem;
}

.reviews__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color var(--transition);
}

.review-card:hover {
    border-color: rgba(0, 212, 255, 0.25);
}

.review-card__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 212, 255, 0.25);
    flex-shrink: 0;
}

.review-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.15rem;
}

.review-card .stars {
    font-size: 0.75rem;
}

.review-card > p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.65;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    background: #080a10;
}

.footer-powered {
    text-align: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.85rem;
}

.footer-powered a {
    color: var(--accent);
}

.footer-powered a:hover {
    text-decoration: underline;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.3fr;
    gap: 2rem;
    padding: 3rem 0 3.5rem;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-brand {
    text-align: right;
}

.logo--footer {
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.footer-social > span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.social-links {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .main-nav__list {
        gap: 0.1rem 0.85rem;
    }

    .main-nav a {
        font-size: 0.75rem;
    }

    .games__grid,
    .reviews__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(36px + var(--header-h));
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.25rem 1.25rem;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .main-nav a {
        font-size: 0.95rem;
        padding: 0.55rem 0;
    }

    .header-user {
        display: none;
    }

    .site-header__inner {
        position: relative;
    }

    .hero__inner,
    .locations__inner {
        grid-template-columns: 1fr;
    }

    .locations__map {
        justify-content: center;
        min-height: 0;
    }

    .locations__map img {
        width: 100%;
        max-width: 640px;
        margin-right: 0;
    }

    .hero__visual {
        order: -1;
        max-width: 380px;
        margin-inline: auto;
    }

    .features__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: left;
    }

    .logo--footer,
    .social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .domain-search__form {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 1rem;
        align-items: stretch;
    }

    .domain-search__buttons {
        flex-direction: column;
    }

    .domain-search__buttons .btn {
        width: 100%;
    }

    .features__grid,
    .games__grid,
    .reviews__grid,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 2.5rem;
    }

    .top-bar__actions {
        display: none;
    }
}
