@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;700;900&display=swap');

:root {
    --bg-color: #0D0D0D;
    --border-color: #262626;
    --card-color: #171717;
    --primary-color: #F000B8;
    --text-primary: #EDEDED;
    --text-secondary: #737373;
    --danger-color: #be123c;
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Archivo Black', 'Inter', sans-serif; 
}

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

html, body { width: 100%; overflow-x: hidden; }

body { 
    font-family: var(--font-sans); 
    background-color: var(--bg-color); 
    color: var(--text-primary); 

    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    
    background-size: 50px 50px;
    
    background-attachment: fixed;
}

.app-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.main-content { padding-top: 8rem; padding-bottom: 4rem; min-height: 100vh; }

.app-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; position: fixed; top: 0; left: 0; width: 100%; z-index: 500; background-color: var(--bg-color); border-bottom: 1px solid var(--border-color); }
.logo { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary); text-decoration: none; }
.desktop-nav .nav-links { list-style: none; display: flex; gap: 2rem; }
.desktop-nav .nav-links a { text-decoration: none; color: var(--text-secondary); font-weight: 700; font-size: 0.9rem; transition: color 0.2s; }
.desktop-nav .nav-links li.active a, .desktop-nav .nav-links a:hover { color: var(--text-primary); }
.mobile-nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 2rem; cursor: pointer; z-index: 1001; }

.mobile-nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); z-index: 1000; display: flex; justify-content: center; align-items: center; transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1); }
.mobile-nav-overlay.open { transform: translateY(0); }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.mobile-nav-links a { font-family: var(--font-display); font-size: 2.5rem; color: var(--text-secondary); text-decoration: none; }
.mobile-nav-links li.active a { color: var(--text-primary); }

.hero-title { font-family: var(--font-display); font-size: clamp(3rem, 10vw, 7rem); line-height: 1.1; text-transform: uppercase; margin-bottom: 4rem; overflow: hidden; font-weight: 900; }
.hero-title span { display: block; transform: translateY(110%); animation: slide-in 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1); }
.hero-title span:nth-child(2) { animation-delay: 0.1s; }
.hero-title span:nth-child(3) { animation-delay: 0.2s; }
@keyframes slide-in { to { transform: translateY(0); } }
.hero-title .highlight { color: var(--primary-color); }

.page-header { font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 4rem); margin-bottom: 3rem; font-weight: 900; }
.section-title { font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-top: 4rem !important;
    margin-bottom: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em; 
}

.mini-stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 12px;
    text-align: center;
}
.mini-stat-box div {
    font-weight: 900;
    font-size: 1.2rem;
    font-family: var(--font-display);
}

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }

.col-span-12 { grid-column: span 12; } 
.col-span-8 { grid-column: span 8; }  
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-2 { grid-column: span 2; } 

.card { 
    background-color: var(--card-color); 
    border: 1px solid var(--border-color); 
    border-radius: 20px; 
    padding: 1.5rem; 
    transition: border-color 0.2s; 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}
.card:hover { border-color: var(--text-secondary); }
.card-title { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.8rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; z-index: 2; position: relative; }

.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.5rem; 
    padding: 0.8rem 1.5rem; 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    text-decoration: none; 
    transition: all 0.2s; 
    background-color: var(--bg-color); 
    color: var(--text-primary); 
    font-size: 0.95rem; 
    line-height: 1;
}
.btn:hover { background-color: var(--text-primary); color: var(--bg-color) !important; border-color: var(--text-primary); }
.btn-primary { background-color: var(--primary-color); color: var(--bg-color); border-color: var(--primary-color); }
.btn-primary:hover { filter: brightness(1.2); color: var(--bg-color); border-color: transparent; }
.btn-danger { border-color: var(--danger-color); color: var(--danger-color); }
.btn-danger:hover { background-color: var(--danger-color); color: var(--text-primary); border-color: var(--danger-color); }

.big-data { 
    font-family: var(--font-display); 
    font-size: clamp(2.5rem, 4vw, 4rem); 
    line-height: 1; 
    color: var(--text-primary); 
    margin: 0.5rem 0; 
    z-index: 2; 
    position: relative; 
    font-weight: 900; 
}
.big-data span { font-size: 0.4em; color: var(--text-secondary); font-weight: 400; margin-left: 5px; }

.bento-icon { 
    position: absolute; 
    bottom: -20px; 
    right: -20px; 
    font-size: 8rem; 
    color: var(--text-primary); 
    opacity: 0.03; 
    transform: rotate(-15deg); 
    pointer-events: none; 
    z-index: 1; 
}

.goal-bento { justify-content: space-between; }
.timer-display { font-family: var(--font-display); font-size: 3.5rem; font-weight: 900; text-align: center; margin: 1rem 0; color: var(--text-primary); z-index: 2; position: relative; }
.timer-controls { display: flex; gap: 0.5rem; justify-content: center; z-index: 2; position: relative; }

.bro-quote-card { border-color: var(--primary-color); }
.bro-quote-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, transparent 30%, var(--primary-color)); opacity: 0.25; z-index: 0; }
.bro-quote-text { font-style: italic; font-size: 1.2rem; font-weight: 700; text-align: center; line-height: 1.4; color: #fff; position: relative; z-index: 1; padding: 1rem 0; }

.progress-container { background-color: rgba(255,255,255,0.1); border-radius: 100px; height: 8px; width: 100%; overflow: hidden; margin-top: 1rem; border: none; z-index: 2; position: relative; }
.progress-bar { background-color: var(--primary-color); height: 100%; width: 0%; transition: width 0.5s ease-in-out; border-radius: 100px; }
.horoscope-text { font-size: 1.1rem; line-height: 1.5; color: var(--text-secondary); position: relative; z-index: 2; }

.today-workout-list, 
.workout-list { 
    list-style: none; 
    margin: 1rem 0; 
    padding: 0;
    position: relative;
    z-index: 2;
}

.workout-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem; 
    background-color: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    margin-bottom: 0.8rem; 
    transition: all 0.2s ease;
}

