/* Bear Fitness Design System - NEON PULSE VERSION */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --color-primary: #f97316;
    /* Energy Orange */
    --color-primary-glow: rgba(249, 115, 22, 0.6);
    /* Neon Glow */
    --color-secondary: #fb923c;
    --color-btn-primary: #f97316;
    /* Orange for actions */
    --color-btn-hover: #fb923c;

    --color-success: #22c55e;
    --color-background: #000000;
    /* PURE BLACK */
    --color-surface: #111111;
    /* Dark Grey Surface */
    --color-surface-hover: #1a1a1a;
    /* Slightly lighter on hover */
    --color-text: #ffffff;
    --color-text-muted: #9ca3af;
    --color-border: #333333;

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.9);
    --shadow-neon: 0 0 10px var(--color-primary-glow), 0 0 20px rgba(249, 115, 22, 0.2);

    --nav-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body,
button,
input,
textarea,
select {
    font-family: var(--font-body);
}

body {
    background:
        /* Subtle radial gradient for depth */
        radial-gradient(ellipse 100% 70% at 50% -10%,
            rgba(20, 35, 65, 0.9) 0%,
            rgba(15, 25, 50, 0.6) 25%,
            rgba(10, 18, 35, 0.4) 50%,
            transparent 80%),
        /* Very dark navy blue base - almost black */
        #0a0e1a;
    background-attachment: fixed;
    color: var(--color-text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Subtle particles for atmosphere */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 25% 35%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(1px 1px at 75% 65%, rgba(59, 130, 246, 0.06), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(59, 130, 246, 0.07), transparent);
    background-size:
        300px 300px,
        400px 400px,
        350px 350px;
    background-position:
        0 0,
        100px 150px,
        200px 80px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

h1,
h2,
h3,
h4,
.brand,
.price {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Container */
.app-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + 20px);
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 32px;
    gap: 16px;
}

.logo-container {
    width: clamp(70px, 20vw, 100px);
    height: clamp(70px, 20vw, 100px);
    flex-shrink: 0;
}

.club-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.brand {
    font-size: clamp(20px, 7vw, 35px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
    line-height: 1.05;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.brand span {
    color: var(--color-primary);
    font-size: clamp(20px, 7vw, 35px);
    text-shadow: 0 0 15px var(--color-primary-glow);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 700px;
    border: 1px solid var(--color-border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-md);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.modal-content.loading {
    opacity: 0;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 10px var(--color-primary-glow);
}

/* Typography */
.section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Cards */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.card-bento {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--color-btn-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    background: var(--color-btn-hover);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-btn-primary);
    color: var(--color-btn-primary);
}

.btn-success {
    background: var(--color-btn-primary);
    color: white;
}

/* Nav Bar */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 8px;
    width: 25%;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-item.active i {
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
    transform: translateY(-2px);
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    /* For local absolute positioning of hints */
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Why Us Buttons - NEON PULSE STYLE */
.why-us-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.why-us-btn {
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    color: var(--color-text);
    font-family: var(--font-heading);
    position: relative;
    overflow: hidden;
    /* Initial Glow */
    box-shadow: 0 0 5px rgba(249, 115, 22, 0.1);
}

/* Hover Effect */
@media (hover: hover) {
    .why-us-btn:hover {
        background: var(--color-surface-hover);
        /* Neon Glow Intensification without jumping */
        box-shadow:
            0 0 30px var(--color-primary-glow),
            0 0 60px rgba(249, 115, 22, 0.1) inset;
        border-color: #ff9f43;
    }
}

/* Active Click Effect - smooth max depth */
.why-us-btn:active {
    transform: scale(0.96);
    box-shadow: 0 0 15px var(--color-primary-glow);
    background: var(--color-surface);
}

/* Pulse Animation for Border/Glow */
@keyframes neonPulse {
    0% {
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(249, 115, 22, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.3);
    }
}

/* Apply animation on load or constant? Let's make it constant for the 'Pulse' vibe */
.why-us-btn {
    animation: neonPulse 3s infinite ease-in-out;
}

.why-us-btn:hover {
    animation: none;
    /* Stop pulse on hover to keep the intense glow */
}

.why-us-btn i {
    font-size: 32px;
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary-glow));
    transition: all 0.3s;
}

@media (hover: hover) {
    .why-us-btn:hover i {
        transform: scale(1.1);
        color: #fff;
        filter: drop-shadow(0 0 10px var(--color-primary));
    }
}

.why-us-btn span {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trainer Cards - Premium Style */
.trainers-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 20px calc(50% - 42.5vw);
    /* Centers the 85vw card */
    margin-bottom: 20px;
}

.trainers-slider::-webkit-scrollbar {
    display: none;
}

.trainer-card {
    flex: 0 0 85vw;
    /* Occupy 85% of viewport width */
    max-width: 400px;
    /* Limit max width on larger screens */
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.trainer-card:hover {
    transform: translateY(5px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.8),
        0 0 20px var(--color-primary-glow);
    border-color: var(--color-primary);
}

.trainer-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    background-color: #1a1a1a;
}

.trainer-info {
    padding: 12px 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.trainer-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trainer-sport {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trainer-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.trainer-actions .btn {
    padding: 8px 10px;
    font-size: 16px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trainer-actions .btn i {
    font-size: 20px;
}

/* Payment QR */
.qr-placeholder {
    width: 250px;
    max-width: 100%;
    height: 250px;
    background: white;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-weight: bold;
    border-radius: 8px;
}

/* Map */
.map-container {
    height: 260px;
    background: #1a1a1a;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.map-container iframe {
    border-radius: var(--radius-md);
}

/* Contact */
.contact-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--color-text);
    font-size: 20px;
}

.contact-row span,
.contact-row a {
    color: var(--color-text) !important;
}

.contact-row i {
    color: var(--color-primary);
    width: 24px;
    font-size: 25px;
    text-align: center;
}

/* Bot Response Area */
@keyframes botFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes botFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
}

.bot-response {
    margin-top: 20px;
    animation: botFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
}

.bot-response.hiding {
    animation: botFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bot-message {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--color-primary-glow);
    /* box-shadow: 0 0 15px var(--color-primary-glow); */
    border-left: 4px solid var(--color-primary);
}

.bot-message p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--color-text);
}

