/* style.css - FINAL POLISHED VERSION */

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    margin: 0;
}

:root {
    --bg-header: #0f172a;
    --bg-menu: #020617;
    --bg-body: #0b1121;
    --accent-red: #ff1a1a;
    --accent-orange: #ff6a00;
    --text-main: #f9fafb;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --header-height: 60px;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--header-height);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   FIXED TOP BAR
   ========================================================= */
.header-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 9999;
    background-color: var(--bg-header);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    display: flex;
    align-items: center;
    transform: translateZ(0);
}

.header-top-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.brand-logo {
    height: 38px;
    display: block;
}

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

.btn-header {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn-login {
    background: linear-gradient(135deg, #ff1a1a, #ff6a00);
    box-shadow: 0 4px 15px rgba(255, 26, 26, 0.25);
}

.btn-register {
    background: linear-gradient(135deg, #ff1a1a, #ff6a00);
    box-shadow: 0 4px 18px rgba(255, 26, 26, 0.35);
}

.btn-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 26, 26, 0.45);
}

/* =========================================================
   SEARCH STYLES
   ========================================================= */
.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10001;
}

.search-input {
    background: #1e293b;
    border: 1px solid #334155;
    color: #fff;
    padding: 8px 15px;
    border-radius: 99px;
    outline: none;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
    transition: 0.2s all;
}

.search-input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.2);
}

.search-results {
    position: absolute;
    top: 105%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 300px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 10002;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #cbd5e1;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    transition: background 0.2s, padding-left 0.2s;
}

.search-item:hover {
    background: #334155;
    color: #fff;
    padding-left: 18px;
}

/* =========================================================
   DESKTOP VS MOBILE SEARCH (Defaults)
   ========================================================= */
.desktop-search {
    display: none !important;
}

.mobile-search {
    display: block !important;
}

.main-header {
    margin-top: 0;
    background-color: var(--bg-header);
    border-bottom: none;
    position: relative;
    z-index: 900;
}

.header-search-row {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5px 20px 5px;
}

@media (min-width: 769px) {
    .desktop-search {
        display: flex !important;
        flex: 1;
        max-width: 400px;
        margin: 0 30px;
    }
    .mobile-search, .main-header {
        display: none !important;
    }
}

/* =========================================================
   MENU
   ========================================================= */
.nav-menu {
    background-color: var(--bg-menu);
    border-bottom: 1px solid var(--border-color);
}

.menu-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    justify-content: center;
}

@media (max-width: 1100px) {
    .menu-inner {
        justify-content: flex-start;
    }
}

.menu-inner::-webkit-scrollbar {
    display: none;
}

.menu-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 99px;
    transition: 0.2s;
    flex-shrink: 0;
}

.menu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.menu-link.active {
    color: #fff;
    background: linear-gradient(135deg, #ff1a1a, #cc0000);
}

/* =========================================================
   HOMEPAGE & PAGE BOX STYLES
   ========================================================= */
.page-box {
    flex: 1 0 auto;
    background: #041737;
    padding: 0 0 40px;
    width: 100%;
}
.content-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    width: 100%;
}

.layout-strip {
    width: 100%;
    background: #0b1121;
    padding-top: 0 !important;
    margin-top: 0 !important;
    flex: 1;
}

.home-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    margin-top: 0 !important;
    padding-top: 20px !important;
    width: 100%;
}

.home-page-title {
    color: var(--accent-red);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0 !important;
    margin-bottom: 20px;
}

.home-hero-image {
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
}

.home-cta-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.home-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    color: #fff;
    transition: transform 0.2s;
}