.workout-item:hover { border-color: var(--text-secondary); background-color: rgba(255, 255, 255, 0.05); }
.workout-item-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-right: 1rem; }
.workout-details { 
    color: var(--primary-color); 
    font-weight: 700; 
    font-size: 0.9rem; 
    background-color: rgba(255, 255, 255, 0.05); 
    padding: 0.4rem 0.8rem; 
    border-radius: 8px; 
    white-space: nowrap; 
}

.plans-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 1.5rem; 
}
.plan-main-actions { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 3.5rem; 
}
.active-plan-hero { 
    background: linear-gradient(135deg, var(--card-color), color-mix(in srgb, var(--primary-color), transparent 90%));
    
    border: 1px solid var(--primary-color); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    min-height: 260px; 
    position: relative; 
    overflow: hidden; 
    padding: 2.5rem; 
    
    box-shadow: 0 20px 40px -10px color-mix(in srgb, var(--primary-color), transparent 90%);
}
.active-plan-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8)); z-index: 1; }
.plan-card-modern { 
    background: var(--card-color); 
    border: 1px solid var(--border-color); 
    border-radius: 20px; 
    padding: 1.5rem; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    min-height: 200px; 
    transition: all 0.2s ease; 
    position: relative;
}
.plan-card-modern:hover { 
    border-color: var(--text-secondary); 
    transform: translateY(-4px); 
    background-color: rgba(255,255,255,0.02);
}
.plan-info h3 { 
    font-family: var(--font-display); 
    font-size: 1.6rem; 
    font-weight: 900; 
    line-height: 1.2; 
    margin-bottom: 0.5rem; 
    color: var(--text-primary); 
}
.plan-meta { 
    display: flex; 
    gap: 1rem; 
    margin-top: 1rem; 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    font-weight: 500;
}
.plan-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.plan-footer { 
    margin-top: 2rem; 
    display: flex; 
    gap: 0.8rem; 
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.plan-badge { 
    background: var(--primary-color); 
    color: black; 
    font-weight: 800; 
    font-size: 0.75rem; 
    padding: 0.3rem 0.8rem; 
    border-radius: 100px; 
    text-transform: uppercase; 
    display: inline-block;
    margin-bottom: 1rem;
}
.plan-content-wrapper { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.active-label { 
    display: inline-block;
    background-color: var(--primary-color); 
    color: black; 
    padding: 0.5rem 1.2rem; 
    border-radius: 100px; 
    font-weight: 800; 
    font-size: 0.75rem; 
    align-self: flex-start; 
    margin-bottom: 1rem; 
    letter-spacing: 0.05em;
    
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color), transparent 50%);
}
.plan-desc { 
    color: var(--text-secondary); 
    max-width: 80%; 
    
    margin-bottom: 3rem; 
}
.plan-title-large { 
    font-family: var(--font-display); 
    font-size: 2.5rem; 
    font-weight: 900; 
    line-height: 1.1; 
    margin-top: 0; 
    
    margin-bottom: 1rem; 
}
.plan-card-modern.active { 
    border-color: var(--primary-color); 
    background: linear-gradient(160deg, var(--card-color), color-mix(in srgb, var(--primary-color), transparent 95%)); 
}

.plan-bento-card { min-height: 200px; justify-content: space-between; cursor: pointer; transition: transform 0.2s; }
.plan-bento-card:hover { transform: translateY(-5px); border-color: var(--text-secondary); }
.plan-bento-header h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 0.5rem; }
.plan-bento-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.plan-tag { font-size: 0.75rem; border: 1px solid var(--border-color); padding: 0.2rem 0.6rem; border-radius: 6px; color: var(--text-secondary); }
.plan-bento-actions { margin-top: 1.5rem; display: flex; gap: 0.5rem; opacity: 0.6; transition: opacity 0.2s; }
.plan-bento-card:hover .plan-bento-actions { opacity: 1; }

.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.library-plan-card h3 { color: var(--primary-color); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }



.active-workout-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--card-color), color-mix(in srgb, var(--primary-color), transparent 90%));
}



