/* assets/css/style.css */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Genos:wght@400;700&family=Homenaje&family=Iceland&display=swap');

/* Define your Color Palette as CSS Variables for easy reuse */
:root {
    --white: #FFFFFF;
    --dark-gray: #2E2E2E;
    --black: #000000;
    --gym-green: #00C753;
    --bright-green: #00FF00;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Genos', sans-serif;
    color: var(--white);
}

/* Background Setup (Changes based on screen size) */
.landing-bg {
    background-image: url('../images/bg-mobile.jpg'); /* Put your mobile image here */
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .landing-bg {
        background-image: url('../images/bg-desktop.jpg'); /* Put your desktop image here */
    }
}

/* Typography */
h1 { font-family: 'Iceland', sans-serif; font-size: 4rem; margin: 0; color: var(--bright-green); }
h0 { font-family: 'Genos', sans-serif; font-size: 4rem; font-weight: bold; margin: 0; color: var(--bright-green); }
.quote { font-family: 'Homenaje', sans-serif; font-size: 1.5rem; text-align: center; }

/* The Start Button */
.start-btn {
    background-color: var(--gym-green);
    color: var(--white);
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Genos', sans-serif;
    transition: 0.3s ease;
}
.start-btn:hover { background-color: var(--bright-green); color: var(--black); }

/* --- THE FROSTED GLASS MODAL --- */
.glass-modal {
    position: fixed;
    bottom: -100%; /* Hidden by default off the bottom of the screen */
    left: 0;
    width: 100%;
    height: 75vh;
    background: rgba(46, 46, 46, 0.4); /* Semi-transparent dark gray */
    backdrop-filter: blur(10px); /* The magic glass effect */
    -webkit-backdrop-filter: blur(10px);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transition: bottom 0.5s ease-in-out;
    padding: 2rem;
    box-sizing: border-box;
    z-index: 100;
    overflow-y: auto; /* Adds scrollbar to the modal if content is too long */
}

/* Class added by JS to show the modal */
.glass-modal.active { bottom: 0; }

.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px;}
.close-btn { background: none; border: none; color: var(--white); font-size: 2rem; cursor: pointer; }

/* Form inputs */
input, select {
    width: 100%; padding: 10px; margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 5px;
}
input::placeholder { color: #ccc; }
.hidden { display: none; }

/* Prevents background scrolling when modal is open */
body.no-scroll {
    overflow: hidden;
}

/* Style for Google Buttons to align the logo and text */
.google-btn {
    background: var(--white);
    color: var(--black);
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between logo and text */
}
.google-btn:hover {
    background: #f1f1f1;
}

/* --- NAVIGATION BAR --- */
.navbar {
    position: fixed;
    width: 100%;
    background: rgba(46, 46, 46, 0.85); /* Dark gray glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    color: var(--white);
    text-decoration: none;
    padding: 15px 20px;
    text-align: center;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Highlight the active page in green */
.nav-item:hover, .nav-item.active {
    color: var(--gym-green);
}

/* Main Content Wrapper (prevents content from hiding under fixed navbars) */
.main-content {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 100px; /* NEW: Pushes the bottom content up past the mobile navbar! */
    min-height: 100vh;
    box-sizing: border-box;
}

/* Mobile View (Default) */
.navbar { 
    bottom: 0; 
    left: 0; 
    border-top: 1px solid rgba(255,255,255,0.1); 
}
.nav-text { display: none; } /* Hide text on mobile */
.nav-icon { font-size: 1.5rem; }

/* Desktop View (Screens wider than 768px) */
@media (min-width: 768px) {
    .navbar { 
        top: 0; 
        bottom: auto; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        border-top: none; 
        justify-content: center; 
        gap: 50px; 
    }
    .nav-text { 
        display: inline; 
        font-size: 1.2rem; 
        margin-left: 8px;
        font-family: 'Genos', sans-serif;
        font-weight: bold;
        letter-spacing: 1px;
    }
    .nav-icon { display: none; } /* Hide icons on desktop */
    .main-content { 
        padding-top: 100px; /* Give room for top navbar */
        padding-bottom: 2rem; 
    }
}

/* Dashboard Specific Styles */
.dashboard-greeting { font-family: 'Iceland', sans-serif; font-size: 3rem; margin-bottom: 0.5rem; color: var(--bright-green); }
.motivation-box { background: rgba(255, 255, 255, 0.05); border-left: 4px solid var(--gym-green); padding: 1.5rem; margin-bottom: 2rem; border-radius: 5px; }
.motivation-box p { font-size: 1.5rem; margin: 10px 0; font-family: 'Homenaje', sans-serif;}

/* --- ROUTINE GRID VIEW --- */
.routine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns across */
    gap: 15px;
    margin-top: 20px;
}
.grid-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 5px;
    text-align: center;
    text-decoration: none; /* Removes underline from links */
    color: var(--white);
    transition: 0.3s ease;
}
.grid-item:hover {
    background: rgba(0, 199, 83, 0.2); /* Light gym-green tint */
    border-color: var(--gym-green);
}
.grid-icon {
    width: 40px; 
    height: 40px; 
    object-fit: contain; 
    margin-bottom: 8px;
}
.grid-name {
    font-size: 0.9rem; /* Small font as requested */
    font-family: 'Genos', sans-serif;
    display: block;
}

