:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --gold: #fbbf24;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
/* ================= PLAYER GUIADO (DASHBOARD) ================= */
.player-dashboard {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(40, 40, 40, 0.6));
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}
.player-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}
.global-timer-box {
    text-align: center;
    min-width: 100px;
    background: rgba(0,0,0,0.4);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.pause-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
    width: 100%;
}
.pause-btn.paused {
    background: var(--secondary);
}
.pause-btn:hover {
    transform: scale(1.05);
}
.global-timer-box .label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
#global-stopwatch {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gold);
    font-family: 'Outfit';
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.progress-steps-box {
    flex: 1;
}
.player-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}
#player-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ffffff);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#player-progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* CARD DE EXERCÍCIO ATIVO */
.active-exercise-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    margin-top: 10px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    animation: slideUp 0.5s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.active-exercise-card img {
    width: 100%;
    max-width: 400px;
    max-height: 280px;
    object-fit: contain;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 3px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}
.active-exercise-card h3 {
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 5px;
}
.active-exercise-card .badge-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}
.active-exercise-card .badge {
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.9rem;
}
.active-exercise-card .desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 30px;
    padding: 0 10px;
}
.active-exercise-card .action-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.active-exercise-card .action-btns button {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ================= WELCOME SCREEN ================= */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #0f172a;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: flex-start; /* Permite rolar desde o topo */
    overflow-y: auto; /* Habilita rolagem vertical */
    padding: 40px 20px;
}
.welcome-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    border-radius: 30px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    margin: auto; /* Centraliza se couber */
}
.choose-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas para mobile/compacto */
    gap: 15px;
    margin-top: 20px;
}
@media (max-width: 480px) {
    .choose-profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .profile-choice-btn {
        padding: 15px 10px;
        width: 100%; /* Ocupa a coluna */
    }
    .avatar-circle {
        width: 80px !important;
        height: 80px !important;
    }
    .active-user-badge {
        position: relative; /* Deixa de ser fixo no mobile para não sobrepor */
        top: 0;
        right: 0;
        margin: 10px auto 20px;
        width: fit-content;
    }
}
.profile-choice-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
}
.profile-choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}
.avatar-circle {
    width: 110px !important;
    height: 110px !important;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.avatar-circle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}
.profile-choice-btn span {
    font-size: 1.2rem;
    font-weight: 800;
}

/* ACTIVE PROFILE INDICATOR */
.active-user-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.badge-avatar-img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    object-fit: cover !important;
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.switch-profile-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    margin-left: 5px;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 10px;
    transition: color 0.2s;
}
.switch-profile-btn:hover { color: var(--primary); }

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

/* NOTIFICATIONS BADGE */
.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* CHAT MESSAGES */
.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}
.chat-msg.mine {
    flex-direction: row-reverse;
}
.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}
.chat-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}
.chat-content {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.chat-msg.mine .chat-content {
    align-items: flex-end;
}
.chat-author {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    margin-left: 4px;
}
.chat-text {
    background: rgba(255,255,255,0.05);
    padding: 10px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    font-size: 0.95rem;
}
.chat-msg.mine .chat-text {
    background: var(--primary);
    color: white;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* TOP NAVIGATION */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 40px;
    margin-bottom: 30px;
    position: sticky;
    top: 10px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    position: relative;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.nav-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 5px;
    background: linear-gradient(to right, var(--primary), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-selector {
    background: var(--card-bg);
    padding: 5px;
    border-radius: 30px;
    display: flex;
    gap: 5px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.profile-selector::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.profile-selector button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.profile-selector button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Dashboard */
.dashboard {
    margin-bottom: 40px;
}

.stats-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.stats-card h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#progress-text {
    font-weight: 800;
    font-size: 1.2rem;
}

.gamification {
    display: flex;
    gap: 15px;
}

.level-badge {
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold);
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.2);
    font-size: 0.9rem;
}

.points {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Grid */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.day-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.day-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.day-card.completed {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--secondary);
}

.day-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.day-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.check-mark {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--secondary);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.day-card.completed .check-mark {
    opacity: 1;
    top: 10px;
    right: 10px;
}

/* Badge de Vôlei Externo */
.external-day {
    border-color: rgba(139, 92, 246, 0.4);
}
.external-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #8b5cf6;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-color); 
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color); 
    border-radius: 10px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-right: 40px;
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--primary);
}

.duration-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.workout-list {
    list-style: none;
    margin-bottom: 25px;
}

.workout-list li {
    background: var(--bg-color);
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.workout-list li .ex-img-container {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.workout-list li .ex-img-container:hover {
    transform: scale(1.05);
}

.workout-list li .ex-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workout-list li .ex-info {
    flex-grow: 1;
}

.workout-list h4 {
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.05rem;
}

.workout-list p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nutrition-card {
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.nutrition-card h3 {
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(to right, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.primary-btn.done {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    background-image: none;
    box-shadow: none;
}

@media(max-width: 600px) {
    .profile-selector {
        width: 100%;
        display: flex;
    }
    .profile-selector button {
        flex: 1;
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 2000;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid var(--primary);
    transform: scale(0.9);
    transition: 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: 0.2s;
}

.lightbox-close:hover {
    color: var(--primary);
}

/* ================= NAV ABAS (AGORA NO TOPO) ================= */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.tab-content.active {
    display: block;
}

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

/* ================= GYMRATS SOCIAL ================= */
.gymrats-board {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    height: 70vh;
    display: flex;
    flex-direction: column;
}

.gymrats-board h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    margin-bottom: 15px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    padding: 10px;
    border-radius: 0 10px 10px 0;
    position: relative;
}
.chat-msg.mine {
    background: rgba(16, 185, 129, 0.1);
    border-left: none;
    border-right: 3px solid var(--secondary);
    border-radius: 10px 0 0 10px;
    align-items: flex-end;
}

.chat-author {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 4px;
}
.chat-mine-author { color: var(--secondary); }
.chat-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}
.chat-input-area input {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.3);
    color: var(--text);
    font-family: 'Outfit';
}
.chat-input-area button {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
}

/* ================= PLAYER TREINO & TIMERS ================= */
.science-pill {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgb(139, 92, 246);
    color: #c4b5fd;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.workout-player-list {
    list-style: none;
    padding: 0;
}

.player-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.2s;
}
.player-item.completed {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.05);
    opacity: 0.6;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 15px;
}
.player-header img {
    min-width: 80px;
    max-width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.player-details { flex: 1; }
.player-details h4 { margin-bottom: 5px; color: var(--primary); }

.player-meta-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}
.badge.reps {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge.time {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ex-full-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}


.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 5px;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
}

.timer-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timer-btn.play { color: #10b981; }
.timer-btn.pause { color: #f59e0b; }

.check-btn {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.check-btn:hover, .player-item.completed .check-btn {
    background: var(--secondary);
    color: white;
}

/* Overlay de Descanso */
.rest-timer-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid var(--primary);
    padding: 40px;
    border-radius: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}
.rest-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.secondary-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 10px;
    margin-top: 20px;
    cursor: pointer;
}
