/* =========================================================
   HOSTILITY DAYZ — COMPLETE STYLE
   Совместим с index.html / rules.html / shop.html
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: #090909 url("images/background.jpg") center top / cover fixed no-repeat;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,.78) 0%,
        rgba(0,0,0,.46) 42%,
        rgba(0,0,0,.30) 100%
    );
}

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

button {
    font-family: inherit;
}

/* ========================= HEADER ========================= */

header,
.header {
    position: relative;
    z-index: 1000;
    width: 100%;
    min-height: 82px;
    background: rgba(8,8,8,.72);
    border-bottom: 1px solid rgba(255,255,255,.12);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 3%;
}

.header-inner {
    width: min(1400px, 94%);
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

header > .logo,
.header .logo-link {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

header > .logo {
    width: 180px;
    height: 65px;
}

header > .logo img,
.header .logo {
    display: block;
    width: 180px;
    max-width: 180px;
    height: auto;
    max-height: 65px;
    object-fit: contain;
}

.nav,
nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    flex-wrap: wrap;
}

.nav a,
nav a {
    position: relative;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
    padding: 10px 0;
    text-transform: uppercase;
}

.nav a::after,
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 2px;
    background: #ff3030;
    transform: scaleX(0);
    transition: transform .2s ease;
}

.nav a:hover,
.nav a.active,
nav a:hover,
nav a.active {
    color: #ff3030;
}

.nav a:hover::after,
.nav a.active::after,
nav a:hover::after,
nav a.active::after {
    transform: scaleX(1);
}

/* ========================= HOME ========================= */

.hero {
    width: 100%;
    min-height: calc(100vh - 82px);
    padding: 100px 6% 130px;
    display: flex;
    align-items: center;
}

.hero-content {
    width: 650px;
    max-width: 100%;
}

.hero h1 {
    margin-bottom: 22px;
    color: #fff;
    font-size: clamp(48px, 6vw, 82px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 5px 25px rgba(0,0,0,.8);
}

.hero h1 span {
    display: block;
    color: #ff3030;
}

.hero p {
    max-width: 580px;
    margin-bottom: 30px;
    color: #ddd;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(10,10,10,.72);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: .2s ease;
}

.button:hover {
    border-color: #ff3030;
}

.button.primary {
    background: #ff3030;
    border-color: #ff3030;
}

.button.primary:hover {
    background: #d92323;
}

/* ========================= SERVER ========================= */

.server {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 85px 0;
}

.server-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.small-title {
    margin-bottom: 7px;
    color: #ff3030;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.server-title h2,
.server > h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.server-status span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #777;
    box-shadow: 0 0 12px rgba(255,255,255,.25);
}

.server-status.online span {
    background: #3cff69;
    box-shadow: 0 0 14px rgba(60,255,105,.7);
}

.server-status.offline span {
    background: #ff3030;
    box-shadow: 0 0 14px rgba(255,48,48,.55);
}

.server-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 28px;
    background: rgba(8,8,8,.72);
    border: 1px solid rgba(255,255,255,.16);
}

.server-name {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.server-ip {
    margin-top: 7px;
    color: #ff3030;
    font-size: 17px;
    font-weight: 800;
}

.players {
    margin-top: 7px;
    color: #aaa;
    font-size: 13px;
    font-weight: 700;
}

.players strong {
    color: #fff;
}

.server-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.copy-button {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(20,20,20,.8);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.copy-button:hover {
    border-color: #ff3030;
}

.copy-message,
.connect-message {
    min-height: 18px;
    margin-top: 10px;
    color: #ff3030;
    font-size: 13px;
    font-weight: 800;
}

/* ========================= CONNECT MODAL ========================= */

.connect-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.78);
}

.connect-modal.active {
    display: flex;
}

.connect-window {
    position: relative;
    width: min(520px, 100%);
    padding: 38px;
    background: rgba(12,12,12,.98);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 25px 80px rgba(0,0,0,.75);
}

.connect-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.connect-small {
    margin-bottom: 7px;
    color: #ff3030;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
}

.connect-window h2 {
    margin-bottom: 8px;
    font-size: 30px;
    font-weight: 900;
}

.connect-description {
    color: #aaa;
    margin-bottom: 20px;
}

