/* Variables */
:root {
    --color-accent: rgba(244, 183, 89, 0.9);
    --color-white: #fff;
    --color-dark: #141414;
    --color-border: rgba(255, 255, 255, 0.1);
    
    --spacing-xs: 10px;
    --spacing-sm: 15px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 170px;
    
    --font-size-base: 18px;
    --font-size-lg: 30px;
    --font-size-xl: 40px;
    --font-size-xxl: 80px;

    --color-footer: #0a0a0a;
    --color-main-bg: rgba(15, 15, 15, 0.95);
}

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

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    color: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Section Backgrounds */
.hero-section {
    background: url("./public/background.png") top/contain no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.hero-section::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.6) 0%,
        rgba(15, 15, 15, 0.8) 40%,
        rgba(15, 15, 15, 0.99) 100%
    );
    pointer-events: none;
}

.content-section {
    background-color: var(--color-main-bg);
    position: relative;
    padding: 50px 0;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--spacing-xl);
    animation: slideIn 1s ease-out forwards;
    opacity: 0;
}

@keyframes slideIn {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.gradient-pattern::before {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    z-index: 0;
    content: '';
    background: linear-gradient(
        to bottom,
        rgba(15, 15, 15, 0.99) 100%,
        rgba(15, 15, 15, 0.8) 80%,
        rgba(15, 15, 15, 0.9) 0%
    ), url(./public/texture.png);
}

.content-section > * {
    position: relative;
    z-index: 1;
}

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

h1, h2, h3, h4, p {
    margin: 0;
    padding: 0;
}

main {
    width: 60%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 150px;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: left;
    width: 50%;
    font-weight: 500;
    margin: var(--spacing-md) auto 0;
    z-index: 2;
}

.navbar ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 2;
}

.navbar li {
    margin: 0 1rem;
}

.navbar img {
    height: 40px;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--spacing-xl);
}

.hero__title {
    font-size: var(--font-size-xxl);
}