.schedule-layout { display: grid; grid-template-columns: 350px 1fr; gap: 2rem; align-items: start; }
.schedule-sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 7rem; }
.calendar-wrapper { background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 24px; padding: 1.5rem; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.calendar-day-name { text-align: center; color: var(--text-secondary); font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.calendar-date { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; position: relative; background-color: rgba(255,255,255,0.02); }
.calendar-date:hover { background-color: rgba(255,255,255,0.1); }
.calendar-date.is-today { border: 2px solid var(--primary-color); color: var(--primary-color); }
.calendar-date.selected { 
    background: var(--primary-color); 
    color: black; 
    border: none; 
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 40%);
}
.exercises-droppable.drag-over { 
    background: color-mix(in srgb, var(--primary-color), transparent 90%); 
}
.rm-hero-value { 
    font-family: var(--font-display); 
    font-size: 5rem; 
    font-weight: 900; 
    color: var(--primary-color); 
    line-height: 1; 
    text-shadow: 0 0 30px color-mix(in srgb, var(--primary-color), transparent 80%);
}
.calendar-date.history-completed::after { 
    content: ''; 
    width: 4px; 
    height: 4px; 
    background: var(--primary-color);
    position: absolute; 
    bottom: 4px; 
    border-radius: 50%; 
}

.calendar-date.has-workout:not(.history-completed)::after { content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px; background-color: var(--text-secondary); border-radius: 50%; }

.mood-tracker-card { background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 20px; padding: 1.5rem; }
.mood-options { display: flex; justify-content: space-between; margin-top: 1rem; }
.mood-btn { background: none; border: none; font-size: 1.8rem; cursor: pointer; opacity: 0.4; transition: all 0.2s; filter: grayscale(100%); }
.mood-btn:hover, .mood-btn.active { opacity: 1; transform: scale(1.2); filter: grayscale(0%); }
.month-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mini-stat { background-color: var(--bg-color); border-radius: 12px; padding: 1rem; text-align: center; }
.mini-stat span { display: block; font-size: 0.8rem; color: var(--text-secondary); }
.mini-stat strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; }

