/* ===== SAMSLAM TENNIS — FIXED 3D TENNIS BALL HERO FX & MOBILE OPTIMIZATIONS ===== */

/* Global Logo Branding Styles */
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}
.logo img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
}
.logo-text {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    color: var(--green) !important;
    letter-spacing: -0.02em !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}
.logo-accent {
    color: var(--accent-lime) !important;
    margin-left: 4px !important;
}
/* Ensure footer logo text is white for contrast */
.footer .logo-text {
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 17px !important;
    }
}
@media (max-width: 400px) {
    .logo-text {
        font-size: 15px !important;
    }
}

/* High-performance canvas for home page background elements */
#tennis-shooting-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

/* Green Diagonal Light Streak behind Hero Title */
.hero-title-beam {
    position: absolute;
    top: 55%;
    left: 18%;
    width: 480px;
    height: 36px;
    background: linear-gradient(90deg, rgba(163, 230, 53, 0) 0%, rgba(163, 230, 53, 0.45) 40%, rgba(124, 197, 0, 0.6) 80%, rgba(163, 230, 53, 0) 100%);
    transform: rotate(-8deg);
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
    border-radius: 9999px;
    animation: beamGlow 4s ease-in-out infinite alternate;
}

@keyframes beamGlow {
    0% { opacity: 0.6; filter: blur(16px); }
    100% { opacity: 1; filter: blur(10px); }
}

/* Fixed 3D Tennis Ball Decorations matching screenshot exactly */
.hero-fixed-balls {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

/* 3D Tennis Ball Badge Dot (Replacing plain dots!) */
.hero-badge-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e2ff66 0%, #7cc500 65%, #3c6300 100%);
    box-shadow: 0 0 8px rgba(163, 230, 53, 0.75);
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid #ffffff;
}

.hero-badge-dot::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -15%;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-25deg);
}

/* 1. Top Center Floating Ball */
.ball-top-center {
    position: absolute;
    top: -24px;
    left: 24%;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e2ff66 0%, #7cc500 65%, #3c6300 100%);
    box-shadow: 
        0 0 25px rgba(163, 230, 53, 0.7),
        inset -4px -4px 10px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 10px 15px rgba(18, 60, 36, 0.2));
    animation: floatLevitate 5s ease-in-out infinite;
}

.ball-top-center::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -15%;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-25deg);
}

/* 2. Main Shooting Ball (Right side near player) */
.ball-main-shooting {
    position: absolute;
    top: 20%;
    right: 8%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e6ff70 0%, #7cc500 65%, #2e4e00 100%);
    box-shadow: 
        0 0 45px rgba(163, 230, 53, 0.85),
        0 0 90px rgba(124, 197, 0, 0.45),
        inset -10px -10px 22px rgba(0, 0, 0, 0.5),
        inset 6px 6px 15px rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 20px 35px rgba(18, 60, 36, 0.4));
    animation: ballShootImpression 6s ease-in-out infinite;
}

.ball-main-shooting::before,
.ball-main-shooting::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.95);
}

.ball-main-shooting::before {
    top: 10%;
    left: -20%;
    width: 90%;
    height: 90%;
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-25deg);
}

.ball-main-shooting::after {
    bottom: 10%;
    right: -20%;
    width: 90%;
    height: 90%;
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-25deg);
}

/* Motion Speed Ring around main shooting ball */
.ball-speed-ring {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 3px solid rgba(163, 230, 53, 0.6);
    box-shadow: 0 0 25px rgba(163, 230, 53, 0.5);
    animation: ringPulse 3s ease-out infinite;
}

/* 3. Bottom Center Ball */
.ball-bottom-center {
    position: absolute;
    bottom: -35px;
    left: 42%;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e2ff66 0%, #7cc500 65%, #3c6300 100%);
    box-shadow: 
        0 0 35px rgba(163, 230, 53, 0.8),
        inset -6px -6px 14px rgba(0, 0, 0, 0.45);
    animation: floatLevitateReverse 6s ease-in-out infinite;
}

.ball-bottom-center::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -15%;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-25deg);
}

/* 4. Bottom Right Ball */
.ball-bottom-right {
    position: absolute;
    bottom: 30px;
    right: 12%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e2ff66 0%, #7cc500 65%, #3c6300 100%);
    box-shadow: 
        0 0 30px rgba(163, 230, 53, 0.7),
        inset -5px -5px 12px rgba(0, 0, 0, 0.4);
    animation: floatLevitate 7s ease-in-out infinite 1s;
}

.ball-bottom-right::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -15%;
    width: 85%;
    height: 85%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-25deg);
}

