/* 
   NEXUS BODY FITNESS - Main Stylesheet
   Colors: Dark Navy (#0f172a), Neon Lime (#a3e635), White (#ffffff), Gray (#94a3b8)
   Fonts: Oswald (Headings), Inter (Body)
*/

:root {
    --primary: #a3e635;
    --primary-hover: #84cc16;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --spacing-section: 4rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

h3 {
    font-size: 1.75rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary);
    color: var(--dark);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--dark);
}

.section {
    padding: var(--spacing-section) 0;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Header */
header {
    background-color: rgba(15, 23, 42, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)),
        url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1470&auto=format&fit=crop') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--dark-lighter);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Programs Preview */
.program-card {
    background: var(--dark-lighter);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.program-img {
    height: 200px;
    background-color: #333;
    background-size: cover;
    background-position: center;
}

.program-content {
    padding: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-lighter);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        background-color: var(--dark-lighter);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {}

    .comparison-item {
        position: relative;
        flex: 1;
        width: 50%;
    }

    .comparison-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 3/4;
        display: block;
        transition: transform 0.3s ease;
    }

    .comparison-label {
        position: absolute;

        .mobile-toggle {
            display: none;
            font-size: 1.5rem;
            cursor: pointer;
            font-size: 4rem;
            margin-bottom: 1.5rem;
            text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        }

        .hero-content p {
            font-size: 1.25rem;
            max-width: 700px;
            margin: 0 auto 2.5rem;
            color: var(--text-muted);
        }

        /* Features Grid */
        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }

        .feature-card {
            background: var(--dark-lighter);
            padding: 2rem;
            border-radius: 8px;
            text-align: center;
            transition: transform 0.3s;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .feature-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary);
        }

        .feature-icon {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 1rem;
        }

        /* Programs Preview */
        .program-card {
            background: var(--dark-lighter);
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 2rem;
        }

        .program-img {
            height: 200px;
            background-color: #333;
            background-size: cover;
            background-position: center;
        }

        .program-content {
            padding: 1.5rem;
        }

        /* Footer */
        footer {
            background-color: var(--dark-lighter);
            padding: 4rem 0 2rem;
            margin-top: 4rem;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 3rem;
            margin-bottom: 3rem;
        }

        .footer-col h4 {
            color: var(--primary);
            margin-bottom: 1.5rem;
        }

        .footer-col ul li {
            margin-bottom: 0.8rem;
        }

        .copyright {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--gray);
            font-size: 0.9rem;
        }

        /* Responsive */
        @media (max-width: 768px) {
            h1 {
                font-size: 2.5rem;
            }

            h2 {
                font-size: 2rem;
            }

            .nav-links {
                position: fixed;
                top: 70px;
                right: -100%;
                background-color: var(--dark-lighter);
                flex-direction: column;
                width: 100%;
                text-align: center;
                padding: 2rem 0;
                transition: 0.3s;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .nav-links.active {
                right: 0;
            }

            .mobile-toggle {
                display: block;
            }
        }

        /* Before/After Comparison */
        .comparison-container {
            display: flex;
            gap: 4px;
            justify-content: center;
            margin-bottom: 1.5rem;
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        }

        .comparison-item {
            position: relative;
            flex: 1;
            width: 50%;
        }

        .comparison-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            aspect-ratio: 3/4;
            display: block;
            transition: transform 0.3s ease;
        }

        .comparison-label {
            position: absolute;
            bottom: 10px;
            left: 0;
            right: 0;
            text-align: center;
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            font-size: 0.8rem;
            padding: 4px 0;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            backdrop-filter: blur(4px);
        }

        .feature-card:hover .comparison-img {
            transform: scale(1.05);
        }

        /* Statistics Cards */
        .stat-card {
            background: var(--dark-lighter);
            padding: 1.5rem;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.3s;
        }

        .stat-card:hover {
            border-color: rgba(163, 230, 53, 0.3);
            transform: translateY(-2px);
        }

        .stat-card h3 {
            margin-bottom: 0.25rem;
            font-size: 1.5rem;
        }

        .stat-card small {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Chat Window */
        .chat-window {
            background: var(--dark-lighter);
            border-radius: 8px;
            height: 500px;
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(255, 255, 255, 0.05);
            overflow: hidden;
        }

        .chat-messages {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        /* Custom Scrollbar for Chat */
        .chat-messages::-webkit-scrollbar {
            width: 8px;
        }

        .chat-messages::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: rgba(163, 230, 53, 0.3);
            border-radius: 4px;
        }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: rgba(163, 230, 53, 0.5);
        }

        /* Chat Messages */
        .message {
            max-width: 80%;
            padding: 1rem 1.25rem;
            border-radius: 12px;
            line-height: 1.5;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message.bot {
            background: rgba(255, 255, 255, 0.05);
            margin-right: auto;
            border-left: 3px solid var(--primary);
        }

        .message.user {
            background: linear-gradient(135deg, rgba(163, 230, 53, 0.2), rgba(132, 204, 22, 0.1));
            margin-left: auto;
            color: #fff;
            border-left: 3px solid var(--primary);
        }

        /* Chat Input */
        .chat-input {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            gap: 1rem;
            background: rgba(0, 0, 0, 0.2);
        }

        .chat-input input {
            flex: 1;
        }

        /* Form Controls for Member Area */
        .form-control {
            width: 100%;
            padding: 0.8rem 1rem;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            font-family: var(--font-body);
            font-size: 0.95rem;
            transition: all 0.3s;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.08);
        }

        .form-control::placeholder {
            color: var(--gray);
        }

        /* Progress Bars */
        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), #84cc16);
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        /* Calendar Grid (for Training Plans) */
        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 0.5rem;
        }

        .calendar-day {
            aspect-ratio: 1;
            background: var(--dark-lighter);
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0.75rem;
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: all 0.3s;
            cursor: pointer;
        }

        .calendar-day:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
        }

        .calendar-day.active {
            background: rgba(163, 230, 53, 0.1);
            border-color: var(--primary);
        }

        /* Video Grid */
        .video-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }

        .video-card {
            background: var(--dark-lighter);
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s;
            border: 1px solid rgba(255, 255, 255, 0.05);
            cursor: pointer;
        }

        .video-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary);
        }

        .video-thumbnail {
            width: 100%;
            aspect-ratio: 16/9;
            background: #333;
            position: relative;
            overflow: hidden;
        }

        .video-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .video-play-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60px;
            height: 60px;
            background: rgba(163, 230, 53, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: var(--dark);
            transition: all 0.3s;
        }

        .video-card:hover .video-play-icon {
            transform: translate(-50%, -50%) scale(1.1);
        }

        .video-info {
            padding: 1rem;
        }

        /* Leaderboard */
        .leaderboard {
            background: var(--dark-lighter);
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .leaderboard-item {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: background 0.3s;
        }

        .leaderboard-item:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        border-left: 3px solid var(--primary);
    }

    .message.user {
        background: linear-gradient(135deg, rgba(163, 230, 53, 0.2), rgba(132, 204, 22, 0.1));
        margin-left: auto;
        color: #fff;
        border-left: 3px solid var(--primary);
    }

    /* Chat Input */
    .chat-input {
        padding: 1rem 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.2);
    }

    .chat-input input {
        flex: 1;
    }

    /* Form Controls for Member Area */
    .form-control {
        width: 100%;
        padding: 0.8rem 1rem;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
        font-family: var(--font-body);
        font-size: 0.95rem;
        transition: all 0.3s;
    }

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        background: rgba(255, 255, 255, 0.08);
    }

    .form-control::placeholder {
        color: var(--gray);
    }

    /* Progress Bars */
    .progress-bar {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        overflow: hidden;
        position: relative;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--primary), #84cc16);
        border-radius: 4px;
        transition: width 0.5s ease;
    }

    /* Calendar Grid (for Training Plans) */
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 0.5rem;
    }

    .calendar-day {
        aspect-ratio: 1;
        background: var(--dark-lighter);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s;
        cursor: pointer;
    }

    .calendar-day:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }

    .calendar-day.active {
        background: rgba(163, 230, 53, 0.1);
        border-color: var(--primary);
    }

    /* Video Grid */
    .video-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .video-card {
        background: var(--dark-lighter);
        border-radius: 8px;
        overflow: hidden;
        transition: all 0.3s;
        border: 1px solid rgba(255, 255, 255, 0.05);
        cursor: pointer;
    }

    .video-card:hover {
        transform: translateY(-5px);
        border-color: var(--primary);
    }

    .video-thumbnail {
        width: 100%;
        aspect-ratio: 16/9;
        background: #333;
        position: relative;
        overflow: hidden;
    }

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .video-play-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 60px;
        height: 60px;
        background: rgba(163, 230, 53, 0.9);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: var(--dark);
        transition: all 0.3s;
    }

    .video-card:hover .video-play-icon {
        transform: translate(-50%, -50%) scale(1.1);
    }

    .video-info {
        padding: 1rem;
    }

    /* Leaderboard */
    .leaderboard {
        background: var(--dark-lighter);
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .leaderboard-item {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: background 0.3s;
    }

    .leaderboard-item:hover {
        background: rgba(255, 255, 255, 0.02);
    }

    .leaderboard-item:last-child {
        border-bottom: none;
    }

    .leaderboard-rank {
        width: 40px;
        height: 40px;
        background: rgba(163, 230, 53, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: var(--primary);
    }

    .leaderboard-item.top-3 .leaderboard-rank {
        background: linear-gradient(135deg, var(--primary), #84cc16);
        color: var(--dark);
    }

    /* Responsive Member Area */
    @media (max-width: 968px) {
        .dashboard-grid {
            grid-template-columns: 1fr;
        }

        .sidebar {
            position: relative;
            top: 0;
        }

        /* Sidebar menu remains vertical by default, so no overrides needed here */

        .message {
            max-width: 90%;
        }
    }

    @media (max-width: 600px) {
        .stat-card h3 {
            font-size: 1.25rem;
        }

        .chat-window {
            height: 400px;
        }

        .calendar-grid {
            grid-template-columns: repeat(4, 1fr);
        }

        .video-grid {
            grid-template-columns: 1fr;
        }
    }