.day-content-wrapper { display: flex; flex-direction: column; gap: 1.5rem; min-height: 500px; }
.day-header-card { background: linear-gradient(135deg, var(--card-color), #1a1a1a); border: 1px solid var(--border-color); border-radius: 20px; padding: 2rem; position: relative; overflow: hidden; }
.day-header-card h2 { font-size: 2rem; margin-bottom: 0.5rem; font-family: var(--font-display); line-height: 1.1; font-weight: 900; }
.day-header-card p { color: var(--text-secondary); font-size: 1.1rem; }
.day-header-bg-icon { position: absolute; top: -20px; right: -20px; font-size: 10rem; opacity: 0.03; transform: rotate(15deg); }

.history-session-block {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.session-meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; display: flex; justify-content: space-between; }
.session-meta span { 
    background-color: color-mix(in srgb, var(--primary-color), transparent 90%); 
    color: var(--primary-color);
    padding: 0.2rem 0.6rem; 
    border-radius: 4px; 
    font-weight: 700; 
}

.workout-card { background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; }

.workout-exercise-summary-card { 
    background: linear-gradient(145deg, var(--card-color), #1a1a1a); 
    border: 1px solid var(--border-color); 
    border-left: 4px solid var(--primary-color); 
    border-radius: 12px; 
    padding: 1.5rem; 
    margin-bottom: 1rem; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    position: relative;
}
.workout-exercise-summary-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.3); border-top-color: var(--text-secondary); }
.workout-exercise-summary-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.workout-exercise-summary-card .summary-details { display: inline-block; font-weight: 700; color: var(--primary-color); font-size: 0.85rem; background-color: rgba(255, 255, 255, 0.05); padding: 0.4rem 0.8rem; border-radius: 6px; }

.exercise-detail-view h3 { font-size: 2rem; font-family: var(--font-display); font-weight: 900; margin-bottom: 0.5rem; line-height: 1.1; }
.exercise-detail-view .planned-target { display: inline-block; background-color: rgba(255,255,255,0.05); padding: 0.5rem 1rem; border-radius: 8px; color: var(--primary-color); font-weight: 700; font-size: 1rem; margin-bottom: 2rem; border: 1px solid var(--border-color); }

.performed-sets-list { list-style: none; padding: 0; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.performed-sets-list li { display: flex; align-items: center; justify-content: space-between; background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 12px; padding: 1rem 1.5rem; font-size: 1.1rem; }
.set-number-badge { width: 36px; height: 36px; background-color: var(--primary-color); color: var(--bg-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 0.9rem; margin-right: 1rem; flex-shrink: 0; }
.set-data { flex-grow: 1; color: var(--text-primary); font-weight: 700; font-size: 1.2rem; }
.set-data span { font-weight: 400; color: var(--text-secondary); font-size: 1rem; margin: 0 5px; }

.performed-sets-list .btn-danger { background: transparent; border: 1px solid var(--border-color); color: var(--danger-color); width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1.2rem; cursor: pointer; transition: all 0.2s; }
.performed-sets-list .btn-danger:hover { background-color: var(--danger-color); color: white; border-color: var(--danger-color); }

.add-set-form { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 1rem; align-items: end; background-color: var(--card-color); padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border-color); }
.add-set-form .form-group { margin-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
.profile-bento-card { justify-content: flex-start; min-height: 140px; }
.section-actions { margin-top: 1.5rem; }
.color-options { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.color-swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: var(--text-primary); transform: scale(1.1); }
.chart-container { position: relative; height: 500px; width: 100%; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.form-group input, .exercise-entry input, #export-modal input, #import-modal input, .rm-inputs input { width: 100%; padding: 0.8rem; background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-family: var(--font-sans); font-size: 1rem; }
.form-group input:focus, .exercise-entry input:focus, #export-modal input:focus, #import-modal input:focus, .rm-inputs input:focus { outline: none; border-color: var(--primary-color); }
#export-modal input, #import-modal input { text-align: center; font-family: monospace; font-size: 1.2rem; }
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.modal-backdrop.visible { opacity: 1; visibility: visible; }
.modal-content { background-color: #171717; border: 1px solid var(--border-color); padding: 2rem; border-radius: 16px; width: 90%; max-width: 800px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.3s; }
.modal-backdrop.visible .modal-content { transform: scale(1); }
.modal-content h2 { font-family: var(--font-display); margin-bottom: 2rem; font-weight: 900; }
.modal-content p { margin-bottom: 1.5rem; color: var(--text-secondary); }
.modal-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: flex-end; }
.modal-day-editor { background-color: var(--bg-color); border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.modal-day-editor h4 { color: var(--primary-color); margin-bottom: 1rem; font-size: 1.1rem; }
.exercise-entry { display: grid; grid-template-columns: 4fr 1.5fr 1.5fr 1.5fr 40px; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.exercise-entry input { background-color: #171717; font-size: 0.9rem; }
.btn-delete-exercise { background: var(--card-color); border: 1px solid var(--border-color); color: var(--danger-color); border-radius: 8px; cursor: pointer; height: 44px; width: 40px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-delete-exercise:hover { background-color: var(--danger-color); color: var(--text-primary); border-color: var(--danger-color); }
#library-plan-details .day-plan { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
#library-plan-details .day-plan:last-child { border-bottom: none; }
#library-plan-details h4 { color: var(--primary-color); margin-bottom: 0.5rem; }
#library-plan-details p { color: var(--text-secondary); }

.rm-hero-display { 
    text-align: center; 
    margin-bottom: 2rem; 
    background: rgba(255,255,255,0.03); 
    padding: 2rem; 
    border-radius: 20px; 
    border: 1px solid var(--border-color); 
}
.rm-hero-title { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
}
.rm-hero-value { 
    font-family: var(--font-display); 
    font-size: 5rem; 
    font-weight: 900; 
    color: var(--primary-color); 
    line-height: 1; 
    text-shadow: 0 0 30px color-mix(in srgb, var(--primary-color), transparent 80%);
}
.rm-hero-formula {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.rm-inputs { display: flex; gap: 1rem; z-index: 2; position: relative; }
.rm-result-header { text-align: center; margin-bottom: 2rem; }
.rm-result-big { font-size: 5rem; line-height: 1; margin-top: 1rem; font-weight: 900; color: var(--primary-color); text-align: center;}
.rm-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.rm-table th, .rm-table td { text-align: left; padding: 0.8rem; border-bottom: 1px solid var(--border-color); }
.rm-table th { color: var(--text-secondary); font-weight: 400; font-size: 0.9rem; }
.rm-table td { font-weight: 700; }
.rm-percentage { color: var(--primary-color); }
.rm-table-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}
.rm-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 1rem; 
}
.rm-table th { 
    text-align: left; 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
    padding: 1rem 0.5rem; 
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
}
.rm-table td { 
    padding: 1rem 0.5rem; 
    border-bottom: 1px solid var(--border-color); 
    vertical-align: middle;
    font-size: 1rem;
}
.rm-table tr:last-child td {
    border-bottom: none;
}
.rm-col-percent { 
    color: var(--primary-color); 
    font-weight: 900; 
    width: 20%;
}
.rm-col-weight { 
    font-weight: 700; 
    color: var(--text-primary);
    width: 25%;
}
.rm-col-goal { 
    color: var(--text-secondary); 
    font-size: 0.9rem;
    text-align: right;
}
.rm-inputs { display: flex; gap: 1rem; z-index: 2; position: relative; }

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

.library-card-modern {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.library-card-modern:hover {
    transform: translateY(-6px);
    border-color: var(--text-secondary);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}

.lib-card-cover {
    height: 140px;
    background: linear-gradient(to bottom right, #1a1a1a, color-mix(in srgb, var(--primary-color), transparent 85%));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.lib-cover-icon {
    font-size: 5rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 20px color-mix(in srgb, var(--primary-color), transparent 60%));
    opacity: 0.9;
    transform: rotate(-5deg);
    transition: transform 0.3s;
}

.library-card-modern:hover .lib-cover-icon {
    transform: rotate(0deg) scale(1.1);
}

.lib-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lib-card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.lib-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.lib-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.lib-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-transform: uppercase;
}

.lib-card-action {
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    border-radius: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    transition: 0.2s;
}

.library-card-modern:hover .lib-card-action {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: black;
}

.history-session-block {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.session-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

.history-exercise {
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.history-exercise:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.h-ex-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.h-sets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; 
}

.h-set-chip {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 4px;
}

.h-set-chip span {
    color: var(--text-primary);
    font-weight: 700;
}

.profile-hero {
    background: linear-gradient(135deg, var(--card-color) 0%, #000 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-color), transparent 85%));
    z-index: 0;
    pointer-events: none;
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: #000;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary-color), transparent 60%);
}

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

.profile-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rank-badge i { color: var(--primary-color); font-size: 1.1rem; }

.total-power-card {
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--primary-color), transparent 90%), var(--card-color));
    border-color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-value-huge {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
}

.stat-unit {
    font-size: 0.4em;
    color: var(--text-secondary);
    font-weight: 400;
    vertical-align: middle;
}

.theme-selector-container {
    display: flex;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.chart-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.gender-selector {
    display: flex;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 12px;
    gap: 0.5rem;
}

.gender-option {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.gender-option:hover {
    color: var(--text-primary);
    background-color: rgba(255,255,255,0.02);
}

.gender-option.active {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color), transparent 70%);
}

.label-style, 
#add-measurement-btn {
    font-family: 'Inter', sans-serif; 
    font-weight: 700;              
    font-size: 0.85rem;             
    text-transform: uppercase;      
    letter-spacing: 0.05em;        
    color: var(--text-secondary);  
    margin-bottom: 0.5rem;
    display: block;
}

#add-measurement-btn {
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 0.75rem;
}

.unit-style {
    font-family: 'Inter', sans-serif;
    font-weight: 900;                
    text-transform: uppercase;
    color: var(--text-secondary);     
    opacity: 0.8;
    
    font-size: 0.4em; 
    margin-left: 8px;
}

.plan-actions {
    display: flex;
    gap: 1rem;       
    flex-wrap: wrap;  
    margin-top: 2rem;
}

#plan-modal .modal-content {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    background: #000; 
    border: 1px solid var(--border-color);
}

.plan-editor-header {
    padding: 1.5rem;
    background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
    border-bottom: 1px solid var(--border-color);
}

.plan-name-group {
    position: relative;
}

.plan-name-group input {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    
    border-bottom: 2px solid var(--border-color) !important;
    border-radius: 0 !important;
    
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    padding: 0.5rem 0;
    color: var(--text-primary);
    width: 100%;
    transition: border-color 0.3s ease;
}

.plan-name-group input:focus {
    border-bottom-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

.plan-name-group input:focus::placeholder {
    opacity: 0.3;
}

.plan-name-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 0;
}

.day-tabs-wrapper {
    background: #0d0d0d;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.day-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
    display: block;
}

.day-tabs-wrapper::-webkit-scrollbar-track {
    background: transparent; 
}

.day-tabs-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    transition: background-color 0.2s;
}

.day-tabs-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.day-tab-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    margin-right: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.day-tab-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.day-tab-btn.active {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 60%);
    transform: scale(1.05);
}

#days-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #050505;
}

.day-content-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}
.day-content-pane.active {
    display: block;
}

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