.connect-ip {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.connect-ip span {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 14px;
    background: #1a1a1a;
    color: #fff;
    font-weight: 800;
}

.connect-ip button {
    border: 0;
    padding: 0 16px;
    background: #ff3030;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.connect-instruction {
    margin-top: 25px;
    color: #bbb;
    line-height: 1.6;
}

.instruction-title {
    margin-bottom: 8px;
    color: #fff;
    font-weight: 900;
}

/* ========================= RULES PAGE ========================= */

main {
    width: 100%;
}

.rules-header {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 65px 0 30px;
}

.rules-header h1 {
    color: #fff;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.rules-header h1 span {
    color: #ff3030;
}

.rules-header p {
    margin-top: 10px;
    color: #ddd;
    font-size: 16px;
    font-weight: 700;
}

.rules {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 0 0 90px;
}

.rule {
    margin-bottom: 25px;
    padding: 22px 25px;
    background: rgba(8,8,8,.58);
    border-left: 3px solid rgba(255,48,48,.7);
}

.rule-number {
    margin-bottom: 3px;
    color: #ff3030;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
}

.rule h2 {
    margin-bottom: 5px;
    color: #fff;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
}

.rule p {
    color: #ddd;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

/* ========================= SHOP ========================= */

.shop {
    width: min(1400px, 94%);
    margin: 0 auto;
    padding: 70px 0 120px;
}

.shop-hero {
    text-align: center;
    margin-bottom: 42px;
}

.shop-label {
    margin-bottom: 8px;
    color: #ff3030;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 3px;
}

.shop-hero h1 {
    color: #fff;
    font-size: clamp(44px, 5vw, 72px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 2px;
}

.shop-hero h1 span {
    color: #ff3030;
}

.shop-hero p {
    margin-top: 15px;
    color: #ddd;
    font-size: 17px;
    font-weight: 600;
}

.shop-categories {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(15,15,15,.82);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.category:hover,
.category.active {
    background: #ff3030;
    border-color: #ff3030;
}

.products {
    width: calc(100% - 350px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.product {
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(35,35,35,.96), rgba(15,15,15,.98));
    border: 1px solid rgba(255,255,255,.16);
    padding-bottom: 22px;
    transition: border-color .2s ease;
}

.product:hover,
.product.featured {
    border-color: rgba(255,48,48,.75);
}

.product-image {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: #111;
}

.product-tag {
    margin: 18px 20px 8px;
    color: #ff3030;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.product h2 {
    margin: 0 20px 15px;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.product p {
    min-height: 42px;
    margin: 0 20px 15px;
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
}

.product-items {
    margin: 0 20px 15px;
    padding-left: 18px;
    color: #bbb;
    font-size: 13px;
    line-height: 1.7;
}

.product .price {
    margin: 15px 20px;
    color: #ff3030;
    font-size: 27px;
    font-weight: 900;
}

.product .buy {
    display: block;
    width: calc(100% - 40px);
    min-height: 45px;
    margin: 0 20px;
    border: none;
    background: #ff3030;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.product .buy:hover {
    background: #d92323;
}

/* ========================= CART ========================= */

.cart {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 25px;
    background: rgba(12,12,12,.97);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 20px 60px rgba(0,0,0,.65);
    z-index: 5000;
}

.cart-title {
    margin-bottom: 20px;
    color: #ff3030;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.cart-items {
    color: #aaa;
    font-size: 14px;
}

.empty-cart {
    color: #aaa;
    font-size: 14px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.cart-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-info strong {
    color: #fff;
    font-size: 14px;
}

.cart-item-info span {
    color: #ff3030;
    font-size: 13px;
    font-weight: 800;
}

.remove-cart {
    border: none;
    background: transparent;
    color: #ff3030;
    font-size: 23px;
    cursor: pointer;
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.cart-total strong {
    color: #ff3030;
    font-size: 17px;
}

.checkout-button {
    width: 100%;
    min-height: 48px;
    border: none;
    background: #ff3030;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
}

.checkout-button:hover {
    background: #d92323;
}

/* ========================= FOOTER ========================= */

footer {
    width: 100%;
    padding: 35px 20px;
    text-align: center;
    background: rgba(8,8,8,.92);
    border-top: 1px solid rgba(255,255,255,.12);
    color: #888;
    font-size: 13px;
}

/* ========================= SCROLLBAR ========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #090909;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff3030;
}

/* ========================= TABLET ========================= */

@media (max-width: 1200px) {
    .products {
        width: calc(100% - 320px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cart {
        width: 290px;
    }

    .nav,
    nav {
        gap: 18px;
    }

    .nav a,
    nav a {
        font-size: 13px;
    }
}

/* ========================= MOBILE ========================= */

@media (max-width: 850px) {
    header,
    .header-inner {
        min-height: auto;
    }

    header {
        padding: 15px 3%;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }

    .header-inner {
        width: 100%;
        padding: 0;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }

    header > .logo {
        width: 150px;
        height: 55px;
        justify-content: center;
    }

    header > .logo img,
    .header .logo {
        width: 150px;
        max-width: 150px;
        max-height: 55px;
    }

    .nav,
    nav {
        justify-content: center;
        gap: 15px;
    }

    .nav a,
    nav a {
        font-size: 12px;
        padding: 7px 0;
    }

    .hero {
        min-height: auto;
        padding: 70px 5% 90px;
    }

    .hero-content {
        margin: 0 auto;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(40px, 10vw, 58px);
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
        font-size: 16px;
    }

    .buttons {
        justify-content: center;
    }

    .server {
        padding: 60px 0;
    }

    .server-title,
    .server-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .server-title h2,
    .server > h2 {
        font-size: 30px;
    }

    .server-buttons {
        width: 100%;
    }

    .server-buttons .button,
    .copy-button {
        flex: 1;
    }

    .rules-header {
        padding-top: 45px;
    }

    .rule h2 {
        font-size: 22px;
    }

    .shop {
        padding: 55px 0 90px;
    }

    .shop-hero h1 {
        font-size: 40px;
    }

    .shop-hero p {
        font-size: 14px;
    }

    .products {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .product-image {
        height: 190px;
    }

    .cart {
        left: 15px;
        right: 15px;
        bottom: 15px;
        width: auto;
        max-height: 38vh;
    }
}

@media (max-width: 550px) {
    header > .logo,
    header > .logo img,
    .header .logo {
        width: 140px;
        max-width: 140px;
    }

    header > .logo {
        height: 50px;
    }

    nav,
    .nav {
        gap: 10px;
    }

    nav a,
    .nav a {
        font-size: 10px;
    }

    .hero {
        padding: 55px 4% 70px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 14px;
    }

    .button {
        width: 100%;
    }

    .server-card {
        padding: 20px;
    }

    .server-buttons {
        flex-direction: column;
    }

    .server-buttons .button,
    .copy-button {
        width: 100%;
        flex: none;
    }

    .rules-header,
    .rules {
        width: 92%;
    }

    .rule {
        padding: 18px;
    }

    .rule h2 {
        font-size: 20px;
    }

    .rule p {
        font-size: 14px;
    }

    .shop {
        width: 92%;
    }

    .shop-hero h1 {
        font-size: 38px;
    }

    .shop-categories {
        gap: 7px;
    }

    .category {
        min-height: 40px;
        padding: 0 13px;
        font-size: 10px;
    }

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

    .product-image {
        height: 210px;
    }

    .cart {
        max-height: 45vh;
        padding: 20px;
    }

    .connect-window {
        padding: 30px 22px;
    }

    .connect-ip {
        flex-direction: column;
    }

    .connect-ip span {
        min-height: 45px;
    }

    .connect-ip button {
        min-height: 45px;
    }
}

/* Каталог старого магазина */
.product { display: flex; flex-direction: column; }
.product-image { object-fit: contain; padding: 16px; }
.product .price { margin-top: auto; padding-top: 15px; }
.product-variant { display: block; margin: 0 20px 18px; color: #bbb; font-size: 13px; }
.variant-select { display: block; width: 100%; min-height: 42px; margin-top: 8px; padding: 8px; border: 1px solid #555; background: #171717; color: #fff; }
.category:focus-visible, .variant-select:focus-visible, .buy:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.checkout-button:disabled { opacity: .45; cursor: not-allowed; }
