/* Account Page Styles */

.account-main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 40px 80px;
    background-color: #f4f4f4;
    position: relative;
    overflow: hidden;
}

.account-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../Heropage.png');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.9) blur(5px);
    opacity: 0.3;
    z-index: 1;
}

.account-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
}

/* Auth Card Styling */
.auth-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.auth-form-wrapper {
    text-align: center;
}

.auth-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #000;
}

.auth-subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 40px;
}

/* Form Inputs and Labels */
.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 15px 10px 10px;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: #000;
    transition: border-color 0.3s;
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 5px;
    font-size: 1rem;
    color: #888;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group input:valid {
    border-bottom-color: #000;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -5px;
    left: 0;
    font-size: 0.75rem;
    color: #000;
}

/* Buttons and Links */
.auth-button {
    width: 100%;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    padding: 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.auth-button:hover {
    background: #fff;
    color: #000;
}

.auth-switch {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #555;
}

.auth-switch a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

/* Forgot password link */
.forgot-password { text-align: right; margin: -10px 0 20px; }
.forgot-password-link {
    background: none;
    border: none;
    color: #333;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.forgot-password-link:hover { color: #000; }

/* --- Redesigned Dashboard Styles --- */
:root {
    --accent-color: #000000;
    --card-bg-light: rgba(255, 255, 255, 0.9);
    --card-border-light: rgba(0, 0, 0, 0.08);
    --text-primary-dark: #000000;
    --text-secondary-dark: #555555;
}

.dashboard-container {
    max-width: 1200px;
    width: 100%;
    color: var(--text-primary-dark);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 30px;
    padding: 0 40px;
    margin: 0 auto;
}

.dashboard-container.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Dashboard Grid Items */
.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #000, #333, #000);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* Profile Header */
.profile-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    border-radius: 20px;
    padding: 50px;
    position: relative;
    overflow: hidden;
}
.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.profile-left {
    display: flex;
    align-items: center;
    z-index: 2;
    position: relative;
}

.avatar-container {
    width: 80px;
    height: 80px;
    margin-right: 30px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-info {
    flex-grow: 1;
}

.profile-email {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 1px;
}

.profile-tagline {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    font-style: italic;
    margin: 0;
}
.edit-profile-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    z-index: 2;
    position: relative;
}

.edit-profile-btn:hover {
    background: white;
    border-color: white;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Order History */
.order-history {
    grid-column: 1;
    grid-row: 2;
}
.section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-align: left;
    color: #000;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #000, #666);
}
.timeline-empty {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed #ddd;
    position: relative;
    overflow: hidden;
}

.timeline-empty::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.timeline-empty p {
    font-size: 1.3rem;
    color: #000;
    margin-bottom: 8px;
    font-weight: 600;
}

.timeline-empty span {
    color: #666;
    font-size: 1rem;
    font-style: italic;
}

/* New Dashboard Sections */
.workout-stats {
    grid-column: 2;
    grid-row: 2;
}

.motivation-section {
    grid-column: 1 / -1;
    grid-row: 3;
    background: linear-gradient(135deg, #f8f8f8 0%, #fff 100%);
    text-align: center;
    padding: 60px 40px;
    position: relative;
}

.motivation-section::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 40px;
    font-size: 8rem;
    color: rgba(0,0,0,0.1);
    font-family: Georgia, serif;
}

.motivation-quote {
    font-size: 2rem;
    font-style: italic;
    color: #000;
    margin-bottom: 20px;
    font-family: Georgia, serif;
    line-height: 1.3;
}

.motivation-author {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
    letter-spacing: 1px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 1px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Logout Button */
.logout-section {
    grid-column: 1 / -1;
    grid-row: 4;
    text-align: center;
    padding: 40px 0;
}

.logout-button-redesigned {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #ffffff;
    border: none;
    padding: 20px 60px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.logout-button-redesigned::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.logout-button-redesigned:hover::before {
    left: 100%;
}

.logout-button-redesigned:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}


/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    background: #ffffff;
    border: 1px solid var(--card-border-light);
    border-radius: 12px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    position: relative;
    transform: scale(0.95);
    transition: all 0.4s ease;
}
.modal-overlay.visible .modal-card {
    transform: scale(1);
}
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}
.close-modal-btn:hover {
    color: var(--text-primary-dark);
}
.modal-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary-dark);
}
.modal-subtitle {
    text-align: center;
    color: var(--text-secondary-dark);
    margin-bottom: 40px;
}