.editor-exercise-card {
    background: #121212;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr 40px;
    gap: 1rem;
    align-items: start;
    position: relative;
}

.editor-exercise-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.8rem;
}

.editor-input-group {
    position: relative;
}
.editor-input-group input {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}
.editor-input-group input:focus {
    background: #000;
    border-color: var(--primary-color);
}
.editor-input-group label {
    position: absolute;
    top: -8px;
    left: 8px;
    background: #121212;
    padding: 0 4px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.btn-remove-ex {
    height: 100%;
    background: rgba(255, 0, 0, 0.1);
    color: var(--danger-color);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.2s;
}
.btn-remove-ex:hover {
    background: var(--danger-color);
    color: #fff;
}

.btn-add-exercise-dashed {
    width: 100%;
    border: 2px dashed var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-add-exercise-dashed:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,255,255,0.02);
}

.plan-editor-footer {
    padding: 1rem 1.5rem;
    background: #1a1a1a;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.workout-info h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.workout-timer-badge {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.workout-card-modern {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.workout-card-modern:hover {
    transform: translateY(-4px);
    border-color: var(--text-secondary);
}

.workout-card-modern.active {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--card-color), color-mix(in srgb, var(--primary-color), transparent 95%));
}

.chart-empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.chart-empty-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.chart-empty-placeholder p {
    font-size: 0.9rem;
    max-width: 250px;
    line-height: 1.5;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

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

.wc-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255,255,255,0.1);
    line-height: 1;
}

.wc-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.wc-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.wc-progress-track {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}
.wc-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.3s;
}

.wc-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    text-transform: uppercase;
}
.wc-status.pending { background: rgba(255,255,255,0.1); color: var(--text-secondary); }
.wc-status.done { background: var(--primary-color); color: #000; }

.exercise-hero {
    margin-bottom: 2rem;
}
.exercise-hero h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.set-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.set-card-num {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.set-card-val {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    margin-top: 0.5rem;
}

.set-card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.btn-delete-set-mini {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: var(--danger-color);
    opacity: 0.5;
    cursor: pointer;
}
.btn-delete-set-mini:hover { opacity: 1; }

.big-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.big-input-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.big-input {
    width: 100%;
    background: var(--card-color);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    font-family: var(--font-display);
    font-size: 2rem; 
    color: var(--text-primary);
    text-align: center;
    transition: all 0.2s;
}

.big-input:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #000;
}

.btn-big-add {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 16px;
}


.calendar-nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(255,255,255,0.02);
}

.calendar-header h3 {
    margin: 0;
    min-width: 140px;
    text-align: center;
}


.visualizer-wrapper {
    background: #000; 
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100px;
}

.visualizer-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: var(--primary-color);
    filter: blur(60px);
    opacity: 0.15;
    z-index: 0;
}


.wave-container {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 60px;
    z-index: 1;
}

.wave-bar {
    width: 6px;
    background: var(--primary-color);
    border-radius: 10px;
    animation: wave-bounce 1s infinite ease-in-out;
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary-color), transparent 50%);
}

@keyframes wave-bounce {
    0%, 100% { height: 20%; opacity: 0.5; }
    50% { height: 100%; opacity: 1; }
}

.focus-status {
    z-index: 1;
    text-align: right;
}

.focus-label {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: var(--danger-color);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--danger-color);
    animation: blink 2s infinite;
}

.session-name-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ambient-wrapper {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    height: 120px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ambient-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: core-breathe 6s infinite ease-in-out;
}

.ambient-core {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.8;
    animation: core-pulse 3s infinite ease-in-out;
}

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
    mask-image: radial-gradient(circle, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 100%);
}

.tech-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--text-secondary);
    opacity: 0.3;
}
.tc-tl { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.tc-tr { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.tc-bl { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.tc-br { bottom: 15px; right: 15px; border-left: none; border-top: none; }

@keyframes core-breathe {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.5); opacity: 0.4; }
}

@keyframes core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(0.8); opacity: 0.9; }
}

