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

:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #1e293b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --available: #10b981;
    --almost-full: #f59e0b;
    --full: #ef4444;
    --locked: #6b7280;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Success Animation */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
}

.success-message {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: var(--shadow-lg);
    animation: successSlide 3s ease-out;
}

@keyframes successSlide {
    0% { transform: translateY(20px); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-10px); opacity: 0; }
}

.success-icon {
    font-size: 1.5rem;
}

/* Auth Page */
.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.gym-logo {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.gym-logo-small {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-svg {
    height: 3rem;
    width: auto;
}

.logo-svg-small {
    height: 1.5rem;
    width: auto;
}

.gym-logo .logo-text {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

/* Main Layout */
#mainPage {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--light-blue);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.online-count {
    background: var(--light-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}



.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#userInfoClickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 0.5rem;
}

#userInfoClickable:hover {
    background: var(--light-blue);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.chat-icon-btn {
    background: var(--light-blue);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.chat-icon-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.chat-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.chat-icon-btn:hover .chat-icon {
    filter: brightness(0) invert(1);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-modal {
    max-width: 400px;
}

.profile-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.profile-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    font-size: 2rem;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.upload-btn, .remove-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.remove-btn {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
}

.upload-btn:hover, .remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.user-stats {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.menu-btn {
    padding: 0.75rem;
    background: var(--light-blue);
    color: var(--primary-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--primary-blue);
    color: white;
}

.menu-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Content Container */
.content-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Stats Section */
.stats-section {
    margin-bottom: 3rem;
}

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

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--light-blue);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-card.highlight .stat-number {
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 600;
    margin-top: 0.25rem;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Sessions Section */
.sessions-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h1 {
    font-size: 2.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.available { background: var(--available); }
.legend-dot.almost-full { background: var(--almost-full); }
.legend-dot.full { background: var(--full); }
.legend-dot.locked { background: var(--locked); }

/* Sessions Grid */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.session-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.session-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.session-card.available { border-color: var(--available); }
.session-card.almost-full { border-color: var(--almost-full); }
.session-card.full { border-color: var(--full); }
.session-card.locked { 
    border-color: var(--locked); 
    opacity: 0.7;
    cursor: not-allowed;
}

.session-card.reserved {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
    position: relative;
}

.session-card.reserved::after {
    content: '✓ Reservado';
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
}

.session-time {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.session-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-count {
    font-size: 1rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.session-status {
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.session-status.available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--available);
}

.session-status.almost-full {
    background: rgba(245, 158, 11, 0.1);
    color: var(--almost-full);
}

.session-status.full {
    background: rgba(239, 68, 68, 0.1);
    color: var(--full);
}

.session-status.locked {
    background: rgba(107, 114, 128, 0.1);
    color: var(--locked);
}

.waiting-indicator {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--warning);
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 0;
    margin-bottom: 1.5rem;
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.session-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 0 2rem 2rem;
}

.session-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.info-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-number, .info-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 600;
}

.participants-section, .waiting-list-section {
    margin-bottom: 1.5rem;
}

.participants-section h4, .waiting-list-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.participants-list, .waiting-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.participant-item, .waiting-item {
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    border-left: 3px solid var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.waiting-item {
    border-left-color: var(--warning);
}

.waiting-position {
    background: var(--warning);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    color: var(--gray);
    font-style: italic;
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.reserve-btn, .waiting-btn, .unreserve-btn, .leave-waiting-btn {
    flex: 1;
    min-width: 180px;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reserve-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.waiting-btn {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.unreserve-btn, .leave-waiting-btn {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
}

.reserve-btn:hover, .waiting-btn:hover, .unreserve-btn:hover, .leave-waiting-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.reserve-btn:disabled, .waiting-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

/* PWA Installation Prompt */
.pwa-install-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}

.pwa-prompt-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.pwa-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pwa-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.close-pwa-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-pwa-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pwa-body {
    padding: 1.5rem;
}

.pwa-body p {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gray);
    font-weight: 500;
}

.pwa-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.pwa-instructions {
    background: var(--light-blue);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--dark-gray);
    line-height: 1.5;
}

.pwa-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
}

.pwa-instructions li {
    margin-bottom: 0.5rem;
}

.pwa-actions {
    display: flex;
    gap: 0.75rem;
}

.install-pwa-btn, .dismiss-pwa-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-pwa-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.install-pwa-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.dismiss-pwa-btn {
    background: var(--light-gray);
    color: var(--gray);
    border: 1px solid var(--light-blue);
}

.dismiss-pwa-btn:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

/* Universal Install Button */
.universal-install-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.universal-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #059669, #047857);
}

.universal-install-btn:active {
    transform: translateY(0);
}

.universal-install-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.universal-install-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, var(--success), #059669);
}

/* Pulse animation for install button */
.universal-install-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.universal-install-btn:hover::before {
    width: 300px;
    height: 300px;
}

@media (max-width: 768px) {
    .universal-install-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .universal-install-btn span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .universal-install-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .universal-install-btn span {
        font-size: 0.75rem;
    }
}

/* Install Instructions Modal Styles */
.install-instructions-modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.install-instructions-modal ol,
.install-instructions-modal ul {
    color: var(--dark-gray);
}

.install-instructions-modal li {
    margin-bottom: 0.5rem;
}

.install-instructions-modal strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Fullscreen Media Modal */
.fullscreen-media-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    flex-shrink: 0;
}

.fullscreen-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.fullscreen-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.close-fullscreen-btn:hover {
    background: var(--error);
    border-color: var(--error);
}

.fullscreen-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.fullscreen-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.fullscreen-pdf-container {
    width: 100%;
    height: 100%;
    display: flex;
}

.fullscreen-pdf {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.fullscreen-footer {
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    flex-shrink: 0;
}

.zoom-instructions {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Exercise Detail Enhancements */
.exercise-image-container {
    position: relative;
    text-align: center;
}

.exercise-detail-image {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.exercise-detail-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.fullscreen-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.exercise-image-container:hover .fullscreen-hint {
    opacity: 1;
}

.view-fullscreen-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    margin-left: 0.5rem;
}

.view-fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

/* Mobile Responsiveness for Fullscreen Modal */
@media (max-width: 768px) {
    .fullscreen-header {
        padding: 0.75rem 1rem;
    }

    .fullscreen-header h3 {
        font-size: 1rem;
    }

    .fullscreen-controls {
        gap: 0.25rem;
    }

    .control-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem;
    }

    .fullscreen-footer {
        padding: 0.75rem 1rem;
    }

    .zoom-instructions {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .fullscreen-header {
        padding: 0.5rem;
    }

    .fullscreen-header h3 {
        font-size: 0.9rem;
    }

    .control-btn {
        min-width: 32px;
        height: 32px;
    }

    .zoom-instructions {
        font-size: 0.7rem;
    }
}

/* Exercises Section */
.exercises-section {
    margin-top: 3rem;
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-blue);
}

.exercises-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-blue);
}

.exercises-section .section-header h1 {
    position: relative;
}

.exercises-section .section-header h1::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 2px;
}

