/* RepX Authentication Styles */

/* Authentication Container */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Logo */
.auth-logo {
    font-size: 48px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -2px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Title */
.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 40px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

/* Buttons */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.auth-btn.primary {
    background: white;
    color: black;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.auth-btn.primary:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.auth-btn.full-width {
    width: 100%;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Back Button */
.auth-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Form */
.auth-form {
    text-align: left;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.auth-input:invalid {
    border-color: rgba(255, 100, 100, 0.5);
}

/* Password Requirements */
.password-requirements {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    text-align: right;
    margin-bottom: 24px;
}

/* Checkbox Container */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: white;
    border-color: white;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: white;
}

/* Footer */
.auth-footer {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.auth-footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Messages */
.auth-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    animation: slideDown 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.auth-message.success {
    background: rgba(0, 200, 81, 0.9);
    color: white;
    box-shadow: 0 8px 16px rgba(0, 200, 81, 0.3);
}

.auth-message.error {
    background: rgba(255, 100, 100, 0.9);
    color: white;
    box-shadow: 0 8px 16px rgba(255, 100, 100, 0.3);
}

.auth-message.info {
    background: rgba(0, 150, 255, 0.9);
    color: white;
    box-shadow: 0 8px 16px rgba(0, 150, 255, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* App Bar Updates */
.app-bar {
    position: relative;
}

.logout-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Getting Started Card */
.getting-started-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.getting-started-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.getting-started-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.start-workout-btn {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-workout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .auth-content {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .auth-subtitle {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .auth-logo {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .auth-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .auth-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .auth-back-btn {
        top: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .auth-content {
        padding: 25px 15px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .auth-subtitle {
        font-size: 18px;
    }
    
    .auth-logo {
        font-size: 36px;
    }
}

/* Tablet Responsiveness */
@media (min-width: 768px) {
    .auth-content {
        padding: 50px 40px;
        max-width: 500px;
    }
    
    .auth-title {
        font-size: 32px;
    }
    
    .auth-subtitle {
        font-size: 28px;
    }
    
    .auth-logo {
        font-size: 56px;
    }
    
    .auth-btn {
        padding: 18px 36px;
        font-size: 18px;
    }
    
    .auth-input {
        padding: 18px 24px;
        font-size: 18px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .auth-container {
        background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-input {
        border-width: 2px;
    }
    
    .auth-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-btn,
    .auth-input,
    .auth-message {
        transition: none;
    }
    
    .auth-message {
        animation: none;
    }
}

/* App Content Styles */
.app-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-bar-title .logo {
    font-size: 24px;
    font-weight: 900;
    color: white;
    letter-spacing: -1px;
}

.app-bar-title .subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.content-section {
    padding: 20px;
    padding-bottom: 100px; /* Space for bottom nav */
}

.section-header {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 32px 0 16px 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    font-size: 28px;
    font-weight: 900;
    color: white;
    margin-bottom: 4px;
}

.stat-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.action-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.action-icon {
    font-size: 24px;
}

.action-arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
}

.action-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.getting-started-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.getting-started-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.getting-started-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.start-workout-btn {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.start-workout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
}

.nav-icon {
    font-size: 20px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.active .nav-label {
    color: white;
}

/* Mobile Responsiveness for App Content */
@media (max-width: 480px) {
    .content-section {
        padding: 16px;
        padding-bottom: 100px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .action-card {
        padding: 16px;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 12px;
    }
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.activity-item {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.activity-icon {
    font-size: 20px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.activity-subtitle {
    font-size: 12px;
    color: #9E9E9E;
}

.activity-badge {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Workout Card */
.workout-card {
    background: #1E1E1E;
    border: 0.5px solid #424242;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.workout-info {
    flex: 1;
}

.workout-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.workout-subtitle {
    font-size: 12px;
    color: #9E9E9E;
}

.workout-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(0, 200, 81, 0.2);
    color: #00C851;
}

.workout-exercises {
    border-top: 0.5px solid #424242;
    padding-top: 12px;
}

.exercise-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9E9E9E;
    margin-bottom: 4px;
}

/* App Version */
.app-version {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin: 24px 0;
}

/* Logout Button */
.logout-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #FF4444;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}