.shadowed-text {
    color: var(--color-accent);
    font-weight: 800 !important;
    text-shadow: 5px 5px 20px var(--color-accent);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero__subtitle {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: 400;
    margin: 0;
}

/* Purchase form */
.purchase-form {
    width: 100%;
    border-radius: 15px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.purchase-form__containers {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.purchase-form__title {
    color: var(--color-white);
    font-size: var(--font-size-xl);
    margin-bottom: 30px;
    text-align: center;
}

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

/* Form elements */
.form {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.form__left, 
.form__right {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;

}

.form__inputs {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form__input {
    font-size: var(--font-size-base);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    color: var(--color-white);
    padding: 0 var(--spacing-sm);
    height: 60px;
    width: 100%;
    box-sizing: border-box;
}

.form__select-wrapper {
    position: relative;
    width: 100%;
}

.form__select-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    cursor: pointer;
    font-size: var(--font-size-base);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    color: var(--color-white);
    padding: 0 var(--spacing-sm);
    height: 60px;
    width: 100%;
    box-sizing: border-box;
}

.form__select-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.server-button {
    cursor: pointer;
    font-weight: 700;
}

/* Add styles for server dropdown */
.server-select .form__select-dropdown {
    display: none;
    margin-top: 5px;
    position: absolute;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    border-radius: 3px;
    background-color: rgb(23, 23, 23);
    padding: 25px;
}

/* Product selector visibility styles */
.product-select {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form__select-wrapper {
    margin-top: 15px;
}

.form__select-dropdown {
    display: none;
    margin-top: 5px;
    height: 280px;
    position: absolute;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    border-radius: 3px;
    background-color: rgb(23, 23, 23);
    padding: 25px 0;
    overflow-y: auto;
}

/* Product card */
.product-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    background-color: #0a0a0a;
    border-radius: 15px;
    padding: 20px;
}

.product-card__header {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.product-card__header-info .category-text {
    color: #727272;
    text-transform: uppercase;
}

.product-card__header-info p {
    font-weight: 500;
}

.product-card__description {
    max-height: 250px;
    overflow: auto;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card__description::-webkit-scrollbar {
    display: none;
}

.product-card__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    width: 100%;
}

.product-card__promo-input,
.product-card__button-box {
    width: 100%;
}

.product-card__buy-button {
    width: 100%;
    height: 60px;
    text-align: left;
    border-radius: 5px;
    background-color: #f5b759;
    color: white;
    padding: 10px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    box-shadow: 0px 10px 100px rgba(244, 183, 89, 0.3);
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-card__buy-button:hover {
    background-color: #f4b041;
}

.fa-shopping-cart {
    padding-top: 4px;
}

/* Product Sections */
.product-section {
    margin-bottom: 30px;
    padding: 0 25px 30px 25px;
    border-bottom: 2.5px dashed #4e4e4e;
}

.product-section:last-child {
    border: none;
    margin: 0;
    padding: 0 25px;
}

.product-section__header {
    display: flex;
    flex-direction: row;
    gap: 10px;
    color: #727272;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-section__list {
    margin-left: 10px;
    display: flex;
    flex-direction: column;
}

.product-section__entry {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    padding: 15px 0;
    transition: 0.3s;
}

.product-section__entry:hover {
    margin-left: 10px;
}

.product-section__entry.selected {
    background-color: rgba(244, 183, 89, 0.1);
    margin-left: 10px;
    padding: 15px 10px;
    border-radius: 5px;
}

.product-section__entry.selected:hover {
    margin-left: 10px;
}

.product-section__entry:last-child {
    padding: 15px 0 0 0;
}

.product-section__entry.selected:last-child {
    padding: 15px 10px;
}

.product-section__paragraph {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.product-section__entry p {
    padding-top: 3px;
}

.product-section__entry-price {
    color: var(--color-accent);
}

/* Servers Panel */
.servers-panel-form__container {
    width: 50%;
    height: 80px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    transform: skewX(-5deg);
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.servers-panel__server-name {
    width: 100%;
}

.servers-panel__number-block {
    height: 100%;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-part {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.servers-panel__number-box {
    position: relative;
    height: 40px;
    width: 40px;
    border-radius: 2px;
    background-color: #f5b75911;
}

.servers-panel__line {
    position: absolute;
    top: 0;
    left: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(244,183,99,0.3) 90%, rgba(244,183,99,1) 100%);
    width: 3px;
    z-index: 1;
    transform: translateX(-50%);
}

.servers-panel__number {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Instructions */
.instructions-form__title {
    font-size: 30px;
    margin-bottom: 30px;
}

.instructions__steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.instructions__step {
    color: white;
}

.instructions__item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.instructions__item-description {
    margin: 0;
    color: #727272;
}

/* Footer */
footer {
    background-color: var(--color-footer);
    padding: 50px 0;
    margin-top: auto;
}

.footer-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 60%;
    margin: 0 auto;
}

.footer-divider {
    border: none;
    color: #212121;
    width: 100%;
    border-top: 3.5px dashed #212121;
}

.top-part {
    display: flex;
    flex-direction: row;
}

.copyright-box {
    display: flex;
    width: 50%;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
}

.icon-part {
    height: 40px;
    width: 40px;
}

.near-icon-part {
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}

.socials-block {
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 50%;
}

/* Custom scrollbar */
.form__select-dropdown::-webkit-scrollbar {
    width: 3px;
}

.form__select-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(189, 131, 44, 0.9);
}

.form__select-dropdown::-webkit-scrollbar-track {
    background-color: rgb(23, 23, 23);
    border-radius: 10px;
}

/* Utility Classes */
.category-text {
    font-weight: 400;
    color: #ffffff;
}

.tiny-block {
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
    padding: 2px 5px;
    border: solid 1px rgba(49, 49, 49, 0.4);
    border-radius: 2px;
}

.white-colored {
    color: white;
}

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

.tiny-blocks-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.grey-colored {
    color: #5c5c5c;
}

.link-text {
    color: #f5b759;
    text-shadow: 0 0 18px rgba(244, 183, 89, 0.9);
    font-size: 80%;
    font-weight: 400;
    text-decoration: underline;
}

.links-box {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

/* Social Icons Hover Effect */
.socials-block i {
    transition: color 0.3s ease;
    cursor: pointer;
}

.socials-block i:hover {
    color: var(--color-accent);
}

/* Checkbox Styles */
.product-card__rules-tick {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #727272;
}

.product-card__rules-tick input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

#paymentPopup {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: 
    rgba(0,0,0,0.8); 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    display: none;
}

#paymentPopupContainer {
    background: #0a0a0a; 
    border-radius: 15px; 
    padding: 30px; 
    width: 90%; 
    max-width: 500px; 
    text-align: center;
}

#paymentPopupContainer h2 {
    margin-bottom: 20px;
}


#paymentPopupContainer p {
    color: #727272; 
    margin-bottom: 20px;
}

.telegram-link {
    display: inline-block;
    background-color: #f5b759;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 600;
    box-shadow: 0px 10px 100px rgba(244, 183, 89, 0.3);
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

#closePopup {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}


/* Rules Section */
.rules-section {
    max-width: 1920px;
    width: 100%;
    padding: 20px;
    margin: 0 auto;
}

.rules-container {
    background-color: var(--color-main-bg);
    width: 100%;
    max-width: 1200px;
    border-radius: 15px;
    padding: 20px;
    margin: 0 auto;
    position: relative;
}

.rules-content {
    width: 100%;
    margin: 0 auto;
}

/* Section Headers */
.rules__section {
    margin-bottom: 40px;
}

.rules__section:last-child {
    margin-bottom: 0;
}

.rules__section-title {
    color: var(--color-accent);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 5px 5px 20px var(--color-accent);
}

/* Subsections */
.rules__subsection {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid rgba(244, 183, 89, 0.2);
}

.rules__subsection:last-child {
    margin-bottom: 0;
}

.rules__subsection-title {
    color: var(--color-white);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.rules__subsection-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Content Elements */
.rules__bullet {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.bullet-marker {
    color: var(--color-accent);
    flex-shrink: 0;
}

.bullet-text {
    color: #ccc;
    line-height: 1.5;
    flex: 1;
}

.rules__text {
    color: #ccc;
    line-height: 1.5;
}

/* Notes and Exceptions */
.rules__note {
    background-color: rgba(244, 183, 89, 0.07);
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.note-title {
    display: block;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.note-text {
    color: #888;
    line-height: 1.5;
}

/* Error State */
.rules__error {
    color: #ff6b6b;
    padding: 16px;
    text-align: center;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
}

/* Responsive Design */
@media screen and (min-width: 768px) {
    .rules-section {
        padding: 30px;
    }
    
    .rules-container {
        padding: 30px;
    }

    .rules__section-title {
        font-size: 26px;
        margin-bottom: 25px;
    }

    .rules__subsection {
        padding-left: 20px;
        margin-bottom: 30px;
    }

    .rules__subsection-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .rules__note {
        padding: 20px;
        margin: 15px 0;
    }
}

@media screen and (min-width: 1024px) {
    .rules-section {
        padding: 40px;
    }

    .rules-container {
        padding: 40px;
    }

    .rules__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .rules__subsection {
        padding-left: 25px;
        margin-bottom: 35px;
    }

    .rules__bullet {
        gap: 12px;
    }

    .rules__note {
        padding: 25px;
    }
}

@media screen and (min-width: 1200px) {
    .rules-section {
        padding: 50px 0;
    }

    .rules__section-title {
        font-size: 30px;
    }

    .rules__subsection {
        padding-left: 30px;
    }

    .rules__subsection-title {
        font-size: 24px;
    }
}

/* Text Selection */
.rules-content ::selection {
    background: rgba(244, 183, 89, 0.3);
    color: var(--color-white);
}

/* Add these media queries at the end of styles.css */

/* Large screens (less than 1200px) */
@media screen and (max-width: 1200px) {
    main {
        width: 80%;
    }

    .footer-container {
        width: 80%;
    }

    .navbar {
        width: 80%;
    }

    .form {
        flex-direction: column;
        align-items: center;
    }

    .form__left, 
    .form__right {
        width: 100%;
        max-width: none;
    }

    .servers-panel-form__container {
        width: 70%;
    }
    
    .servers-panel__number-box {
        width: 35px;
        height: 35px;
    }
    
    .servers-panel__number h2 {
        font-size: 24px;
    }
}

/* Medium screens (less than 768px) */
@media screen and (max-width: 768px) {
    main {
        width: 90%;
        gap: 100px;
    }

    .footer-container {
        width: 90%;
    }

    .navbar {
        width: 90%;
    }

    .hero__title {
        font-size: calc(var(--font-size-xxl) * 0.7);
    }

    .hero__subtitle {
        font-size: calc(var(--font-size-lg) * 0.8);
        text-align: center;
    }

    .purchase-form__title {
        font-size: calc(var(--font-size-xl) * 0.8);
    }

    .form__inputs {
        flex-direction: column;
    }

    .product-card {
        padding: 15px;
    }

    .servers-panel-form__container {
        width: 100%;
        transform: skewX(-5deg);
    }

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

    .copyright-box,
    .socials-block {
        width: 100%;
        justify-content: center;
    }

    .near-icon-part {
        text-align: center;
    }
}

/* Small screens (less than 480px) */
@media screen and (max-width: 480px) {
    .hero__title {
        font-size: calc(var(--font-size-xxl) * 0.5);
    }

    .hero__subtitle {
        font-size: calc(var(--font-size-lg) * 0.7);
        padding: 0 20px;
    }

    .purchase-form__title {
        font-size: calc(var(--font-size-xl) * 0.6);
    }

    .form__select-button {
        font-size: calc(var(--font-size-base) * 0.9);
    }

    .product-card__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .product-card__rules-tick {
        text-align: center;
    }

    .servers-panel__server-name h2 {
        font-size: 20px;
    }
    
    .servers-panel__number-block {
        width: 50px;
    }
    
    .servers-panel-form__container {
        height: 70px;
        padding: 10px;
    }
    
    .right-part {
        gap: 0;
    }
    
    .servers-panel__server-name {
        margin-bottom: 2px;
    }

    .tiny-blocks-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 5px;
    }
    
    .tiny-block {
        font-size: 10px;
        white-space: nowrap;
    }

    #paymentPopupContainer {
        width: 95%;
        padding: 20px;
    }

    .telegram-link {
        padding: 12px 20px;
    }
}

/* Fix dropdown positioning on mobile */
@media screen and (max-width: 768px) {
    .form__select-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-height: 80vh;
        z-index: 1000;
    }
}

/* Add touch-friendly improvements */
@media (hover: none) {
    .product-section__entry:hover {
        margin-left: 0;
    }

    .form__select-button,
    .product-card__buy-button,
    .product-section__entry {
        padding: 15px;
    }
}

/* Improve scrolling on mobile */
@media (max-width: 768px) {
    .form__select-dropdown {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }

    .copyright-box,
    .socials-block {
        width: 100%;
        justify-content: flex-start; /* Change from center to flex-start */
    }

    .near-icon-part {
        text-align: left;
    }

    .links-box {
        align-items: flex-start;
    }

    .icon-part {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .socials-block {
        align-items: flex-start; /* Add this to align icons */
    }
}