.monitor-wrapper {
    background: #050505;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    height: 120px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.monitor-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 0;
}

.ecg-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    z-index: 1;
    display: flex;
    align-items: flex-end;
}

.ecg-line {
    width: 50%;
    height: 100%;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    animation: ecg-scroll 2s linear infinite;
    filter: drop-shadow(0 0 4px var(--primary-color));
}

@keyframes ecg-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

.vital-data {
    z-index: 2;
    background: rgba(0,0,0,0.6); 
    padding: 0.5rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.bpm-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.bpm-label {
    font-size: 1rem;
    color: var(--danger-color);
    font-weight: 700;
}

.zone-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.heart-icon-anim {
    color: var(--danger-color);
    animation: heart-beat 1s infinite;
}

@keyframes heart-beat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}

.marquee-wrapper {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    height: 100px;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 2rem;
    white-space: nowrap; 
    animation: marquee-scroll 20s linear infinite;
}

.marquee-text {
    font-family: var(--font-display);
    font-size: 4rem; 
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;

    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2); 
    
    transition: all 0.3s;
}

.marquee-text.filled {
    color: var(--primary-color);
    -webkit-text-stroke: 0;
    opacity: 0.8;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}


.history-card {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.history-card:hover {
    border-color: var(--text-secondary);
}

.hc-header {
    background: linear-gradient(to bottom, #1a1a1a, var(--card-color));
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hc-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hc-time {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
}

.hc-stats-row {
    display: flex;
    padding: 1rem 1.5rem;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.hc-stat-item {
    display: flex;
    flex-direction: column;
}

.hc-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.hc-stat-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-color);
}

.hc-exercises-list {
    padding: 0;
}

.hc-exercise-row {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hc-exercise-row:last-child {
    border-bottom: none;
}

.hc-ex-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hc-sets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hc-set-pill {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-set-pill strong {
    color: var(--text-primary);
    font-weight: 800;
}

.hc-empty-text {
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.5;
}

.btn-bodyweight-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    
    padding: 0.2rem 0.6rem; 
    font-size: 0.7rem; 
    font-weight: 700;
    
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap; 
    height: 24px; 
}

.btn-bodyweight-toggle:hover {
    background: var(--primary-color);
    color: #000;
}

.btn-bodyweight-toggle i {
    font-size: 0.9rem;
}

.input-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 0.5rem;
    height: 24px; 
}

.input-header-row label {
    margin: 0; 
    line-height: 1;
}


.big-input-wrapper {
    position: relative; 
}

.big-input-wrapper label {
    display: block;
    margin-bottom: 0.8rem; 
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1; 
}

.btn-bodyweight-toggle {
    position: absolute;
    top: -5px; 
    right: 0; 
    
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    height: 24px;
    z-index: 2;
}

.btn-bodyweight-toggle:hover {
    background: var(--primary-color);
    color: #000;
}

.library-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-bar {
    flex-grow: 1;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem; 
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.lib-card-cyber {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    min-height: 320px;
    cursor: pointer;
}

.lib-card-cyber:hover {
    transform: translateY(-5px);
    border-color: var(--text-secondary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lcc-cover {
    height: 100px;
    background: #050505;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.lcc-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.lcc-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    z-index: 1;
}

.lcc-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 1;
    background: #000;
}

.lcc-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lcc-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.lcc-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.lcc-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: auto;
    background: rgba(255,255,255,0.02);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.lcc-spec-item {
    display: flex;
    flex-direction: column;
}

.lcc-spec-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
}

.lcc-spec-val {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.lcc-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.lib-card-cyber:hover .lcc-arrow {
    opacity: 1;
    transform: translateX(0);
}

.lib-preview-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lib-preview-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.lib-preview-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 80%);
}

.lib-preview-meta h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.lib-preview-tags {
    display: flex;
    flex-wrap: wrap; /* Позволяет тегам прыгать на новую строку */
    gap: 8px;
    margin-top: 10px;
}

.lib-p-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.lib-days-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .lib-days-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

.lib-day-card {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
}

.lib-day-title {
    color: var(--primary-color);
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.lib-ex-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.lib-ex-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px; 
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.lib-ex-item:last-child {
    border-bottom: none;
}

.lib-ex-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word; 
}

.lib-ex-stats {
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap; 
    align-self: flex-start; 
}

.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px); 
    
    background-color: #000;
    border: 1px solid #22c55e;
    color: #fff;
    
    padding: 1rem 1.5rem;
    border-radius: 12px;
    
    display: flex;
    align-items: center;
    gap: 12px;
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(34, 197, 94, 0.2);
    z-index: 3000;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); 
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    color: #22c55e;
    font-size: 1.5rem;
    display: flex;
}

.toast-message {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .toast-notification {
        bottom: 110px;
        width: 90%; 
        justify-content: center;
    }
}

#plan-modal .modal-content {
    padding: 0;
    background: #000;
    border: 1px solid var(--border-color);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}


.plan-editor-header {
    padding: 2rem 2rem 1rem 2rem;
    background: linear-gradient(to bottom, #080808, #000);
    border-bottom: none;
}

.plan-name-group label {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.8;
}

.plan-name-input {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    
    color: #ffffff !important; 
    
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #333 !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 !important;
    width: 100%;
    outline: none !important;
    transition: border-color 0.3s;
}

.plan-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important; 
    text-transform: uppercase;
    opacity: 1;
}