#modal-message-container {
    text-align: center;
    margin-top: 20px;
    color: var(--text-primary-dark);
}

/* --- Original Dashboard Styles (kept for fallback) --- */
.dashboard-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    margin-bottom: 10px;
}

.dashboard-welcome {
    margin-bottom: 40px;
    color: #333;
}

.dashboard-content {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 30px;
    text-align: left;
}

.dashboard-card h3 {
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-card p {
    color: #555;
    margin-bottom: 20px;
}

.dashboard-button {
    background: transparent;
    border: 1px solid #000;
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.dashboard-button:hover {
    background: #000;
    color: #fff;
}

.logout {
    max-width: 200px;
    margin: 0 auto;
}

/* Message/Error Styling */
.message-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 15px 30px;
    border-radius: 6px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.message-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -10px);
}

/* Desktop Layout - Force 2 column grid */
@media (min-width: 1025px) {
    .dashboard-container {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto auto auto !important;
        display: grid !important;
    }
    
    .profile-header {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }
    
    .order-history {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }
    
    .workout-stats {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }
    
    .motivation-section {
        grid-column: 1 / -1 !important;
        grid-row: 3 !important;
    }
    
    .logout-section {
        grid-column: 1 / -1 !important;
        grid-row: 4 !important;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto;
        max-width: 800px;
    }
    
    .profile-header {
        grid-column: 1;
        grid-row: 1;
    }
    
    .order-history {
        grid-column: 1;
        grid-row: 2;
    }
    
    .workout-stats {
        grid-column: 1;
        grid-row: 3;
    }
    
    .motivation-section {
        grid-column: 1;
        grid-row: 4;
    }
    
    .logout-section {
        grid-column: 1;
        grid-row: 5;
    }
}

@media (max-width: 768px) {
    .account-main {
        padding: 100px 15px 60px;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .dashboard-container {
        padding: 0 15px;
        gap: 20px;
    }
    
    .dashboard-card {
        padding: 24px 20px;
    }
    
    .profile-header {
        padding: 28px 20px;
        border-radius: 16px;
    }
    
    .profile-left {
        flex-direction: column;
        text-align: center;
    }
    
    .avatar-container {
        width: 64px;
        height: 64px;
        margin: 0 0 12px 0;
    }
    
    .auth-title, .profile-email {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }

    .profile-email {
        letter-spacing: 0.5px;
        line-height: 1.1;
        overflow-wrap: anywhere; /* handle long emails on small screens */
    }

    .profile-tagline { font-size: 0.9rem; }
    .section-title { font-size: clamp(1.4rem, 6vw, 1.6rem); }
    .timeline-empty { padding: 28px 18px; }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .motivation-quote {
        font-size: 1.5rem;
    }
    
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
} 

@media (max-width: 480px) {
    .profile-header { padding: 24px 16px; }
    .profile-header::before { width: 200px; height: 200px; }
    .dashboard-card { padding: 20px 16px; }
}
/* —— Center the account page on mobile —— */
@media (max-width: 768px) {
    /* Center grid items */
    .dashboard-container {
      grid-template-columns: 1fr !important;
      justify-items: center;        /* key */
      align-items: start;
      padding: 0 16px !important;
    }
  
    /* Cap width of each card/section and center them */
    .profile-header,
    .dashboard-card,
    .order-history,
    .workout-stats,
    .motivation-section,
    .logout-section {
      width: min(100%, 560px);      /* reduce the huge left/right gutters */
      margin: 0 auto;               /* center */
    }
  
    /* Tidy the profile header for centered layout */
    .profile-header { text-align: center; }
    .profile-left { flex-direction: column; align-items: center; gap: 10px; }
    .section-title { text-align: left; width: 100%; } /* keep section titles aligned inside centered card */
  
    /* Optional: make the empty timeline card centered inside its parent */
    .timeline-empty { margin: 0 auto; }
  }