/* Speed Trail behind Bottom Right Ball */
.ball-bottom-right-trail {
    position: absolute;
    bottom: 45px;
    right: 7%;
    width: 90px;
    height: 6px;
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.8) 0%, rgba(18, 60, 36, 0) 100%);
    border-radius: 9999px;
    transform: rotate(30deg);
}

/* Animations */
@keyframes floatLevitate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(15deg); }
}

@keyframes floatLevitateReverse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-16px) scale(1.06); }
}

@keyframes ballShootImpression {
    0%, 100% {
        transform: scale(1) translate(0, 0) rotate(0deg);
        filter: drop-shadow(0 20px 35px rgba(18, 60, 36, 0.4));
    }
    50% {
        transform: scale(1.15) translate(-10px, -15px) rotate(12deg);
        filter: drop-shadow(0 30px 50px rgba(163, 230, 53, 0.6));
    }
}

@keyframes ringPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 0.2; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ===== SLAMBOT WIDGET STYLING ===== */
.slambot-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 150;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slambot-fab:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-xl);
}
.slambot-fab-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.slambot-fab .online-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-lime);
    border: 2px solid var(--white);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.slambot-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 160;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(18,60,36,0.08);
    transform: scale(0.85) translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: min(400px, calc(100vh - 120px));
}
.slambot-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.slambot-header {
    background: var(--green);
    color: var(--white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.slambot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
}
.slambot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.slambot-info h4 {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}
.slambot-info span {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}
.slambot-info .green-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-lime);
    display: inline-block;
}
.slambot-close {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}
.slambot-close:hover {
    background: rgba(255, 255, 255, 0.15);
}
.slambot-close span {
    font-size: 20px;
}

.slambot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}
.slambot-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: msgIn 0.3s ease-out;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.slambot-msg.bot {
    background: var(--bg);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.slambot-msg.user {
    background: var(--green);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.slambot-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.slambot-quick button {
    background: var(--white);
    border: 1px solid rgba(18,60,36,0.12);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--green);
    cursor: pointer;
    transition: all 0.2s;
}
.slambot-quick button:hover {
    background: var(--green);
    color: var(--white);
}

.slambot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid rgba(18,60,36,0.06);
}
.slambot-input {
    flex: 1;
    border: 1px solid rgba(18,60,36,0.1);
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.25s;
}
.slambot-input:focus {
    border-color: var(--accent-lime);
}
.slambot-input::placeholder {
    color: var(--text-muted);
}
.slambot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}
.slambot-send:hover {
    background: var(--green-light);
}

/* Typing Indicator for SlamBot AI */
.slambot-msg.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px;
}

.slambot-msg.typing-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBlink 1.4s infinite ease-in-out both;
}