.day-tabs-wrapper {
    background: #000;
    padding: 0 2rem 1.5rem 2rem; 
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.day-tabs-wrapper::-webkit-scrollbar { display: none; }

.day-tab-tech {
    background: #0d0d0d;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    
    padding: 0.6rem 1.2rem;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.day-tab-tech:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.day-tab-tech.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 70%);
}

#days-container {
    background-color: #050505;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    
    padding: 2rem;
    flex-grow: 1;
    overflow-y: auto;
}

.editor-card-tech {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-card-tech:hover {
    border-color: var(--text-secondary);
}

.editor-card-index {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--font-display);
    font-size: 2rem;
    color: rgba(255,255,255,0.03);
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.tech-inputs-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 40px; 
    gap: 10px;
    align-items: end;
}

.tech-input-group label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 700;
}

.tech-input {
    width: 100%;
    background: #111;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.tech-input:focus {
    border-color: var(--primary-color);
    background: #000;
    outline: none;
}

.btn-tech-remove {
    height: 38px;
    background: rgba(255,0,0,0.1);
    border: 1px solid transparent;
    color: var(--danger-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.btn-tech-remove:hover {
    background: var(--danger-color);
    color: #fff;
}

.btn-add-tech {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-add-tech:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,255,255,0.05);
}

.plan-editor-footer {
    background: #000;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}


.day-tabs-wrapper {
    background: #000;
    padding: 0 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none; 
}

.day-tab-tech {
    background: transparent; 
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    
    padding: 0.8rem 0; 
    width: 50px;     
    text-align: center;
    
    font-family: var(--font-display); 
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.day-tab-tech:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.day-tab-tech.active {
    background: rgba(255,255,255,0.03);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 85%);
    transform: translateY(-2px);
}

.tech-input-group label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
    opacity: 0.7;
}

.tech-input {
    width: 100%;
    background: transparent !important; 
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important; 
    color: var(--text-primary);
    padding: 0.5rem 0;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s;
}

.tech-input:focus {
    border-bottom-color: var(--primary-color) !important;
    outline: none;
}

.tech-input::placeholder {
    opacity: 0.2;
    font-weight: 400;
}

.editor-card-tech {
    background: rgba(255,255,255,0.02); 
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--border-color); 
    border-radius: 0 12px 12px 0; 
    padding: 1.5rem;
}

.editor-card-tech:hover {
    border-left-color: var(--primary-color);
    background: rgba(255,255,255,0.04);
}

.victory-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.victory-title {
    font-family: var(--font-display);
    
    font-size: clamp(3rem, 13vw, 6rem);
    
    font-weight: 900;
    line-height: 0.9;
    
    color: transparent;
    -webkit-text-stroke: 2px #fff;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    width: 100%;
    padding: 0 10px;
    word-wrap: break-word;
}

.victory-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 90%;
    max-width: 400px;
}

.v-stat-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
}

.v-stat-val {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
}

.v-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 0.5rem;
}

@keyframes scaleIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }


#plan-modal .modal-content {
    background-color: #050505;
    border: 1px solid #262626;
    padding: 0; 
    display: flex;
    flex-direction: column;
}

.plan-editor-header {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    background: #000;
    border-bottom: none;
}

.plan-name-input {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    
    color: #ffffff !important; 
    
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #333 !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 !important;
    width: 100%;
    outline: none !important;
    transition: border-color 0.3s;
}

.plan-name-input:focus {
    border-color: var(--primary-color) !important;
}

.plan-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important; 
    text-transform: uppercase;
    opacity: 1;
}

.day-tabs-wrapper {
    background: #000;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #262626;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.day-tab-tech {
    background: #111;
    color: #555;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.6rem 0;
    width: 45px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.day-tab-tech:hover {
    color: #fff;
    background: #1a1a1a;
}

.day-tab-tech.active {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px color-mix(in srgb, var(--primary-color), transparent 60%);
    border-color: var(--primary-color);
}

#days-container {
    background-color: #080808;
    background-image: 
        linear-gradient(#151515 1px, transparent 1px),
        linear-gradient(90deg, #151515 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.editor-card-tech {
    background: #000;
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    transition: all 0.2s;
    position: relative;
}

.editor-card-tech:hover {
    border-color: #444;
    transform: translateX(4px);
}

.editor-card-tech:focus-within {
    border-color: var(--primary-color);
}

.tech-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 60px 60px 70px 30px; 
    gap: 12px;
    align-items: center;
}

.tech-input-group {
    display: flex;
    flex-direction: column;
}

.tech-input-group label {
    font-family: var(--font-sans);
    
    color: #999999 !important; 
    
    font-size: 0.65rem; 
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
    margin-left: 2px;
    letter-spacing: 0.05em;
    opacity: 1;
}

.tech-input {
    border-bottom: 1px solid #333 !important; 
    transition: border-color 0.3s;
}

.tech-input:focus {
    border-bottom-color: var(--primary-color) !important;
}

.tech-input::placeholder {
    color: #ffffff !important;
    font-weight: 500;
}

.inp-name {
    font-weight: 700;
    color: #fff;
}

.inp-sets, .inp-reps, .inp-weight {
    text-align: center;
    color: var(--primary-color);
}

.btn-tech-remove {
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: flex-end;
    transition: 0.2s;
}
.btn-tech-remove:hover {
    color: var(--danger-color);
}

@media (max-width: 600px) {
    .tech-inputs-grid {
        grid-template-columns: 1fr 1fr 1fr 30px; 
        grid-template-rows: auto auto;
        row-gap: 10px;
    }
    
    .tech-input-group:first-child {
        grid-column: 1 / -1; 
        margin-bottom: 5px;
    }
    
    .tech-input-group:first-child input {
        font-size: 1.1rem; 
    }
    
    .btn-tech-remove {
        grid-column: 4;
        grid-row: 2;
    }
}

.btn-add-tech {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px dashed #333;
    border-radius: 12px;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-add-tech:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,255,255,0.05);
}