.add-exercise-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.add-exercise-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669, #047857);
}

.add-exercise-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.add-exercise-btn:hover::before {
    width: 300px;
    height: 300px;
}

.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.empty-exercises {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--light-blue), rgba(37, 99, 235, 0.05));
    border-radius: 20px;
    border: 2px dashed var(--primary-blue);
    position: relative;
    overflow: hidden;
}

.empty-exercises::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.03), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.2));
}

.empty-exercises h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
}

.empty-exercises p {
    color: var(--gray);
    font-size: 1.125rem;
    font-weight: 500;
}

.exercise-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transform-origin: center;
}

.exercise-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.exercise-card:active {
    transform: translateY(-3px) scale(1.01);
}

.exercise-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--light-gray), var(--light-blue));
    position: relative;
}

.exercise-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.exercise-content {
    padding: 1.5rem;
    position: relative;
}

.exercise-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.exercise-day {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.exercise-description {
    color: var(--gray);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exercise-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray);
    padding-top: 1rem;
    border-top: 1px solid var(--light-blue);
}

.exercise-date {
    font-weight: 600;
    color: var(--primary-blue);
}

.delete-exercise-btn {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.delete-exercise-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.exercise-card .click-hint {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    transform: scale(0.9);
    opacity: 0.8;
}

.exercise-card:hover .click-hint {
    transform: scale(1);
    opacity: 1;
}

/* Exercise Modal */
.exercise-modal {
    max-width: 500px;
}

.exercise-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 2px solid var(--light-blue);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.image-upload-area {
    border: 2px dashed var(--light-blue);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.image-upload-area:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 2rem;
}

.upload-placeholder p {
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
}

.upload-placeholder small {
    color: var(--gray);
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

/* Combined Media Upload Styles */
.media-upload-area {
    border: 2px dashed var(--light-blue);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    overflow: hidden;
}

.media-upload-area:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.upload-placeholder {
    padding: 2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon-container {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow);
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upload-text p {
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
    font-size: 1rem;
}

.upload-text small {
    color: var(--gray);
    font-size: 0.8rem;
    line-height: 1.4;
}

.media-preview {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.pdf-preview-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--light-blue);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--primary-blue);
    box-shadow: var(--shadow);
}

.pdf-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.pdf-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 700;
    color: var(--dark-gray);
    font-size: 1rem;
    word-break: break-word;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.file-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.image-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.pdf-badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.remove-media-btn {
    background: var(--error);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.remove-media-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Download Button */
.download-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #059669, #047857);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* Download button pulse effect */
.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.download-btn:hover::before {
    width: 200px;
    height: 200px;
}

/* Download icon animation */
.download-btn:hover .download-icon {
    animation: downloadBounce 0.6s ease-in-out;
}

@keyframes downloadBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--light-blue);
    border-radius: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-attachment:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.file-attachment::before {
    content: '👁️ Clique para visualizar';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.file-attachment:hover::before {
    opacity: 1;
}

.file-attachment:hover .file-icon,
.file-attachment:hover > span:not(.download-btn) {
    opacity: 0.3;
}

.file-attachment .file-icon {
    font-size: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.cancel-btn {
    flex: 1;
    background: var(--light-gray);
    color: var(--gray);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--gray);
    color: white;
}

.submit-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Exercise Detail Modal */
.exercise-detail-modal {
    max-width: 600px;
}

.exercise-detail-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.exercise-detail-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    text-align: center;
}

.exercise-detail-day {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.exercise-detail-description {
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.exercise-detail-meta {
    background: var(--light-blue);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--gray);
}

.exercise-detail-date {
    font-weight: 600;
}

.exercise-detail-author {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .dropdown-menu {
        right: 1rem;
        left: 1rem;
        top: 65px;
        min-width: unset;
    }

    .menu-profile-section {
        padding: 0.25rem 0;
    }

    .menu-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .menu-user-name {
        font-size: 0.9rem;
    }

    .menu-user-email {
        font-size: 0.75rem;
    }

    .menu-item {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .menu-item-icon {
        font-size: 1rem;
    }

    .stats-detailed-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-detail-card {
        padding: 1rem;
    }

    .stat-detail-number {
        font-size: 1.25rem;
    }

    .stat-detail-label {
        font-size: 0.75rem;
    }

    .achievement-section {
        padding: 1rem;
    }

    .achievement-item {
        padding: 0.625rem;
    }

    .achievement-icon {
        font-size: 1.25rem;
    }

    .achievement-title {
        font-size: 0.8rem;
    }

    .achievement-description {
        font-size: 0.7rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .header-left {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .header-right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    .gym-logo-small {
        font-size: 1rem;
    }

    .logo-svg-small {
        height: 1rem;
    }

    .online-count {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        border-radius: 15px;
    }

    .user-info {
        flex: 1;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    /* Exercises Section Mobile */
    .exercises-section {
        margin-top: 2rem;
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .exercises-section .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .exercises-section .section-header h1 {
        text-align: center;
        font-size: 1.75rem;
    }

    .exercises-section .section-header h1::after {
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
    }

    .add-exercise-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.8rem;
        border-radius: 12px;
        align-self: center;
    }

    .exercises-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .empty-exercises {
        padding: 2.5rem 1.5rem;
    }

    .empty-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-exercises h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .empty-exercises p {
        font-size: 1rem;
    }

    .exercise-card {
        border-radius: 16px;
    }

    .exercise-image {
        height: 180px;
    }

    .exercise-content {
        padding: 1.25rem;
    }

    .exercise-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .exercise-day {
        padding: 0.35rem 0.8rem;
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }

    .exercise-description {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        -webkit-line-clamp: 2;
    }

    .exercise-meta {
        font-size: 0.7rem;
        padding-top: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .exercise-card .click-hint {
        top: 10px;
        right: 10px;
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
        border-radius: 15px;
    }

    /* Media Upload Mobile */
    .media-upload-area {
        border-radius: 12px;
    }

    .upload-placeholder {
        padding: 1.5rem 1rem;
        gap: 0.75rem;
    }

    .upload-icon-container {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .upload-text p {
        font-size: 0.9rem;
    }

    .upload-text small {
        font-size: 0.75rem;
    }

    .media-preview {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .preview-image {
        max-height: 150px;
        border-radius: 8px;
    }

    .pdf-preview-container {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .pdf-icon {
        font-size: 1.5rem;
    }

    .file-name {
        font-size: 0.8rem;
    }

    .file-size {
        font-size: 0.7rem;
    }

    .preview-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .file-type-badge {
        align-self: center;
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .remove-media-btn {
        padding: 0.5rem;
        font-size: 0.7rem;
        align-self: center;
        min-width: 120px;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cancel-btn,
    .submit-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .user-details {
        flex: 1;
    }

    .user-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .user-stats {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .sign-out-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    .content-container {
        padding: 0.75rem;
    }

    .section-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .sessions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .stat-icon {
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .legend {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .legend-item {
        font-size: 0.7rem;
        justify-content: flex-start;
    }

    .session-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .session-time {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .session-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .session-count {
        font-size: 0.9rem;
    }

    .session-status {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        align-self: flex-start;
    }

    .waiting-indicator {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }

    .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
        border-radius: 16px;
    }

    .modal-header {
        padding: 1rem 1rem 0;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 0 1rem 1rem;
    }

    .session-info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .info-card {
        padding: 0.75rem 0.5rem;
    }

    .info-icon {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .info-number, .info-text {
        font-size: 0.9rem;
        margin-bottom: 0.125rem;
    }

    .info-label {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .participants-section h4, .waiting-list-section h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .participants-list, .waiting-list {
        max-height: 100px;
        gap: 0.25rem;
    }

    .participant-item, .waiting-item {
        padding: 0.5rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .modal-actions {
        gap: 0.375rem;
    }

    .reserve-btn, .waiting-btn, .unreserve-btn, .leave-waiting-btn {
        padding: 0.625rem;
        font-size: 0.85rem;
        min-height: 40px;
        border-radius: 8px;
    }

    .profile-modal {
        margin: 0.25rem;
    }

    .profile-preview {
        width: 80px;
        height: 80px;
        font-size: 1.25rem;
    }

    .upload-btn, .remove-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .session-card {
        min-height: 48px;
        touch-action: manipulation;
    }

    .user-avatar {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .sign-out-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .reserve-btn, .waiting-btn, .unreserve-btn, .leave-waiting-btn {
        min-height: 48px;
        touch-action: manipulation;
    }

    .close-btn {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 70px;
    right: 2rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--light-blue);
    z-index: 1500;
    min-width: 280px;
    animation: dropdownSlide 0.3s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-content {
    padding: 1rem;
}

.menu-profile-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.menu-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.menu-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.menu-user-info {
    flex: 1;
    min-width: 0;
}

.menu-user-name {
    font-weight: 700;
    color: var(--dark-gray);
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.menu-user-email {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
    word-break: break-word;
}

.menu-divider {
    height: 1px;
    background: var(--light-blue);
    margin: 1rem 0;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-gray);
    text-align: left;
    width: 100%;
}

.menu-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(4px);
}

.menu-item-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.logout-item {
    color: var(--error);
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Edit Name Modal */
.edit-name-modal {
    max-width: 400px;
}

.edit-name-modal .form-group {
    margin-bottom: 1.5rem;
}

.edit-name-modal .form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.edit-name-modal .form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--light-blue);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.edit-name-modal .form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* User Stats Modal */
.user-stats-modal {
    max-width: 500px;
}

.stats-detailed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-detail-card {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-detail-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-detail-icon {
    font-size: 2rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.stat-detail-info {
    flex: 1;
}

.stat-detail-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1;
}

.stat-detail-label {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 600;
    margin-top: 0.25rem;
    line-height: 1.2;
}

.achievement-section {
    background: var(--light-blue);
    border-radius: 12px;
    padding: 1.5rem;
}

.achievement-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    text-align: center;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 3px solid var(--success);
}

.achievement-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-info {
    flex: 1;
}

.achievement-title {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
    line-height: 1.2;
}

.achievement-description {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.125rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}