.slambot-msg.typing-indicator .dot:nth-child(1) { animation-delay: 0s; }
.slambot-msg.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.slambot-msg.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; background: var(--accent-lime); }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & PERFORMANCE OPTIMIZATIONS (Max Width 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Prevent any unwanted horizontal scrolling on mobile devices */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    /* Mobile Header & Logo scaling */
    .header-inner {
        padding: 12px 20px !important;
    }

    /* Clean, compact buttons on mobile */
    .btn {
        padding: 10px 20px !important;
        font-size: 13.5px !important;
        min-height: 38px !important;
        gap: 6px !important;
    }
    .btn span.material-symbols-outlined {
        font-size: 18px !important;
    }
    .hero-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }
    .hero-buttons .btn {
        width: auto !important;
        flex: unset !important;
    }

    /* Responsive Mobile Hero Section */
    .hero {
        padding-top: 105px !important;
        padding-bottom: 50px !important;
    }

    .hero-title {
        font-size: 2.3rem !important;
        line-height: 1.15 !important;
    }

    .hero-desc {
        font-size: 15px !important;
        margin-bottom: 28px !important;
    }

    /* Hero 3D Tennis Ball Responsive Positioning for Mobile */
    .ball-main-shooting {
        width: 80px !important;
        height: 80px !important;
        top: 10% !important;
        right: 2% !important;
        box-shadow: 0 0 25px rgba(163, 230, 53, 0.8), inset -5px -5px 12px rgba(0,0,0,0.5) !important;
    }

    .ball-top-center {
        width: 40px !important;
        height: 40px !important;
        top: -10px !important;
        left: 8% !important;
    }

    .ball-bottom-center {
        width: 55px !important;
        height: 55px !important;
        bottom: -20px !important;
        left: 35% !important;
    }

    .ball-bottom-right {
        width: 45px !important;
        height: 45px !important;
        bottom: 10px !important;
        right: 4% !important;
    }

    .ball-bottom-right-trail {
        display: none !important;
    }

    .hero-title-beam {
        width: 260px !important;
        height: 24px !important;
        left: 5% !important;
        top: 48% !important;
    }

    /* Stat Float Cards on Mobile */
    .hero-float-card.card-1 {
        bottom: 5% !important;
        left: 0% !important;
        padding: 10px 14px !important;
    }

    .hero-float-card.card-2 {
        top: 8% !important;
        right: 0% !important;
        padding: 10px 14px !important;
    }

    /* SlamBot Mobile Floating Button & Popup Panel Fullscreen mode */
    .slambot-fab {
        bottom: 16px !important;
        right: 16px !important;
        width: 52px !important;
        height: 52px !important;
    }
    .slambot-fab-logo {
        width: 28px !important;
        height: 28px !important;
    }
    .slambot-panel {
        bottom: 80px !important;
        right: 16px !important;
        left: auto !important;
        top: auto !important;
        width: 300px !important;
        max-width: calc(100vw - 32px) !important;
        height: auto !important;
        max-height: 300px !important;
        border-radius: var(--radius-lg) !important;
        z-index: 1000 !important;
        transform: scale(0.85) translateY(10px) !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .slambot-panel.open {
        transform: scale(1) translateY(0) !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }
    .slambot-header {
        padding: 10px 14px !important;
    }
    .slambot-avatar {
        width: 30px !important;
        height: 30px !important;
    }
    .slambot-info h4 {
        font-size: 13px !important;
    }
    .slambot-info span {
        font-size: 10px !important;
    }
    .slambot-body {
        padding: 10px !important;
        min-height: 100px !important;
    }
    .slambot-msg {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    .slambot-quick button {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
    .slambot-input-area {
        padding: 8px 10px !important;
    }
    .slambot-input {
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
    .slambot-send {
        width: 34px !important;
        height: 34px !important;
    }
}

/* ==========================================================================
   PRELOADER / SPLASH SCREEN
   ========================================================================== */

#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.preloader-logo {
    width: 120px;
    height: auto;
    animation: preloaderPulse 1.6s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.12); opacity: 1; }
}

.preloader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(18, 60, 36, 0.08);
    border-top-color: var(--accent-lime, #7cc500);
    border-radius: 50%;
    animation: preloaderSpin 0.8s linear infinite;
}

@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

.preloader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(18, 60, 36, 0.6);
}

/* Header Logo Sizing */
.header .logo img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
}

/* ==========================================================================
   FOOTER LOGO — White inversion for dark background
   ========================================================================== */
.footer-brand .logo img {
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   BOTTOM TAB BAR — Mobile Navigation
   ========================================================================== */

.bottom-tab-bar {
    display: none;
}

@media (max-width: 767px) {
    /* Hide old hamburger toggle */
    .menu-toggle { display: none !important; }

    /* Show tab bar */
    .bottom-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 300;
        background: var(--white, #ffffff);
        border-top: 1px solid rgba(18, 60, 36, 0.10);
        box-shadow: 0 -4px 24px rgba(18, 60, 36, 0.08);
        padding: 6px 0 max(6px, env(safe-area-inset-bottom));
        justify-content: space-around;
        align-items: stretch;
    }

    .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        padding: 6px 4px;
        text-decoration: none;
        color: var(--text-muted, #6b7c6f);
        transition: transform 0.15s ease, color 0.2s;
        border-radius: 12px;
        margin: 0 4px;
        min-height: 52px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .tab-item:active {
        transform: scale(0.92);
    }

    .tab-item .tab-icon {
        font-size: 22px;
        line-height: 1;
        transition: color 0.2s;
    }

    .tab-item .tab-label {
        font-family: 'Outfit', sans-serif;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        transition: color 0.2s;
    }

    /* Active tab */
    .tab-item.active .tab-icon {
        color: var(--green, #123c24);
    }

    .tab-item.active .tab-label {
        color: var(--accent-lime, #7cc500);
        font-weight: 700;
    }

    /* Inactive tab */
    .tab-item:not(.active) .tab-icon {
        color: var(--text-muted, #6b7c6f);
    }

    .tab-item:not(.active):hover .tab-icon,
    .tab-item:not(.active):hover .tab-label {
        color: var(--green, #123c24);
    }

    /* Clean, fluid body styling on mobile */
    body {
        padding-bottom: 0 !important;
    }

    /* Push footer content up above the tab bar, keeping its dark green background fluid to the bottom */
    .footer {
        padding-bottom: 90px !important;
    }

    /* SlamBot FAB shifts up above the tab bar */
    .slambot-fab {
        bottom: 82px !important;
    }
}