/* --- WORKOUT LIST & DETAILS VIEW --- */
.workout-list-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--gym-green);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--white);
}
.workout-list-item:hover { background: rgba(255, 255, 255, 0.1); }
.workout-details { margin-top: 20px; text-align: center; }
.workout-gif { width: 100%; max-width: 400px; border-radius: 10px; margin: 15px 0; border: 2px solid rgba(255,255,255,0.1); }
.instructions { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; text-align: left; line-height: 1.5; }

/* The Back Button */
.back-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--gym-green);
    color: var(--gym-green);
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 15px;
    font-family: 'Genos', sans-serif;
}
.back-btn:hover { background: var(--gym-green); color: var(--black); }

/* --- PROFILE PAGE STYLES --- */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}
.profile-pic {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gym-green);
    box-shadow: 0 0 15px rgba(0, 199, 83, 0.3);
    margin-bottom: 15px;
}
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}
.profile-card h2 {
    color: var(--white);
    font-family: 'Iceland', sans-serif;
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.profile-card label {
    display: block;
    color: var(--gym-green);
    font-family: 'Genos', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 5px;
    margin-top: 10px;
}
.profile-card input {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 10px;
    width: 100%;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box; /* Fixes the right-edge bleed for all fields */
    margin-bottom: 5px;    /* Adds space before the next label or button */
}
.profile-card input[readonly] {
    background: rgba(0,0,0,0.5);
    color: #888;
    cursor: not-allowed;
}

/* Alert Messages for Success/Error */
.alert-msg {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'Genos', sans-serif;
    font-size: 1.2rem;
    text-align: center;
}
.alert-success {
    background: rgba(0, 199, 83, 0.2);
    border: 1px solid var(--gym-green);
    color: var(--gym-green);
}
.alert-error {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid #ff4757;
    color: #ff4757;
}
/* --- COACH MANAGEMENT STYLES --- */
.member-list-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--white);
    transition: 0.3s ease;
}
.member-list-item:hover {
    background: rgba(0, 199, 83, 0.2);
    border-color: var(--gym-green);
}
.member-pic-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gym-green);
}
.assign-form-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}
.assign-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.assign-form input {
    margin: 0; /* Remove default margin for side-by-side layout */
}

/* --- MODERN DASHBOARD STYLES --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}
.date-display {
    color: var(--gym-green);
    font-family: 'Genos', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap; /* Forces the date to stay on one line */
}

/* Optional: Scale down the font size slightly on mobile */
@media (max-width: 480px) {
    .date-display {
        font-size: 1rem; 
    }
}
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}
/* A subtle glow effect inside the main panel */
.glass-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,199,83,0.05) 0%, transparent 70%);
    z-index: -1;
}
.glass-panel h2 {
    font-family: 'Iceland', sans-serif;
    color: var(--bright-green);
    margin-top: 0;
    font-size: 2rem;
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.action-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 199, 83, 0.3);
    border-radius: 15px;
    padding: 20px 10px;
    text-align: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.action-card:hover {
    background: rgba(0, 199, 83, 0.2);
    border-color: var(--gym-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.action-card i {
    font-size: 2.5rem;
    color: var(--gym-green);
}
.action-card span {
    font-family: 'Genos', sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
}

/* --- SMALL WORKOUT GIF FOR COACH VIEW --- */
.workout-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.workout-gif-small {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: rgba(0,0,0,0.5); /* Background just in case GIF is transparent */
}

/* --- EQUIPMENT GALLERY STYLES --- */
.equipment-grid {
    display: grid;
    /* This automatically figures out how many columns fit on the screen! */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 15px;
    margin-top: 20px;
}
.equipment-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    color: var(--white);
    transition: transform 0.3s ease;
}
.equipment-card:hover {
    transform: translateY(-5px); /* Adds a nice little "lift" effect when hovered */
    border-color: var(--gym-green);
}
.equipment-img {
    width: 100%;
    height: 120px;
    object-fit: cover; /* Keeps images from stretching out of proportion */
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.05);
}
.equipment-name {
    font-family: 'Genos', sans-serif;
    font-size: 1.2rem;
    color: var(--gym-green);
    margin: 0;
    text-transform: capitalize;
}

/* --- PROGRESS BAR FOR COACH VIEW --- */
.progress-wrapper {
    width: 100%;
    margin-top: 12px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}