@media (max-width: 700px) {
    .tech-inputs-grid {
        grid-template-columns: 1fr 1fr 1fr; 
        grid-template-rows: auto auto;
    }
    .tech-input-group:first-child {
        grid-column: 1 / -1;
    }
    .btn-tech-remove {
        grid-column: 3; 
    }
}

@media (max-width: 600px) {
    .editor-exercise-inputs {
        grid-template-columns: 1fr 1fr 1fr; 
    }
    .editor-input-group:first-child {
        grid-column: span 3; 
    }
}


body::-webkit-scrollbar, .modal-content::-webkit-scrollbar { width: 8px; } body::-webkit-scrollbar-track, .modal-content::-webkit-scrollbar-track { background: var(--bg-color); } body::-webkit-scrollbar-thumb, .modal-content::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 10px; } body::-webkit-scrollbar-thumb:hover, .modal-content::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }

.mobile-bottom-nav {
    display: none;
}

.profile-badges {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    justify-content: flex-start; 
}

@media (max-width: 900px) {
    .schedule-layout { grid-template-columns: 1fr; }
    .schedule-sidebar { position: relative; top: 0; }
}
@media (max-width: 768px) {
    .app-container { padding: 0 1rem; }
    .main-content { padding-top: 6rem; }
    .app-header { padding: 1.2rem 1rem; }
    .desktop-nav { display: none; }
    .mobile-nav-toggle { display: none !important; }
    .modal-backdrop.visible ~ .app-header { z-index: 1; }
    .grid { grid-template-columns: 1fr; }
    .col-span-6, .col-span-12, .col-span-4, .col-span-8, .col-span-2 { grid-column: auto; }
    .timer-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .timer-controls .btn { padding: 0.8rem 0.5rem; width: 100%; }
    .rm-inputs { flex-direction: column; }
    .workout-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .workout-details { align-self: flex-start; }
    .exercise-entry { display: flex; flex-direction: column; gap: 0.8rem; }
    .workout-exercise-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .add-set-form { grid-template-columns: 1fr 1fr; }
    .add-set-form button { grid-column: span 2; margin-top: 0.5rem; }

    .plan-actions .btn {
        flex: 1;             
        white-space: nowrap; 
    }

    .rm-hero-display {
        padding: 1rem 0.5rem; 
        margin-bottom: 1rem;
        width: 100%;
        overflow: hidden; 
    }

    .rm-hero-value {
        font-size: clamp(2.5rem, 14vw, 4rem); 
        white-space: nowrap;
        letter-spacing: -0.02em;
        line-height: 1.1;
    }
    
    .rm-table th {
        font-size: 0.7rem;   
        padding: 0.5rem 0.2rem;
        vertical-align: bottom; 
    }
    
    .rm-table {
        width: 100%;
        font-size: 0.85rem; 
    }
    .rm-table th, .rm-table td {
        padding: 0.6rem 0.2rem; 
    }
    
    .rm-table th:nth-child(1), .rm-table td:nth-child(1) { width: 15%; }
    .rm-table th:nth-child(2), .rm-table td:nth-child(2) { width: 20%; text-align: center; }
    .rm-table th:nth-child(3), .rm-table td:nth-child(3) { width: 65%; text-align: right; }

    #library-plan-modal .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .lib-preview-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .profile-hero {
        flex-direction: column !important;
        text-align: center !important;
        padding: 2rem 1rem !important;
        gap: 0.75rem !important; 
    }
    .profile-avatar-placeholder {
        margin: 0 auto 0.5rem auto !important; 
    }
    .profile-badges {
        justify-content: center !important;
        gap: 0.5rem !important; 
        margin-top: 0.2rem !important;
    }
    #edit-profile-btn {
        margin-top: 0.5rem !important; 
        width: 42px !important;        
        height: 42px !important;    
        padding: 0 !important;       
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 12px !important; 
        margin-left: auto;
        margin-right: auto;
    }
    
    #edit-profile-btn i {
        font-size: 1.2rem; 
    }
    

    .stat-value-huge { font-size: 2.5rem; }


    .mobile-nav-overlay { display: none !important; }
    
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        
        position: fixed;
        bottom: 20px;      
        left: 20px;
        right: 20px;
        
        height: 70px;
        background: rgba(23, 23, 23, 0.85); 
        backdrop-filter: blur(12px);        
        -webkit-backdrop-filter: blur(12px);
        
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 24px;
        z-index: 1000;
        
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.7rem;
        font-weight: 600;
        gap: 4px;
        transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        width: 50px; 
    }

    .nav-item i {
        font-size: 1.5rem;
        margin-bottom: 2px;
        transition: transform 0.2s;
    }

    .nav-item.active {
        color: var(--primary-color);
    }
    
    .nav-item.active i {
        transform: translateY(-2px);
        filter: drop-shadow(0 0 8px color-mix(in srgb, var(--primary-color), transparent 60%));
    }

    .main-content {
        padding-bottom: 120px !important; 
    }
}