/* --- Global Styles & Variables --- */
:root {
    --primary-color: #0d0f1a;
    --secondary-color: #1a1c2d;
    --accent-color-1: #00f2fe;
    --accent-color-2: #4c11ac;
    --text-color: #e0e0e0;
    --text-muted: #8a8a8a;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Particle Background --- */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-color-1);
    opacity: 0;
    animation: particle-glow 10s infinite ease-in-out;
}
@keyframes particle-glow {
    0%, 100% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.4; }
    60% { transform: scale(1.2); }
}

/* --- Header & Navigation --- */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.4s ease-out, background-color 0.3s;
    transform: translateY(-100%);
}
#main-header.scrolled {
    transform: translateY(0);
    background-color: rgba(13, 15, 26, 0.85);
    backdrop-filter: blur(10px);
}
.navbar {
    padding: 20px 5%;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    background-image: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 4px transparent;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
}
.nav-menu li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}
.nav-menu li a:hover {
    color: var(--accent-color-1);
}

/* --- Mobile Menu (Expanding Circle) --- */
.nav-mobile-menu-button { display: none; }
.mobile-menu-circle { display: none; }

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    overflow: hidden;
}
.hero-split-left {
    flex-basis: 50%;
}
.hero-split-left h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}
.animated-gradient-text {
    animation: gradient-animation 5s ease infinite;
    background: linear-gradient(-45deg, #00f2fe, #4c11ac, #ff2e88, #f5d300);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-split-left p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}
.cta-buttons {
    display: flex;
    gap: 20px;
}
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-glow {
    background: transparent;
    color: var(--accent-color-1);
    border: 2px solid var(--accent-color-1);
    box-shadow: 0 0 5px var(--accent-color-1), 0 0 15px var(--accent-color-1) inset;
    animation: glow-border 2s infinite alternate;
}
@keyframes glow-border {
    from { box-shadow: 0 0 5px var(--accent-color-1), 0 0 15px var(--accent-color-1) inset; }
    to { box-shadow: 0 0 20px var(--accent-color-1), 0 0 30px var(--accent-color-1) inset; }
}
.btn-slide {
    background: var(--accent-color-2);
    color: var(--text-color);
}
.btn-slide span {
    position: relative;
    z-index: 1;
}
.btn-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-color-1);
    transition: left 0.3s ease;
}
.btn-slide:hover::before {
    left: 0;
}
.btn-slide:hover {
    color: var(--primary-color);
}

/* 3D Dumbbell */
.hero-split-right {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-basis: 50%;
}
.dumbbell-3d {
    width: 200px;
    height: 50px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-dumbbell 15s infinite linear;
}
@keyframes rotate-dumbbell {
    from { transform: rotateY(0deg) rotateX(10deg); }
    to { transform: rotateY(360deg) rotateX(10deg); }
}
.dumbbell-handle {
    width: 100px;
    height: 15px;
    background: #ccc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dumbbell-weight {
    width: 50px;
    height: 50px;
    background: #444;
    position: absolute;
    top: 0;
}
.dumbbell-weight.left { left: 20px; }
.dumbbell-weight.right { right: 20px; }

/* --- General Section Styling --- */
section {
    padding: 100px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Classes Section --- */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}
.class-card {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(0, 242, 254, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.class-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.1);
}
.class-card::after { /* Ripple effect */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(0, 242, 254, 0.5);
    opacity: 0;
    border-radius: 50%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}
.class-card:hover::after {
    animation: ripple 1s ease-out;
}
@keyframes ripple {
    to {
        transform: scale(75) translate(-50%, -50%);
        opacity: 0;
    }
}
.class-card h3 {
    color: var(--accent-color-1);
    margin-bottom: 10px;
}

/* --- Coaches Section --- */
.coaches-section {
    overflow: hidden; /* Important for slide-in effect */
}
.coach-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.coach-panel {
    display: flex;
    align-items: center;
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.coach-panel img {
    width: 250px;
    height: 250px;
    object-fit: cover;
}
.coach-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 15, 26, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    text-align: center;
}
.coach-panel:hover .coach-overlay {
    opacity: 1;
}

/* --- Nutrition Section --- */
.infographics-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
}
.infographic-item {
    text-align: center;
}
.progress-ring-bg {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 10;
}
.progress-ring-circle {
    fill: none;
    stroke: var(--accent-color-1);
    stroke-width: 10;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 408.4; /* 2 * pi * 65 */
    stroke-dashoffset: 408.4;
    transition: stroke-dashoffset 2s ease-out;
}
.infographic-item.is-visible .progress-ring-circle {
    stroke-dashoffset: calc(408.4 - (408.4 * var(--percent)) / 100);
}
.infographic-item h4 {
    margin-top: 15px;
    font-size: 1.2rem;
}

/* --- Testimonials Section (3D Cube) --- */
.testimonials-section {
    padding-bottom: 150px; /* space for cube rotation */
}
.testimonial-cube-container {
    width: 250px;
    height: 250px;
    perspective: 1500px;
    margin: 50px auto;
}
.testimonial-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 20s infinite linear;
}
@keyframes rotate-cube {
    from { transform: rotateY(0deg) rotateX(0deg); }
    to { transform: rotateY(360deg) rotateX(360deg); }
}
.cube-face {
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(26, 28, 45, 0.8);
    border: 1px solid var(--accent-color-2);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}
