-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2345 lines (2143 loc) · 96.1 KB
/
index.html
File metadata and controls
2345 lines (2143 loc) · 96.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>阿亮健身营养智能工具</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
<style>
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body {
background: linear-gradient(135deg, #e0f7ff, #ffffff);
min-height: 100vh;
color: #334155;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* 首页样式 */
.home-container {
background: #fff;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
padding: 40px;
text-align: center;
}
.home-container h1 {
color: #0ea5e9;
margin-bottom: 10px;
font-size: 2rem;
}
.home-subtitle {
color: #64748b;
margin-bottom: 10px;
font-size: 1.1rem;
font-weight: bold;
}
.tools-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 2px;
margin-bottom: 5px;
}
.tool-card {
background: #f8fafc;
border: 2px solid #e2e8f0;
border-radius: 15px;
padding: 30px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
margin: 5px
}
.tool-card:hover {
transform: translateY(-5px);
border-color: #0ea5e9;
box-shadow: 0 5px 20px rgba(14, 165, 233, 0.2);
}
.tool-card h2 {
color: #0ea5e9;
margin-bottom: 15px;
font-size: 1.5rem;
}
.tool-card p {
color: #475569;
line-height: 1.6;
margin-bottom: 20px;
}
.tool-features {
list-style: none;
text-align: left;
color: #64748b;
font-size: 0.9rem;
text-align: center;
}
.tool-features li {
padding: 5px 0;
padding-left: 20px;
position: relative;
display: inline-block;
text-align: left;
margin: 0 10px;
}
.tool-features li:before {
content: "✓";
position: absolute;
left: 0;
color: #10b981;
font-weight: bold;
}
.btn-enter {
background: #0ea5e9;
color: white;
border: none;
padding: 12px 30px;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 15px;
}
.btn-enter:hover {
background: #0284c7;
transform: scale(1.05);
}
.badge {
position: absolute;
top: 2px;
right: 2px;
background: #f59e0b;
color: white;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: bold;
}
.badge.dev {
background: #94a3b8;
}
.comparison-table {
background: #f8fafc;
border-radius: 15px;
padding: 30px;
margin-top: 30px;
text-align: left;
}
.comparison-table h3 {
color: #0ea5e9;
margin-bottom: 20px;
text-align: center;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #e2e8f0;
}
th {
background: #e0f2fe;
color: #0c4a6e;
font-weight: 600;
}
tr:hover {
background: #f0f9ff;
}
/* 工具页面样式 */
.tool-page {
display: none;
}
/* 凯圣王碳循环样式 */
:root{
--primary:#0ea5e9;
--primary-light:#38bdf8;
--success:#10b981;
--warning:#f59e0b;
--danger:#f43f5e;
--dark:#1e293b;
--light:#f8fafc;
--high:#bae6fd;
--med:#e0f2fe;
--low:#fef3c7;
}
header{color:#0ea5e9;text-align:center;margin-bottom:24px;position:relative;}
header h1{font-size:1.8rem;margin-bottom:4px;font-weight:700}
header .subtitle{font-size:.9rem;color:#64748b}
.back-home-btn {
position: absolute;
top: 0;
left: 0;
background: #94a3b8;
color: white;
border: none;
padding: 8px 16px;
border-radius: 6px;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s ease;
}
.back-home-btn:hover {
background: #64748b;
}
.tabs{display:flex;justify-content:center;margin-bottom:20px;border-bottom:1px solid #cbd5e1}
.tab-btn{
padding:10px 20px;
background:none;
border:none;
cursor:pointer;
font-size:1rem;
font-weight:600;
color:#64748b;
border-bottom:3px solid transparent;
transition:.3s;
}
.tab-btn.active{
color:#0ea5e9;
border-bottom-color:#0ea5e9;
}
.tab-content{display:none}
.tab-content.active{display:block}
.top-row{display:flex;gap:16px;flex-wrap:wrap}
.top-row>section{
background:#fff;
border-radius:12px;
padding:16px;
box-shadow:0 1px 3px rgba(0,0,0,.08);
flex:1 1 260px;
min-width:260px;
}
.top-row h3{
font-size:1rem;
margin-bottom:10px;
color:#0ea5e9;
font-weight:600;
}
.basic-row,.macro-row{display:flex;gap:8px;flex-wrap:wrap}
.basic-row .input-group,.macro-row .input-group{flex:1 1 100px;display:flex;flex-direction:column}
.top-row label{font-size:.8rem;font-weight:600;margin-bottom:4px}
.top-row input,.top-row select{
padding:6px 8px;
font-size:.8rem;
border:1px solid #cbd5e1;
border-radius:6px;
}
.target-weight-input-group {
flex: 0 1 auto !important;
min-width: unset !important;
}
.target-weight-controls {
display: flex;
align-items: center;
gap: 4px;
justify-content: center;
}
.target-weight-controls input {
width: 50px !important;
text-align: center;
margin: 0 2px;
}
.target-weight-controls button {
flex: 0 0 20px;
height:20px;
border:1px solid var(--primary-light);
background:#fff;
color:var(--primary-light);
border-radius:50%;
font-size:14px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.body-type-cards,.plan-cards{display:flex;gap:6px;flex-wrap:wrap}
.body-type-card,.plan-card{
flex:1 1 80px;
border:1px solid #cbd5e1;
border-radius:8px;
padding:8px 4px;
font-size:.7rem;
text-align:center;
cursor:pointer;
transition:.2s;
background:#fff;
}
.body-type-card:hover,.plan-card:hover{transform:translateY(-1px)}
.body-type-card.selected,.plan-card.selected{
border-color:var(--primary);
background:#e0f2fe;
}
.body-type-card h4,.plan-card h4{font-size:.75rem;margin-bottom:2px;color:#0ea5e9}
.body-type-card p,.plan-card p{font-size:.6rem;margin:0;line-height:1.2;color:#64748b}
.summary-cards{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.summary-card{
flex:1 1 70px;
background:#f0f9ff;
border-radius:8px;
padding:8px;
text-align:center;
font-size:.75rem;
}
.summary-card .val{font-size:1rem;font-weight:700;color:var(--primary)}
.summary-card .lab{font-size:.6rem;color:#475569}
.btn-row{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.btn-row button{
flex:1 1 100px;
padding:10px 0;
border:none;
border-radius:6px;
font-size:.85rem;
font-weight:600;
cursor:pointer;
color:#fff;
transition:.2s;
}
.btn-calc{background:var(--primary)}
.btn-down{background:var(--success)}
.btn-reset{background:var(--warning)}
.btn-back{background:var(--dark)}
.btn-row button:hover{opacity:.9}
.table-wrap{overflow-x:auto;margin-top:16px}
#planTable{min-width:1400px} /* 28 列撑开 */
table{width:100%;border-collapse:collapse;font-size:.75rem}
th,td{border:1px solid #e2e8f0;padding:6px 4px;text-align:center}
th{background:#f1f5f9;color:#0ea5e9;font-weight:600}
tbody tr:nth-child(odd){background:#fff}
tbody tr:nth-child(even){background:#f8fafc}
thead tr:nth-child(2) .high{background:var(--high);color:#0c4a6e}
thead tr:nth-child(2) .med{background:var(--med);color:#0c4a6e}
thead tr:nth-child(2) .low{background:var(--low);color:#78350f}
.editable{background:#fffbeb}
.notes{
background:#fff;
border-radius:12px;
box-shadow:0 1px 3px rgba(0,0,0,.08);
padding:16px 20px;
margin-top:20px;
font-size:.8rem;
line-height:1.6;
color:#475569;
}
.notes h3{margin-bottom:10px;color:#0ea5e9;font-size:1rem}
.notes ul{margin:0;padding-left:20px}
.notes li{margin-bottom:6px}
.notes .tag{display:inline-block;padding:2px 6px;border-radius:4px;color:#fff;font-weight:bold;margin-right:4px;font-size:.7rem}
.notes .tag.high{background:var(--high);color:#0c4a6e}
.notes .tag.med{background:var(--med);color:#0c4a6e}
.notes .tag.low{background:var(--low);color:#78350f}
footer{color:#94a3b8;text-align:center;font-size:.6rem;margin-top:20px}
.custom-plan{display:none;gap:4px;flex-wrap:wrap;margin-top:8px}
.custom-plan input{
flex:1 1 60px;
font-size:.7rem;
padding:4px 2px;
text-align:center;
border:1px solid #cbd5e1;
border-radius:4px;
}
.target-info{
background:#fff;
border-radius:12px;
padding:16px;
margin-top:16px;
box-shadow:0 1px 3px rgba(0,0,0,.08);
}
.target-info h3{
font-size:1rem;
margin-bottom:8px;
color:#0ea5e9;
font-weight:600;
}
.target-stats{
display:flex;
gap:8px;
flex-wrap:wrap;
}
.target-stat{
flex:1 1 100px;
background:#f0f9ff;
border-radius:8px;
padding:8px;
text-align:center;
}
.target-stat .value{
font-size:1.1rem;
font-weight:700;
color:var(--primary);
}
.target-stat .label{
font-size:.7rem;
color:#64748b;
}
/* 橙子碳水渐降特定样式 */
.orange-section {
display: none;
}
.orange-macro-row {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.orange-input-group {
flex: 1 1 100px;
display: flex;
flex-direction: column;
}
.orange-ratio-cards {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 12px;
}
.orange-ratio-card {
flex: 1 1 120px;
border: 1px solid #cbd5e1;
border-radius: 8px;
padding: 8px;
text-align: center;
cursor: pointer;
transition: .2s;
background: #fff;
}
.orange-ratio-card.selected {
border-color: var(--primary);
background: #e0f2fe;
}
.orange-results {
background: #fff;
border-radius: 12px;
padding: 16px;
margin-top: 16px;
box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.orange-results h3 {
font-size: 1rem;
margin-bottom: 12px;
color: #0ea5e9;
font-weight: 600;
}
.orange-stats {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 16px;
}
.orange-stat {
flex: 1 1 120px;
background: #f0f9ff;
border-radius: 8px;
padding: 10px;
text-align: center;
}
.orange-stat .value {
font-size: 1.1rem;
font-weight: 700;
color: var(--primary);
}
.orange-stat .label {
font-size: .7rem;
color: #64748b;
}
.orange-table {
width: 100%;
border-collapse: collapse;
margin-top: 12px;
}
.orange-table th, .orange-table td {
border: 1px solid #e2e8f0;
padding: 8px;
text-align: center;
}
.orange-table th {
background: #f1f5f9;
color: #0ea5e9;
font-weight: 600;
}
/* 新增样式 */
.weight-loss-slider {
margin: 10px 0;
}
.weight-loss-slider label {
display: block;
margin-bottom: 5px;
font-weight: 600;
font-size: 0.8rem;
}
.slider-container {
display: flex;
align-items: center;
gap: 10px;
}
.slider-container input[type="range"] {
flex: 1;
}
.slider-value {
min-width: 40px;
text-align: center;
font-weight: 600;
color: var(--primary);
}
.custom-ratio-inputs {
display: flex;
gap: 8px;
margin-top: 8px;
flex-wrap: wrap;
}
.custom-ratio-input {
flex: 1;
min-width: 80px;
}
.custom-ratio-input label {
font-size: 0.7rem;
font-weight: 600;
display: block;
margin-bottom: 4px;
}
.custom-ratio-input input {
width: 100%;
padding: 4px;
border: 1px solid #cbd5e1;
border-radius: 4px;
text-align: center;
}
.ratio-sum {
margin-top: 8px;
font-size: 0.8rem;
color: #64748b;
}
.ratio-sum.error {
color: var(--danger);
font-weight: 600;
}
/* 媒体查询:针对小屏幕设备的优化 */
@media (max-width: 480px) {
.basic-row .input-group {
flex: 1 1 100px !important;
}
.target-weight-input-group {
flex: 0 1 120px !important;
}
.target-weight-controls {
justify-content: flex-start;
}
.tab-btn {
padding: 8px 12px;
font-size: 0.9rem;
}
.tools-grid {
grid-template-columns: 1fr;
}
.home-container {
padding: 20px;
}
.home-container h1 {
font-size: 1.5rem;
}
.back-home-btn {
position: relative;
margin-bottom: 15px;
}
}
/* ===== 竖向周表 ===== */
.week-tables{margin-top:16px;font-size:.75rem;}
.week-table{background:#fff;border-radius:12px;padding:12px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.08);}
.week-title{color:#0ea5e9;font-weight:600;margin-bottom:8px;font-size:.9rem;}
.week-table table{width:100%;border-collapse:collapse;}
.week-table th,.week-table td{border:1px solid #e2e8f0;padding:6px 4px;text-align:center;}
.week-table th{background:#f1f5f9;color:#0ea5e9;font-weight:600;font-size:.7rem;}
.week-table .high{background:var(--high);color:#0c4a6e}
.week-table .med{background:var(--med);color:#0c4a6e}
.week-table .low{background:var(--low);color:#78350f}
</style>
<style>
/* 仅隐藏横向 28 列表格,其余一切保持原样 */
#planTable {
display: none !important;
}
</style>
<base target="_blank">
</head>
<body>
<!-- 首页 -->
<div id="home-page" class="container home-container">
<h1>阿亮健身营养智能工具</h1>
<p class="home-subtitle">食谱计划跟踪(有偿)可加vx:ll8819112</p>
<!-- 体脂率参考区域 -->
<div style="text-align:center; margin:0 auto 5px;"> <!-- 统一控制间距 -->
<a href="javascript:void(0)"
onclick="toggleBodyFatImage()"
style="color:#E53E3E;font-size:17px;text-decoration:underline;">
📌 点击查看体脂率参考图
</a>
<div id="bodyfat-container" style="display:none;margin-top:12px;"> <!-- 上间距只给容器内部 -->
<img src="https://img0.baidu.com/it/u=1083536515,1293547436&fm=253&fmt=auto?w=800&h=1067"
alt="体脂率参考" style="max-width:100%;height:auto;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.15)">
<p style="margin-top:8px;font-size:.85rem;color:#64748b">常见体脂率外观对照,仅供参考</p>
</div>
</div>
<div class="tool-card" onclick="selectTool('orange-carb')">
<span class="badge">新手选这个</span>
<h2>橙子碳水渐降</h2>
<p>通过逐步降低碳水化合物摄入量,<br>温和实现减脂目标。</p>
<ul class="tool-features">
<li>适合训练少的新手</li>
<li>适合大基数高体脂</li>
<li>渐降式调整碳水</li>
<li>减脂速度平缓</li>
</ul>
<button class="btn-enter">立即使用</button>
</div>
<div class="tools-grid">
<div class="tool-card" onclick="selectTool('kings-cycle')">
<span class="badge">没招了就选这个</span>
<h2>凯圣王碳循环</h2>
<p>通过周期性调整碳水化合物摄入量,<br>实现高效减脂增肌的目标。</p>
<ul class="tool-features">
<li>适合健身爱好者</li>
<li>平台期大杀器</li>
<li>减脂速度快</li>
<li>需要记录饮食</li>
</ul>
<button class="btn-enter">立即使用</button>
</div>
<!-- 增肌计划 -->
<div class="tool-card" onclick="selectTool('bulk-plan')">
<span class="badge">肌肉拼图</span>
<h2>增肌计划</h2>
<p>小热量盈余 + 正氮平衡。<br>参考来源:运动营养学、闪电增肌、健身营养书、凯圣王、自然王等</p>
<ul class="tool-features">
<li>自动计算 BMR / TDEE</li>
<li>三档热量盈余可选</li>
<li>训练日 / 休息日动态碳水</li>
<li>支持导出 Excel</li>
</ul>
<button class="btn-enter">立即使用</button>
</div>
</div>
</div>
<!-- 凯圣王碳循环工具 -->
<div id="kings-cycle-tool" class="tool-page">
<div class="container">
<header style="display:flex; align-items:center; gap:12px;">
<button class="back-home-btn" onclick="backToHome()"style="position:static;margin:0;font-size:0.8rem;padding:5px 6px;"> 返回</button>
<div>
<h1 style="margin:0;">阿亮健身营养智能工具</h1>
<p class="subtitle" style="margin:0;">橱窗有各种减脂必备好物,感谢各位义父</p>
</div>
</header>
<div class="tabs">
<button class="tab-btn active" data-tab="kings-cycle">凯圣王碳循环</button>
<button class="tab-btn" data-tab="orange-carb">橙子碳水渐降</button>
</div>
<!-- 凯圣王碳循环部分 -->
<div id="kings-cycle" class="tab-content active">
<!-- 凯圣王碳循环内容保持不变 -->
<div class="top-row">
<!-- 基础信息 -->
<section>
<h3>第一步:输入基础信息</h3>
<div class="basic-row">
<div class="input-group"><label>当前体重(kg)</label><input type="number" id="weight" value="75" min="40" max="200"></div>
<div class="input-group target-weight-input-group">
<label>目标体重(±5kg)</label>
<div class="target-weight-controls">
<button type="button" onclick="adjustTarget(-1)">−</button>
<input type="tel" id="targetWeight" value="70" min="40" max="200" step="1" pattern="\d*" oninput="clipTargetWeight()">
<button type="button" onclick="adjustTarget(1)">+</button>
</div>
</div>
<div class="input-group"><label>身高(cm)</label><input type="number" id="height" value="178" min="140" max="220"></div>
<div class="input-group"><label>年龄(岁)</label><input type="number" id="age" value="30" min="18" max="80"></div>
<div class="input-group"><label>性别</label>
<select id="gender"><option value="male">男</option><option value="female">女</option></select>
</div>
</div>
</section>
<!-- 胚型 -->
<section>
<h3>第二步:选择胚型</h3>
<div class="body-type-cards">
<div class="body-type-card selected" data-type="ectomorph"><h4>外胚型</h4><p>易瘦</p></div>
<div class="body-type-card" data-type="mesomorph"><h4>中胚型</h4><p>肌肉型</p></div>
<div class="body-type-card" data-type="endomorph"><h4>内胚型</h4><p>易胖</p></div>
</div>
<!-- 胚型参考图 -->
<div style="text-align:center;margin-top:10px;">
<a href="javascript:void(0)"
onclick="toggleBodyTypeRef()"
style="color:#E53E3E;font-size:.85rem;text-decoration:underline;">
📌 点击查看胚型参考图
</a>
<div id="bodytype-ref" style="display:none;margin-top:12px;">
<img src="https://qcloud.dpfile.com/pc/CqGM_UcCrvGcGH_XM4yXFCYjwgNnaLZ8cSnss-iMlxboDaSWvqnh_75XjQjKtRzN.jpg"
alt="胚型参考" style="max-width:100%;height:auto;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.15)">
<p style="margin-top:6px;font-size:.75rem;color:#64748b">外胚 / 中胚 / 内胚 体型对照,仅供参考</p>
</div>
</div>
</section>
<!-- 训练计划 -->
<section>
<h3>第三步:选择训练计划 需要训练、食谱指导(有偿,学生特惠)可加vx: ll8819112</h3>
<div class="plan-cards">
<div class="plan-card selected" data-plan="1"><h4>练1休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="2"><h4>练2休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="3"><h4>练3休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="4"><h4>练4休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="custom"><h4>自定义</h4><p>自由</p></div>
</div>
<div class="custom-plan" id="customPlan">
<input placeholder="周一" id="cus-mon">
<input placeholder="周二" id="cus-tue">
<input placeholder="周三" id="cus-wed">
<input placeholder="周四" id="cus-thu">
<input placeholder="周五" id="cus-fri">
<input placeholder="周六" id="cus-sat">
<input placeholder="周日" id="cus-sun">
</div>
</section>
<!-- 宏量 -->
<section>
<h3>营养素设置(已根据胚型自动匹配,无需调整)</h3>
<div class="macro-row">
<div class="input-group"><label>碳水(g/kg)</label><input type="number" id="carbsPerKg" value="3.0" step="0.1" min="1" max="10"></div>
<div class="input-group"><label>蛋白质(g/kg)</label><input type="number" id="proteinPerKg" value="1.3" step="0.1" min="0.8" max="3"></div>
<div class="input-group"><label>脂肪(g/kg)</label><input type="number" id="fatPerKg" value="1.1" step="0.1" min="0.5" max="2"></div>
</div>
</section>
<!-- 汇总 -->
<section>
<h3>最后一步:点击下方计算计划</h3>
<div class="summary-cards">
<div class="summary-card"><span class="val" id="bmrValue">1852</span><div class="lab">基础代谢</div></div>
<div class="summary-card"><span class="val" id="tdeeValue">2352</span><div class="lab">每日总消耗</div></div>
<div class="summary-card"><span class="val" id="proteinValue">98</span><div class="lab">每日蛋白(g)</div></div>
<div class="summary-card"><span class="val" id="carbsValue">1575</span><div class="lab">每周碳水(g)</div></div>
</div>
</section>
</div>
<div class="btn-row">
<button class="btn-calc" id="calculateBtn">计算计划</button>
<button class="btn-down" id="downloadBtn">下载Excel(电脑端)</button>
<button class="btn-reset" id="resetBtn">重置</button>
<button class="btn-back" onclick="backToHome()">返回首页</button>
</div>
<div class="target-info">
<h3>目标体重分析<br>碳循环食谱(有偿)可加vx: ll8819112</h3>
<div class="target-stats">
<div class="target-stat">
<div class="value" id="weightDiffValue">-5</div>
<div class="label">体重差(kg)</div>
</div>
<div class="target-stat">
<div class="value" id="weeklyCalorieDiffValue">-1400</div>
<div class="label">周热量差(kcal)</div>
</div>
<div class="target-stat">
<div class="value" id="daysNeededValue">42</div>
<div class="label">预计天数</div>
</div>
<div class="target-stat">
<div class="value" id="targetDate">2023-12-24</div>
<div class="label">预计完成日期</div>
</div>
</div>
</div>
<!-- 竖向周表容器 -->
<div id="weekTables" class="week-tables"></div>
<!-- 原表继续保留,但只隐藏 table,不隐藏后面的说明 -->
<div class="table-wrap">
<table id="planTable" style="display:none;"> </table>
</div>
<div class="table-wrap">
<table id="planTable">
<thead>
<tr id="dayRow"><th rowspan="2">项目</th></tr>
<tr id="carbLevelRow"></tr>
</thead>
<tbody>
<tr class="band"><td>训练部位<br>(可双击自定义)</td><td class="editable">休息</td><td class="editable">胸+三头</td><td class="editable">休息</td><td class="editable">背+二头</td><td class="editable">休息</td><td class="editable">腿+肩</td><td class="editable">休息</td></tr>
<tr class="band"><td>碳水(g)</td><td id="carb-mon">192</td><td id="carb-tue">412</td><td id="carb-wed">124</td><td id="carb-thu">192</td><td id="carb-fri">124</td><td id="carb-sat">412</td><td id="carb-sun">124</td></tr>
<tr class="band"><td>蛋白质(g)</td><td id="protein-mon">118</td><td id="protein-tue">118</td><td id="protein-wed">118</td><td id="protein-thu">118</td><td id="protein-fri">118</td><td id="protein-sat">118</td><td id="protein-sun">118</td></tr>
<tr class="band"><td>脂肪(g)</td><td id="fat-mon">64</td><td id="fat-tue">41</td><td id="fat-wed">137</td><td id="fat-thu">64</td><td id="fat-fri">137</td><td id="fat-sat">41</td><td id="fat-sun">137</td></tr>
<tr class="band"><td>热量(kcal)</td><td id="cal-mon">1817</td><td id="cal-tue">2490</td><td id="cal-wed">2202</td><td id="cal-thu">1817</td><td id="cal-fri">2202</td><td id="cal-sat">2490</td><td id="cal-sun">2202</td></tr>
<tr class="band"><td>缺口/盈余</td><td id="diff-mon">-535</td><td id="diff-tue">138</td><td id="diff-wed">-150</td><td id="diff-thu">-535</td><td id="diff-fri">-150</td><td id="diff-sat">138</td><td id="diff-sun">-150</td></tr>
</tbody>
</table>
</div>
<div class="notes">
<h3>📌 碳循环计划说明</h3>
<ul>
<li>如果你骨架小、肩窄、吃不胖、增肌慢:<strong>→ 偏外胚型</strong></li>
<li>如果你肩宽腰窄、肌肉容易长:<strong>→ 偏中胚型</strong></li>
<li>如果你骨架大、腰腹易囤肉:<strong>→ 偏内胚型</strong></li>
<li><span class="tag high">高碳日</span>:碳水占周总碳水的50%,建议摄入精制碳水(如白米、白面包)</li>
<li><span class="tag med">中碳日</span>:碳水占周总碳水的35%,建议混合精碳和粗碳</li>
<li><span class="tag low">低碳日</span>:碳水占周总碳水的15%,建议摄入粗碳(如糙米、燕麦)</li>
<li><strong>热量换算:</strong> 碳/蛋白 4 kcal/g,脂肪 9 kcal/g。</li>
<li><strong>体重变化估算:</strong> 每减少7700 kcal热量约减少1 kg体重,每增加7700 kcal热量约增加1 kg体重。</li>
</ul>
</div>
</div>
<!-- 增肌计划部分 -->
<div id="bulk-plan" class="tab-content">
<div class="top-row">
<!-- 基础信息 -->
<section>
<h3>第一步:基础信息</h3>
<div class="basic-row">
<div class="input-group"><label>体重(kg)</label><input type="number" id="bulk-weight" value="70" min="40" max="150"></div>
<div class="input-group"><label>身高(cm)</label><input type="number" id="bulk-height" value="175" min="140" max="220"></div>
<div class="input-group"><label>年龄(岁)</label><input type="number" id="bulk-age" value="25" min="18" max="60"></div>
<div class="input-group"><label>性别</label>
<select id="bulk-gender"><option value="male">男</option><option value="female">女</option></select>
</div>
</div>
</section>
<!-- 活动系数 -->
<section>
<h3>第二步:日常活动强度</h3>
<div class="bulk-level-cards" id="pal-cards">
<div class="bulk-level-card selected" data-pal="1.2"><h4>久坐</h4><p>办公室/几乎无运动</p></div>
<div class="bulk-level-card" data-pal="1.375"><h4>轻度活跃</h4><p>每周轻度1-3天</p></div>
<div class="bulk-level-card" data-pal="1.55"><h4>中度活跃</h4><p>每周中度3-5天</p></div>
<div class="bulk-level-card" data-pal="1.725"><h4>非常活跃</h4><p>每周高强度6-7天</p></div>
<div class="bulk-level-card" data-pal="1.9"><h4>职业运动员</h4><p>每天高强度</p></div>
</div>
</section>
<!-- 训练经验 -->
<section>
<h3>第三步:训练经验</h3>
<div class="bulk-level-cards" id="exp-cards">
<div class="bulk-level-card selected" data-exp="novice"><h4>新手</h4><p>系统训练 <1 年</p></div>
<div class="bulk-level-card" data-exp="intermediate"><h4>中级</h4><p>系统训练 1-3 年</p></div>
<div class="bulk-level-card" data-exp="advanced"><h4>高级</h4><p>系统训练 >3 年</p></div>
</div>
</section>
<!-- 热量盈余 -->
<section>
<h3>第四步:热量盈余</h3>
<div class="bulk-level-cards" id="surplus-cards">
<div class="bulk-level-card selected" data-surplus="200"><h4>减脂人增肌</h4><p>+200 kcal/日</p></div>
<div class="bulk-level-card" data-surplus="350"><h4>力量型增肌</h4><p>+350 kcal/日</p></div>
<div class="bulk-level-card" data-surplus="550"><h4>瘦子脏增肌</h4><p>+550 kcal/日</p></div>
</div>
</section>
<!-- 新增:训练计划选择 -->
<section>
<h3>第五步:选择训练计划</h3>
<div class="plan-cards" id="bulk-plan-cards">
<div class="plan-card selected" data-plan="1"><h4>练1休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="2"><h4>练2休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="3"><h4>练3休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="4"><h4>练4休1</h4><p>循环</p></div>
<div class="plan-card" data-plan="custom"><h4>自定义</h4><p>自由</p></div>
</div>
<!-- 自定义输入区 -->
<div class="custom-plan" id="bulk-custom-plan" style="display:none;gap:4px;flex-wrap:wrap;margin-top:8px">
<input placeholder="周一" id="bulk-cus-mon">
<input placeholder="周二" id="bulk-cus-tue">
<input placeholder="周三" id="bulk-cus-wed">
<input placeholder="周四" id="bulk-cus-thu">
<input placeholder="周五" id="bulk-cus-fri">
<input placeholder="周六" id="bulk-cus-sat">
<input placeholder="周日" id="bulk-cus-sun">
</div>
</section>
<!-- 结果汇总 -->
<section>
<h3>计算结果</h3>
<div class="bulk-stats">
<div class="bulk-stat"><div class="value" id="bulk-bmr">0</div><div class="label">基础代谢(BMR)</div></div>
<div class="bulk-stat"><div class="value" id="bulk-tdee">0</div><div class="label">每日消耗(TDEE)</div></div>
<div class="bulk-stat"><div class="value" id="bulk-target">0</div><div class="label">训练日摄入热量</div></div>
<div class="bulk-stat"><div class="value" id="bulk-protein">0</div><div class="label">每日摄入蛋白质(g)</div></div>
<div class="bulk-stat"><div class="value" id="bulk-carb-display">0</div><div class="label">训练日碳水(g)</div></div>
<div class="bulk-stat"><div class="value" id="bulk-rest-carb-display">0</div><div class="label">休息日碳水(g)</div></div>
<div class="bulk-stat"><div class="value" id="bulk-fat-display">0</div><div class="label">每日脂肪(g)</div></div>
<!-- 预计每周增重 -->
<div class="bulk-stat">
<div class="value" id="bulk-weekly-gain">—</div>
<div class="label">预计每周增重(kg)</div>
</div>
</div>
</section>
</div>
<div class="btn-row">
<button class="btn-calc" id="bulk-calc">计算计划</button>
<button class="btn-down" id="bulk-dl">下载Excel(电脑端)</button>
<button class="btn-reset" id="bulk-reset">重置</button>
<button class="btn-back" onclick="backToHome()">返回首页</button>
</div>
<!-- 详细宏量表格 -->
<div class="table-wrap">
<table id="bulk-week-table">
<thead>
<tr>
<th>项目</th>
<th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th>六</th><th>日</th>
</tr>
</thead>
<tbody>
<tr class="band"><td>训练部位<br>(可双击自定义)</td>
<td class="editable" data-day="0">胸+三头</td>
<td class="editable" data-day="1">背+二头</td>
<td class="editable" data-day="2">休息</td>
<td class="editable" data-day="3">腿+肩</td>
<td class="editable" data-day="4">休息</td>
<td class="editable" data-day="5">胸+三头</td>
<td class="editable" data-day="6">休息</td>
</tr>
<tr class="band"><td>碳水(g)</td>
<td id="bulk-carb-0">0</td><td id="bulk-carb-1">0</td><td id="bulk-carb-2">0</td>
<td id="bulk-carb-3">0</td><td id="bulk-carb-4">0</td><td id="bulk-carb-5">0</td><td id="bulk-carb-6">0</td>
</tr>
<tr class="band"><td>蛋白质(g)</td>
<td id="bulk-pro-0">0</td><td id="bulk-pro-1">0</td><td id="bulk-pro-2">0</td>
<td id="bulk-pro-3">0</td><td id="bulk-pro-4">0</td><td id="bulk-pro-5">0</td><td id="bulk-pro-6">0</td>
</tr>
<tr class="band"><td>脂肪(g)</td>
<td id="bulk-fat-0">0</td><td id="bulk-fat-1">0</td><td id="bulk-fat-2">0</td>
<td id="bulk-fat-3">0</td><td id="bulk-fat-4">0</td><td id="bulk-fat-5">0</td><td id="bulk-fat-6">0</td>
</tr>
<tr class="band"><td>热量(kcal)</td>
<td id="bulk-cal-0">0</td><td id="bulk-cal-1">0</td><td id="bulk-cal-2">0</td>
<td id="bulk-cal-3">0</td><td id="bulk-cal-4">0</td><td id="bulk-cal-5">0</td><td id="bulk-cal-6">0</td>
</tr>
<tr class="band"><td>盈余/缺口</td>
<td id="bulk-diff-0">0</td><td id="bulk-diff-1">0</td><td id="bulk-diff-2">0</td>
<td id="bulk-diff-3">0</td><td id="bulk-diff-4">0</td><td id="bulk-diff-5">0</td><td id="bulk-diff-6">0</td>
</tr>