.home-cta-register {
    background: linear-gradient(135deg, #ff1a1a, #ff6a00);
    box-shadow: 0 4px 15px rgba(255, 26, 26, 0.3);
}

.home-cta-login {
    background: linear-gradient(135deg, #ff6a00, #ff1a1a);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

/* =========================================================
   INNER PAGE STYLES (Contact, About, etc.)
   ========================================================= */
.contact-header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0 !important;
}
.contact-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #ff1a1a, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}
.contact-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.contact-info-card {
    background: #0f172a;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}
.contact-info-card h3 {
    margin-top: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.contact-info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}
.info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.info-item:last-child { border-bottom: none; }
.info-item .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 700;
}
.info-item .value {
    font-size: 1rem;
    color: var(--accent-orange);
    font-weight: 500;
}
.info-item .value.text-white { color: #e2e8f0; }

.contact-form-wrapper {
    background: #0f172a;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.contact-form-wrapper h3 { margin-top: 0; margin-bottom: 20px; color: #fff; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #cbd5e1; font-size: 0.9rem; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    outline: none;
    transition: 0.2s all;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.2);
}
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #ff1a1a, #ff6a00);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.btn-telegram-contact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #0088cc;
    color: white;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}
.btn-telegram-contact i { font-size: 1.2rem; margin: 0; display: inline-block; }

/* =========================================================
   SIMPLE LEGAL PAGE STYLE (Terms & Disclaimer)
   ========================================================= */
.disclaimer-content {
    color: var(--text-muted);
    line-height: 1.7;
    text-align: left;
}
.disclaimer-content h2 {
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.disclaimer-content p { margin-bottom: 20px; font-size: 1rem; }
.disclaimer-content hr { border: none; height: 1px; background-color: rgba(255, 255, 255, 0.1); margin: 40px 0; }

/* =========================================================
   FOOTER
   ========================================================= */
.main-footer {
    flex-shrink: 0;
    background: #020617;
    border-top: 1px solid var(--border-color);
    position: relative;
}
.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 140%;
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ff1a1a, #ff6a00, #ff1a1a);
    opacity: 0.8;
}
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}
.footer-brand { max-width: 360px; }
.footer-logo { height: 34px; display: block; }
.footer-brand p { margin: 14px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.footer-links-right ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links-right a { color: #9ca3af; font-size: 14px; text-decoration: none; padding-bottom: 2px; transition: color 0.2s ease; }
.footer-links-right a:hover { color: #e5e7eb; border-bottom: 1px solid #ff6a00; }
.footer-bottom { border-top: 1px solid rgba(148, 163, 184, 0.22); padding: 12px 20px 16px; text-align: center; background: #020617; }
.footer-bottom p { margin: 0; font-size: 12px; color: #6b7280; }

/* =========================================================

MOBILE RESPONSIVE FIX (BUTTONS RESTORED)

========================================================= */

@media (max-width: 768px) {

    /* 1. TOP HEADER CONTAINER */
    .header-top-bar {
        height: 54px;
        padding: 0;
        display: flex;
        align-items: center;
        overflow: hidden;
        width: 100%;
    }

    .header-top-inner {
        width: 100%;
        padding: 0 10px; /* Reduced padding to fit buttons */
        display: flex;
        justify-content: space-between; /* Push logo left, buttons right */
        align-items: center;
        max-width: 100%;
    }

    /* 2. HIDE DESKTOP ELEMENTS */
    .desktop-search {
        display: none !important;
    }

    /* RESTORE BUTTONS */
    .header-buttons {
        display: flex !important; /* Show buttons */
        gap: 8px; /* Tighter gap */
        flex-shrink: 0; /* Prevent shrinking */
        align-items: center;
    }

    .btn-header {
        padding: 0 10px !important; /* Compact padding */
        height: 30px; /* Smaller height */
        font-size: 11px !important; /* Smaller text */
        line-height: 30px;
        border-radius: 6px;
        white-space: nowrap;
        display: inline-flex;
    }

    /* 3. LOGO - Left Aligned */
    .brand-logo {
        height: 28px; /* Slightly smaller logo */
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Align left */
        margin-right: auto; /* Push away from buttons */
        flex-shrink: 1; /* Allow logo to shrink if needed */
        min-width: 0; /* Allow flex shrink below content size */
        max-width: 120px; /* Limit width to prevent pushing buttons */
        overflow: hidden;
    }

    .brand-logo img {
        height: 100%;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    /* 5. MOBILE SEARCH BAR */
    .main-header {
        display: block !important;
        padding-bottom: 5px;
        margin-top: -1px;
        width: 100%;
    }

    .mobile-search {
        display: flex !important;
        padding: 5px 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-search .search-input {
        height: 40px;
        font-size: 14px;
        width: 100%;
    }

    /* 6. GENERAL CONTENT ADJUSTMENTS (Keep the layout fixes) */
    .page-box, .content-box, .home-main {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .page-box { padding-top: 0; }
    .content-box { padding: 15px; }

    .home-main {
        padding-top: 15px !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    h1, .home-page-title, .vip-title, .app-title {
        font-size: 1.8rem !important;
    }

    /* Footer Stack */
    .footer-grid {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding: 20px 15px;
        width: 100%;
        max-width: 100%;
    }

    .footer-links-right ul {
        justify-content: center;
        gap: 15px;
    }

    /* Grid Fixes */
    .contact-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .profile-image-container {
        width: 140px;
        height: 140px;
    }
}