.cube-face img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: 10px;
}
.cube-face.front  { transform: rotateY(0deg) translateZ(125px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(125px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(125px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(125px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(125px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(125px); }


/* --- Blog Section (Masonry) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    grid-auto-rows: 0;
}
.blog-card {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s;
}
.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-card-content {
    padding: 20px;
    position: relative;
}
.blog-card-content p {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.blog-card:hover .blog-card-content p {
    opacity: 1;
}
.blog-card-content a {
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    background: var(--secondary-color);
    padding: 50px 10%;
    text-align: center;
}
.footer-subscribe {
    margin-bottom: 30px;
}
.footer-subscribe input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--accent-color-2);
    background: var(--primary-color);
    color: var(--text-color);
    width: 250px;
    margin-right: 10px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent-color-1);
}

/* --- Modals (Auth & Generic) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

/* Auth Modal Specifics */
.auth-container {
    background-color: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}
.sign-in-container { left: 0; width: 50%; z-index: 2; }
.sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.form-container form {
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}
.form-container input {
    background-color: var(--secondary-color);
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 5px;
    color: var(--text-color);
}
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}
.overlay {
    background: var(--accent-color-2);
    background: linear-gradient(to right, var(--accent-color-2), var(--accent-color-1));
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #FFFFFF;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}
.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}
.overlay-left { transform: translateX(-20%); }
.overlay-right { right: 0; transform: translateX(0); }
/* Slide Animation */
.auth-container.right-panel-active .sign-in-container { transform: translateX(100%); }
.auth-container.right-panel-active .overlay-container { transform: translateX(-100%); }
.auth-container.right-panel-active .overlay { transform: translateX(50%); }
.auth-container.right-panel-active .overlay-left { transform: translateX(0); }
.auth-container.right-panel-active .overlay-right { transform: translateX(20%); }
.auth-container.right-panel-active .sign-up-container { transform: translateX(100%); opacity: 1; z-index: 5; animation: show 0.6s; }
@keyframes show { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }

/* Generic Modal Content */
.modal-content {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

/* --- Animated Alert --- */
.custom-alert {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    z-index: 3000;
    transition: top 0.5s ease-in-out;
}
.custom-alert.show { top: 20px; }
.custom-alert.success { background: linear-gradient(90deg, #1d976c, #93f9b9); }
.custom-alert.error { background: linear-gradient(90deg, #d31027, #ea384d); }

/* --- Scroll-triggered Animations --- */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll[data-animation="fade-in"] { transform: translateY(30px); }
.animate-on-scroll[data-animation="fade-in-up"] { transform: translateY(50px); }
.animate-on-scroll[data-animation="fade-in-right"] { transform: translateX(-50px); }
.animate-on-scroll[data-animation="fade-in-left"] { transform: translateX(50px); }
.animate-on-scroll[data-animation="slide-in-left"] { transform: translateX(-100%); }
.animate-on-scroll[data-animation="slide-in-right"] { transform: translateX(100%); }
.animate-on-scroll[data-animation="zoom-in"] { transform: scale(0.9); }

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    
    /* Mobile Navigation */
    .nav-menu { display: none; }
    .nav-mobile-menu-button {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1002;
    }
    .line {
        width: 100%;
        height: 3px;
        background-color: var(--text-color);
        transition: all 0.3s;
    }
    .mobile-menu-open .line-1 { transform: rotate(45deg) translate(7px, 7px); }
    .mobile-menu-open .line-2 { transform: rotate(-45deg) translate(5px, -6px); }
    
    .mobile-menu-circle {
        display: block;
        position: fixed;
        top: -100vmax; right: -100vmax;
        width: 200vmax;
        height: 200vmax;
        background-color: var(--secondary-color);
        border-radius: 50%;
        transform: scale(0);
        transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1);
        z-index: 1001;
    }
    .mobile-menu-circle.open {
        transform: scale(1);
    }
    /* Re-enable nav menu inside circle */
    .mobile-menu-circle.open + main .navbar .nav-menu,
    #main-header.mobile-menu-open .nav-menu {
        display: flex;
        position: fixed;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        flex-direction: column;
        align-items: center;
        gap: 40px;
        z-index: 1002;
        font-size: 1.5rem;
    }
    
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero-split-left h1 { font-size: 2.5rem; }
    .hero-split-right { margin-top: 50px; }

    .coach-panel { flex-direction: column; text-align: center; }
    .coach-panel img { width: 100%; height: auto; }
    
    .infographics-container { flex-direction: column; align-items: center; }
    
    .auth-container { width: 90%; min-height: 550px; }
    .form-container { width: 100%; }
    .sign-in-container { z-index: 0; }
    .overlay-container { display: none; }
    .auth-container.right-panel-active .sign-up-container { transform: translateX(0); }
}