.response-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.response-images:empty {
    display: none;
    margin-top: 0;
}

.response-images img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s;
}

/* .response-images img:hover removed per user request */

#responseButton {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#responseButton:empty {
    display: none;
    margin-top: 0;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none !important;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    pointer-events: none;
}

/* Modal Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    /* Above modal content */
    /* transition: background 0.3s; */
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-nav-btn.prev {
    left: 10px;
}

.modal-nav-btn.next {
    right: 10px;
}

@media (max-width: 600px) {
    .modal-nav-btn {
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Оптимизация под мобильные устройства и узкие экраны */
@media (max-width: 480px) {
    .app-container {
        padding: 15px;
        padding-bottom: calc(var(--nav-height) + 15px);
    }

    .header {
        margin-bottom: 24px;
        gap: 12px;
    }

    .why-us-buttons {
        gap: 10px;
        margin-bottom: 24px;
    }

    .why-us-btn {
        padding: 16px 8px;
        gap: 8px;
    }

    .why-us-btn i {
        font-size: 26px;
    }

    .why-us-btn span {
        font-size: 11px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .bot-message {
        padding: 16px;
    }

    .response-images {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .trainer-card {
        flex: 0 0 92vw;
    }

    .trainer-actions .btn {
        padding: 8px 6px;
        font-size: 13px;
    }

    .nav-item {
        font-size: 10px;
        padding: 6px;
    }

    .nav-item i {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .qr-placeholder {
        width: 200px;
        height: 200px;
    }

    .map-container {
        height: 200px;
    }
}

/* ===== SWIPE HINT TOAST ===== */
.swipe-toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 14, 26, 0.92);
    border: 1px solid rgba(249, 115, 22, 0.55);
    border-radius: 50px;
    padding: 10px 22px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(249, 115, 22, 0.12);
    animation: swipeToastAnim 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
    white-space: nowrap;
}

/* Local version for embedding in containers */
.swipe-toast.swipe-toast-local {
    position: absolute;
    bottom: 20px;
    z-index: 10;
    /* Animation scale is handled by the same @keyframes but from local coords */
}

/* Specific adjustment for trainer tab hint (under dots) */
#trainers .swipe-toast-local {
    bottom: -60px;
    /* Position below the dots */
    margin-bottom: 20px;
}

.swipe-toast .toast-icon {
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
    animation: swipeArrowBounce 0.6s ease-in-out infinite alternate;
}

@keyframes swipeArrowBounce {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(5px);
    }
}

@keyframes swipeToastAnim {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* ===== SCROLL DOT INDICATORS ===== */
.scroll-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px 0 4px;
}

.scroll-dot {
    height: 4px;
    width: 6px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    cursor: pointer;
}

.scroll-dot.active {
    background: var(--color-primary);
    width: 20px;
    box-shadow: 0 0 8px var(--color-primary-glow);
}

/* Right edge fade removed — arrows used instead */
.trainer-slider-wrap {
    position: relative;
}