seawolf2357 commited on
Commit
b9c1b54
Β·
1 Parent(s): 6c1d009

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +415 -183
app.py CHANGED
@@ -787,9 +787,10 @@ HTML = """
787
  <head>
788
  <meta charset="utf-8">
789
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
790
- <title>AI ν”Œλ¦½λΆ</title>
791
  <link rel="stylesheet" href="/static/flipbook.css">
792
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
 
793
  <script src="/static/three.js"></script>
794
  <script src="/static/iscroll.js"></script>
795
  <script src="/static/mark.js"></script>
@@ -801,23 +802,24 @@ HTML = """
801
  <script src="/static/flipbook.swipe.js"></script>
802
  <script src="/static/flipbook.webgl.js"></script>
803
  <style>
 
 
 
804
  :root {
805
- --primary-color: #a5d8ff;
806
- --secondary-color: #ffd6e0;
807
- --tertiary-color: #c3fae8;
808
- --accent-color: #d0bfff;
809
- --ai-color: #86e8ab;
810
- --ai-hover: #65d68a;
811
- --bg-color: #f8f9fa;
812
- --text-color: #495057;
813
  --card-bg: #ffffff;
814
- --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
815
- --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
816
- --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
817
  --radius-sm: 8px;
818
  --radius-md: 12px;
819
- --radius-lg: 16px;
820
- --transition: all 0.3s ease;
821
  }
822
 
823
  * {
@@ -826,24 +828,131 @@ HTML = """
826
 
827
  body {
828
  margin: 0;
829
- background: var(--bg-color);
830
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
831
- color: var(--text-color);
832
- background-image: linear-gradient(135deg, #2a0845 0%, #6441a5 50%, #c9a8ff 100%);
 
833
  background-attachment: fixed;
834
  min-height: 100vh;
835
  }
836
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
837
  .floating-ai {
838
  position: fixed;
839
  top: 20px;
840
- left: 20px;
841
- width: 60px;
842
- height: 60px;
843
  border-radius: 50%;
844
- background: rgba(134, 232, 171, 0.95);
845
- backdrop-filter: blur(10px);
846
- box-shadow: var(--shadow-md);
847
  z-index: 9999;
848
  display: flex;
849
  justify-content: center;
@@ -854,8 +963,13 @@ HTML = """
854
  }
855
 
856
  .floating-ai:hover {
857
- transform: scale(1.05);
858
- box-shadow: var(--shadow-lg);
 
 
 
 
 
859
  }
860
 
861
  .floating-ai .icon {
@@ -864,78 +978,52 @@ HTML = """
864
  align-items: center;
865
  width: 100%;
866
  height: 100%;
867
- font-size: 22px;
868
  color: white;
 
869
  transition: var(--transition);
870
  }
871
 
872
- .floating-ai .title {
873
  position: absolute;
874
- left: 70px;
875
- background: rgba(255, 255, 255, 0.95);
876
- padding: 8px 20px;
877
- border-radius: 20px;
878
- box-shadow: var(--shadow-sm);
879
- font-weight: 600;
880
- font-size: 14px;
 
 
881
  white-space: nowrap;
882
  pointer-events: none;
883
  opacity: 0;
884
- transform: translateX(-10px);
885
  transition: all 0.3s ease;
886
- color: var(--text-color);
887
  }
888
 
889
- .floating-ai:hover .title {
890
  opacity: 1;
891
  transform: translateX(0);
892
  }
893
 
894
- .header-info {
895
- position: fixed;
896
- top: 15px;
897
- left: 50%;
898
- transform: translateX(-50%);
899
- text-align: center;
900
- z-index: 100;
901
- background: rgba(255, 255, 255, 0.9);
902
- backdrop-filter: blur(10px);
903
- padding: 12px 30px;
904
- border-radius: 25px;
905
- box-shadow: var(--shadow-md);
906
- }
907
-
908
- .header-info .title {
909
- font-size: 1.3rem;
910
- font-weight: 700;
911
- background-image: linear-gradient(120deg, #8e74eb 0%, #9d66ff 100%);
912
- -webkit-background-clip: text;
913
- background-clip: text;
914
- color: transparent;
915
- margin-bottom: 4px;
916
- }
917
-
918
- .header-info .description {
919
- font-size: 0.8rem;
920
- color: #666;
921
- max-width: 400px;
922
- }
923
-
924
  #viewer {
925
  width: 90%;
926
- height: 85vh;
927
  max-width: 90%;
928
  margin: 0;
929
  background: var(--card-bg);
930
- border: none;
931
- border-radius: var(--radius-lg);
932
  position: fixed;
933
- top: 55%;
934
  left: 50%;
935
  transform: translate(-50%, -50%);
936
  z-index: 1000;
937
  box-shadow: var(--shadow-lg);
938
- max-height: calc(85vh - 40px);
939
  overflow: hidden;
940
  }
941
 
@@ -943,18 +1031,17 @@ HTML = """
943
  z-index: 2000 !important;
944
  opacity: 1 !important;
945
  bottom: 0 !important;
946
- background-color: rgba(255,255,255,0.9) !important;
947
- backdrop-filter: blur(10px) !important;
948
- border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
949
  padding: 12px 0 !important;
950
- box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important;
951
  }
952
 
953
  .flipbook-container .fb3d-menu-bar > ul > li > img,
954
  .flipbook-container .fb3d-menu-bar > ul > li > div {
955
  opacity: 1 !important;
956
  transform: scale(1.2) !important;
957
- filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)) !important;
958
  }
959
 
960
  .flipbook-container .fb3d-menu-bar > ul > li {
@@ -962,13 +1049,16 @@ HTML = """
962
  }
963
 
964
  .flipbook-container .fb3d-menu-bar > ul > li > span {
965
- background-color: rgba(0,0,0,0.7) !important;
966
- color: white !important;
 
967
  border-radius: var(--radius-sm) !important;
968
  padding: 8px 12px !important;
969
  font-size: 13px !important;
970
  bottom: 55px !important;
971
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
 
 
972
  }
973
 
974
  @keyframes spin {
@@ -976,14 +1066,15 @@ HTML = """
976
  100% { transform: rotate(360deg); }
977
  }
978
 
 
979
  .loading-container {
980
  position: fixed;
981
  top: 50%;
982
  left: 50%;
983
  transform: translate(-50%, -50%);
984
  text-align: center;
985
- background: rgba(255, 255, 255, 0.95);
986
- backdrop-filter: blur(10px);
987
  padding: 40px;
988
  border-radius: var(--radius-md);
989
  box-shadow: var(--shadow-lg);
@@ -991,35 +1082,37 @@ HTML = """
991
  }
992
 
993
  .loading-spinner {
994
- border: 4px solid rgba(100, 65, 165, 0.2);
995
- border-top: 4px solid #6441a5;
996
  border-radius: 50%;
997
- width: 50px;
998
- height: 50px;
999
  margin: 0 auto;
1000
  animation: spin 1s linear infinite;
1001
  }
1002
 
1003
  .loading-text {
1004
  margin-top: 20px;
1005
- font-size: 16px;
1006
- color: var(--text-color);
1007
- font-weight: 500;
 
1008
  }
1009
 
1010
  .progress-bar-container {
1011
- width: 200px;
1012
- height: 6px;
1013
- background-color: rgba(0,0,0,0.1);
1014
- border-radius: 3px;
 
1015
  margin-top: 15px;
1016
  overflow: hidden;
1017
  }
1018
 
1019
  .progress-bar {
1020
  height: 100%;
1021
- background: linear-gradient(to right, #6441a5, #c9a8ff);
1022
- border-radius: 3px;
1023
  transition: width 0.3s ease;
1024
  }
1025
 
@@ -1028,25 +1121,28 @@ HTML = """
1028
  bottom: 20px;
1029
  left: 50%;
1030
  transform: translateX(-50%);
1031
- background: rgba(255, 255, 255, 0.9);
1032
- padding: 10px 20px;
1033
- border-radius: 20px;
1034
- box-shadow: var(--shadow-md);
 
 
1035
  font-size: 14px;
1036
- color: var(--text-color);
 
1037
  z-index: 9998;
1038
  }
1039
 
1040
- /* AI μ±„νŒ… μ»¨ν…Œμ΄λ„ˆ */
1041
  #aiChatContainer {
1042
  position: fixed;
1043
  top: 0;
1044
  right: 0;
1045
- width: 400px;
1046
  height: 100%;
1047
- background: rgba(255, 255, 255, 0.98);
1048
- backdrop-filter: blur(10px);
1049
- box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
1050
  z-index: 10000;
1051
  transform: translateX(100%);
1052
  transition: transform 0.3s ease;
@@ -1063,14 +1159,17 @@ HTML = """
1063
  justify-content: space-between;
1064
  align-items: center;
1065
  padding: 20px;
1066
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1067
- background: linear-gradient(135deg, #86e8ab 0%, #65d68a 100%);
1068
  }
1069
 
1070
  #aiChatHeader h3 {
1071
  margin: 0;
1072
  color: white;
1073
- font-size: 18px;
 
 
 
1074
  display: flex;
1075
  align-items: center;
1076
  }
@@ -1080,29 +1179,32 @@ HTML = """
1080
  }
1081
 
1082
  #aiChatClose {
1083
- background: rgba(255,255,255,0.3);
1084
- border: none;
1085
  cursor: pointer;
1086
  font-size: 18px;
1087
- color: white;
1088
- width: 35px;
1089
- height: 35px;
1090
- border-radius: 50%;
1091
  display: flex;
1092
  align-items: center;
1093
  justify-content: center;
 
1094
  transition: var(--transition);
1095
  }
1096
 
1097
  #aiChatClose:hover {
1098
- background: rgba(255,255,255,0.5);
1099
- transform: scale(1.1);
 
1100
  }
1101
 
1102
  #aiChatMessages {
1103
  flex: 1;
1104
  overflow-y: auto;
1105
  padding: 20px;
 
1106
  }
1107
 
1108
  .chat-message {
@@ -1116,24 +1218,26 @@ HTML = """
1116
  }
1117
 
1118
  .chat-avatar {
1119
- width: 35px;
1120
- height: 35px;
1121
- border-radius: 50%;
 
1122
  display: flex;
1123
  justify-content: center;
1124
  align-items: center;
1125
  flex-shrink: 0;
 
1126
  }
1127
 
1128
  .chat-message.user .chat-avatar {
1129
  margin-left: 10px;
1130
- background: var(--accent-color);
1131
  color: white;
1132
  }
1133
 
1134
  .chat-message.ai .chat-avatar {
1135
  margin-right: 10px;
1136
- background: var(--ai-color);
1137
  color: white;
1138
  }
1139
 
@@ -1142,30 +1246,35 @@ HTML = """
1142
  }
1143
 
1144
  .chat-content {
1145
- padding: 12px 16px;
1146
- border-radius: 18px;
 
1147
  word-break: break-word;
 
1148
  font-size: 14px;
1149
- line-height: 1.5;
 
 
1150
  }
1151
 
1152
  .chat-message.user .chat-content {
1153
- background: var(--accent-color);
1154
  color: white;
1155
  border-bottom-right-radius: 4px;
1156
  }
1157
 
1158
  .chat-message.ai .chat-content {
1159
- background: #f1f3f5;
1160
- color: #333;
1161
  border-bottom-left-radius: 4px;
1162
  }
1163
 
1164
  .chat-time {
1165
- font-size: 10px;
1166
- color: #999;
1167
- margin-top: 5px;
1168
  text-align: right;
 
1169
  }
1170
 
1171
  .chat-message.ai .chat-time {
@@ -1175,49 +1284,59 @@ HTML = """
1175
  #aiChatForm {
1176
  display: flex;
1177
  padding: 15px 20px;
1178
- border-top: 1px solid rgba(0, 0, 0, 0.1);
1179
- background: #fafafa;
 
1180
  }
1181
 
1182
  #aiChatInput {
1183
  flex: 1;
1184
- padding: 12px 18px;
1185
- border: 2px solid #e9ecef;
1186
  border-radius: 25px;
 
1187
  font-size: 14px;
 
1188
  outline: none;
1189
  transition: var(--transition);
 
1190
  }
1191
 
1192
  #aiChatInput:focus {
1193
- border-color: var(--ai-color);
1194
- box-shadow: 0 0 0 3px rgba(134, 232, 171, 0.2);
1195
  }
1196
 
1197
  #aiChatSubmit {
1198
- background: var(--ai-color);
1199
- border: none;
1200
  color: white;
1201
- width: 45px;
1202
- height: 45px;
1203
  border-radius: 50%;
1204
- margin-left: 10px;
1205
  display: flex;
1206
  justify-content: center;
1207
  align-items: center;
1208
  cursor: pointer;
 
1209
  transition: var(--transition);
1210
  }
1211
 
1212
  #aiChatSubmit:hover {
1213
- background: var(--ai-hover);
1214
- transform: scale(1.05);
 
 
 
 
 
1215
  }
1216
 
1217
  #aiChatSubmit:disabled {
1218
- background: #ccc;
1219
  cursor: not-allowed;
1220
  transform: none;
 
1221
  }
1222
 
1223
  .typing-indicator {
@@ -1228,17 +1347,18 @@ HTML = """
1228
 
1229
  .typing-indicator .chat-avatar {
1230
  margin-right: 10px;
1231
- background: var(--ai-color);
1232
  color: white;
1233
  }
1234
 
1235
  .typing-indicator span {
1236
- height: 8px;
1237
- width: 8px;
1238
- background: var(--ai-color);
1239
  border-radius: 50%;
1240
  display: inline-block;
1241
- margin-right: 4px;
 
1242
  animation: typing 1s infinite;
1243
  }
1244
 
@@ -1246,8 +1366,8 @@ HTML = """
1246
  .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
1247
 
1248
  @keyframes typing {
1249
- 0%, 100% { transform: translateY(0); opacity: 0.5; }
1250
- 50% { transform: translateY(-5px); opacity: 1; }
1251
  }
1252
 
1253
  .error-container {
@@ -1256,7 +1376,8 @@ HTML = """
1256
  left: 50%;
1257
  transform: translate(-50%, -50%);
1258
  text-align: center;
1259
- background: rgba(255, 255, 255, 0.95);
 
1260
  padding: 40px;
1261
  border-radius: var(--radius-md);
1262
  box-shadow: var(--shadow-lg);
@@ -1264,54 +1385,137 @@ HTML = """
1264
  }
1265
 
1266
  .error-container i {
1267
- font-size: 48px;
1268
- color: #e74c3c;
1269
  margin-bottom: 20px;
 
1270
  }
1271
 
1272
  .error-container p {
 
1273
  font-size: 16px;
1274
- color: var(--text-color);
 
1275
  margin-bottom: 20px;
1276
  }
1277
 
1278
  .error-container button {
1279
- padding: 10px 25px;
1280
- background: var(--accent-color);
1281
  color: white;
1282
- border: none;
1283
- border-radius: 25px;
1284
  cursor: pointer;
1285
- font-size: 14px;
 
 
 
1286
  transition: var(--transition);
1287
  }
1288
 
1289
  .error-container button:hover {
1290
- transform: translateY(-2px);
1291
- box-shadow: var(--shadow-md);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1292
  }
1293
 
1294
  @media (max-width: 768px) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1295
  .header-info {
1296
- padding: 10px 20px;
 
1297
  max-width: 90%;
1298
  }
1299
 
1300
  .header-info .title {
1301
- font-size: 1.1rem;
1302
  }
1303
 
1304
  .header-info .description {
1305
- font-size: 0.7rem;
1306
  }
1307
 
1308
  .floating-ai {
1309
- width: 50px;
1310
- height: 50px;
 
 
1311
  }
1312
 
1313
  .floating-ai .icon {
1314
- font-size: 18px;
1315
  }
1316
 
1317
  #aiChatContainer {
@@ -1320,23 +1524,43 @@ HTML = """
1320
 
1321
  #viewer {
1322
  width: 95%;
1323
- height: 80vh;
1324
- top: 58%;
 
 
 
 
1325
  }
1326
  }
1327
  </style>
1328
  </head>
1329
  <body>
 
 
 
 
 
 
 
 
 
1330
  <div class="header-info">
1331
- <div class="title">AI ν”Œλ¦½λΆ</div>
1332
- <div class="description">λ‚˜λ§Œμ˜ PDF μ „μžμ±…μ„ λ”μš± κ°€μΉ˜μžˆκ²Œ μž…μ²΄μ μΈ λΉ„μ£Όμ–Όκ³Ό AI챗봇을 톡해 μƒν˜Έ μΈν„°λ ‰ν‹°λΈŒλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€.</div>
 
 
 
 
 
1333
  </div>
1334
 
 
1335
  <div id="aiButton" class="floating-ai">
1336
  <div class="icon"><i class="fas fa-robot"></i></div>
1337
- <div class="title">AI μ–΄μ‹œμŠ€ν„΄νŠΈ</div>
1338
  </div>
1339
 
 
1340
  <div id="aiChatContainer">
1341
  <div id="aiChatHeader">
1342
  <h3><i class="fas fa-robot"></i> AI μ–΄μ‹œμŠ€ν„΄νŠΈ</h3>
@@ -1349,9 +1573,17 @@ HTML = """
1349
  </form>
1350
  </div>
1351
 
 
1352
  <div id="viewer"></div>
1353
  <div id="loadingPages" class="loading-pages" style="display:none;">νŽ˜μ΄μ§€ λ‘œλ”© 쀑... <span id="loadingPagesCount">0%</span></div>
1354
 
 
 
 
 
 
 
 
1355
  <script>
1356
  let fb = null;
1357
  const viewer = document.getElementById('viewer');
@@ -1473,7 +1705,7 @@ HTML = """
1473
  if (statusData.status === 'analyzing') {
1474
  removeTypingIndicator();
1475
  const progress = statusData.progress || 0;
1476
- addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! ν˜„μž¬ PDFλ₯Ό AIκ°€ λΆ„μ„ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. πŸ“Š<br><br>μ§„ν–‰λ₯ : <strong>${progress}%</strong><br><small style="color:#999;">뢄석이 μ™„λ£Œλ˜λ©΄ μžλ™μœΌλ‘œ μ•Œλ €λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.</small>`);
1477
  hasLoadedSummary = true;
1478
  isAiProcessing = false;
1479
 
@@ -1484,7 +1716,7 @@ HTML = """
1484
 
1485
  if (statusData.status === 'error') {
1486
  removeTypingIndicator();
1487
- addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! PDF 뢄석 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. ⚠️<br><br><small style="color:#e74c3c;">${statusData.error || 'μ•Œ 수 μ—†λŠ” 였λ₯˜'}</small><br><br>νŽ˜μ΄μ§€λ₯Ό μƒˆλ‘œκ³ μΉ¨ν•˜κ±°λ‚˜ μž μ‹œ ν›„ λ‹€μ‹œ μ‹œλ„ν•΄μ£Όμ„Έμš”.`);
1488
  hasLoadedSummary = true;
1489
  isAiProcessing = false;
1490
  return;
@@ -1492,7 +1724,7 @@ HTML = """
1492
 
1493
  if (statusData.status === 'not_started') {
1494
  removeTypingIndicator();
1495
- addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! PDF 뢄석이 아직 μ‹œμž‘λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. πŸ”„<br><br><small style="color:#999;">μž μ‹œλ§Œ κΈ°λ‹€λ €μ£Όμ„Έμš”...</small>`);
1496
  hasLoadedSummary = true;
1497
  isAiProcessing = false;
1498
  startAnalysisPolling();
@@ -1507,16 +1739,16 @@ HTML = """
1507
 
1508
  if (data.summary) {
1509
  const pageInfo = data.analyzed_pages ? ` (${data.analyzed_pages}/${data.total_pages}νŽ˜μ΄μ§€ λΆ„μ„μ™„λ£Œ)` : '';
1510
- addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! 이 PDF에 λŒ€ν•΄ 무엇이든 μ§ˆλ¬Έν•΄μ£Όμ„Έμš”.${pageInfo}<br><br><strong>πŸ“„ PDF μš”μ•½:</strong><br>${data.summary}`);
1511
  } else {
1512
- addChatMessage("μ•ˆλ…•ν•˜μ„Έμš”! PDF에 λŒ€ν•΄ μ§ˆλ¬Έν•΄μ£Όμ„Έμš”. μ΅œμ„ μ„ λ‹€ν•΄ λ‹΅λ³€ν•˜κ² μŠ΅λ‹ˆλ‹€.");
1513
  }
1514
  hasLoadedSummary = true;
1515
 
1516
  } catch (error) {
1517
  console.error("PDF μš”μ•½ λ‘œλ“œ 였λ₯˜:", error);
1518
  removeTypingIndicator();
1519
- addChatMessage("μ•ˆλ…•ν•˜μ„Έμš”! PDF에 λŒ€ν•΄ μ§ˆλ¬Έν•΄μ£Όμ„Έμš”.");
1520
  hasLoadedSummary = true;
1521
  } finally {
1522
  isAiProcessing = false;
@@ -1663,7 +1895,7 @@ HTML = """
1663
 
1664
  let width, height;
1665
  if (aspectRatio > 1) {
1666
- height = Math.min(windowHeight * 0.85, windowHeight - 100);
1667
  width = height * aspectRatio * 0.75;
1668
  if (width > windowWidth * 0.9) {
1669
  width = windowWidth * 0.9;
@@ -1672,8 +1904,8 @@ HTML = """
1672
  } else {
1673
  width = Math.min(windowWidth * 0.95, windowWidth - 20);
1674
  height = width / aspectRatio * 0.85;
1675
- if (height > windowHeight * 0.8) {
1676
- height = windowHeight * 0.8;
1677
  width = height * aspectRatio * 0.85;
1678
  }
1679
  }
 
787
  <head>
788
  <meta charset="utf-8">
789
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
790
+ <title>🎨 AI ν”Œλ¦½λΆ - Comic Style</title>
791
  <link rel="stylesheet" href="/static/flipbook.css">
792
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
793
+ <link href="https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&display=swap" rel="stylesheet">
794
  <script src="/static/three.js"></script>
795
  <script src="/static/iscroll.js"></script>
796
  <script src="/static/mark.js"></script>
 
802
  <script src="/static/flipbook.swipe.js"></script>
803
  <script src="/static/flipbook.webgl.js"></script>
804
  <style>
805
+ /* ============================================
806
+ Comic Style CSS - Z-Image Style Applied
807
+ ============================================ */
808
  :root {
809
+ --primary-color: #3B82F6;
810
+ --secondary-color: #8B5CF6;
811
+ --accent-color: #FACC15;
812
+ --ai-color: #10B981;
813
+ --ai-hover: #059669;
814
+ --bg-yellow: #FEF9C3;
815
+ --text-dark: #1F2937;
 
816
  --card-bg: #ffffff;
817
+ --shadow-comic: 5px 5px 0 #1F2937;
818
+ --shadow-lg: 8px 8px 0 #1F2937;
819
+ --border-comic: 3px solid #1F2937;
820
  --radius-sm: 8px;
821
  --radius-md: 12px;
822
+ --transition: all 0.2s ease;
 
823
  }
824
 
825
  * {
 
828
 
829
  body {
830
  margin: 0;
831
+ font-family: 'Comic Neue', cursive, sans-serif;
832
+ color: var(--text-dark);
833
+ background-color: var(--bg-yellow);
834
+ background-image: radial-gradient(#1F2937 1px, transparent 1px);
835
+ background-size: 20px 20px;
836
  background-attachment: fixed;
837
  min-height: 100vh;
838
  }
839
 
840
+ /* HOME Button Container - Z-Image Style */
841
+ .home-button-container {
842
+ position: fixed;
843
+ top: 15px;
844
+ left: 50%;
845
+ transform: translateX(-50%);
846
+ display: flex;
847
+ justify-content: center;
848
+ align-items: center;
849
+ gap: 15px;
850
+ padding: 12px 25px;
851
+ background: linear-gradient(135deg, #10B981 0%, #059669 100%);
852
+ border: 4px solid #1F2937;
853
+ border-radius: 12px;
854
+ box-shadow: 6px 6px 0 #1F2937;
855
+ z-index: 9998;
856
+ }
857
+
858
+ .home-button {
859
+ display: inline-flex;
860
+ align-items: center;
861
+ gap: 8px;
862
+ padding: 10px 25px;
863
+ background: linear-gradient(135deg, #FACC15 0%, #F59E0B 100%);
864
+ color: #1F2937;
865
+ font-family: 'Bangers', cursive;
866
+ font-size: 1.4rem;
867
+ letter-spacing: 2px;
868
+ text-decoration: none;
869
+ border: 3px solid #1F2937;
870
+ border-radius: 8px;
871
+ box-shadow: 4px 4px 0 #1F2937;
872
+ transition: all 0.2s ease;
873
+ cursor: pointer;
874
+ }
875
+
876
+ .home-button:hover {
877
+ background: linear-gradient(135deg, #FDE047 0%, #FACC15 100%);
878
+ transform: translate(-2px, -2px);
879
+ box-shadow: 6px 6px 0 #1F2937;
880
+ text-decoration: none;
881
+ color: #1F2937;
882
+ }
883
+
884
+ .home-button:active {
885
+ transform: translate(2px, 2px);
886
+ box-shadow: 2px 2px 0 #1F2937;
887
+ }
888
+
889
+ .url-display {
890
+ font-family: 'Comic Neue', cursive;
891
+ font-size: 1.1rem;
892
+ font-weight: 700;
893
+ color: #FFF;
894
+ background: rgba(0,0,0,0.3);
895
+ padding: 8px 16px;
896
+ border-radius: 6px;
897
+ border: 2px solid rgba(255,255,255,0.3);
898
+ }
899
+
900
+ /* Header Info - Comic Style */
901
+ .header-info {
902
+ position: fixed;
903
+ top: 85px;
904
+ left: 50%;
905
+ transform: translateX(-50%);
906
+ text-align: center;
907
+ z-index: 100;
908
+ background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
909
+ border: 4px solid #1F2937;
910
+ padding: 15px 35px;
911
+ border-radius: 12px;
912
+ box-shadow: var(--shadow-lg);
913
+ }
914
+
915
+ .header-info .title {
916
+ font-family: 'Bangers', cursive;
917
+ font-size: 2rem;
918
+ color: #FFF;
919
+ text-shadow: 3px 3px 0 #1F2937;
920
+ letter-spacing: 3px;
921
+ margin-bottom: 6px;
922
+ }
923
+
924
+ .header-info .description {
925
+ font-family: 'Comic Neue', cursive;
926
+ font-size: 0.95rem;
927
+ font-weight: 700;
928
+ color: #FEF9C3;
929
+ max-width: 500px;
930
+ }
931
+
932
+ .stats-badge {
933
+ display: inline-block;
934
+ background: #FACC15;
935
+ color: #1F2937;
936
+ padding: 5px 12px;
937
+ border-radius: 20px;
938
+ font-size: 0.85rem;
939
+ margin: 3px;
940
+ font-weight: 700;
941
+ border: 2px solid #1F2937;
942
+ box-shadow: 2px 2px 0 #1F2937;
943
+ }
944
+
945
+ /* Floating AI Button - Comic Style */
946
  .floating-ai {
947
  position: fixed;
948
  top: 20px;
949
+ right: 20px;
950
+ width: 65px;
951
+ height: 65px;
952
  border-radius: 50%;
953
+ background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
954
+ border: 4px solid #1F2937;
955
+ box-shadow: 5px 5px 0 #1F2937;
956
  z-index: 9999;
957
  display: flex;
958
  justify-content: center;
 
963
  }
964
 
965
  .floating-ai:hover {
966
+ transform: translate(-2px, -2px);
967
+ box-shadow: 7px 7px 0 #1F2937;
968
+ }
969
+
970
+ .floating-ai:active {
971
+ transform: translate(2px, 2px);
972
+ box-shadow: 3px 3px 0 #1F2937;
973
  }
974
 
975
  .floating-ai .icon {
 
978
  align-items: center;
979
  width: 100%;
980
  height: 100%;
981
+ font-size: 26px;
982
  color: white;
983
+ text-shadow: 2px 2px 0 #1F2937;
984
  transition: var(--transition);
985
  }
986
 
987
+ .floating-ai .ai-title {
988
  position: absolute;
989
+ right: 75px;
990
+ background: #FFF;
991
+ padding: 10px 20px;
992
+ border-radius: 8px;
993
+ border: 3px solid #1F2937;
994
+ box-shadow: 4px 4px 0 #1F2937;
995
+ font-family: 'Bangers', cursive;
996
+ font-size: 1.1rem;
997
+ letter-spacing: 1px;
998
  white-space: nowrap;
999
  pointer-events: none;
1000
  opacity: 0;
1001
+ transform: translateX(10px);
1002
  transition: all 0.3s ease;
1003
+ color: var(--text-dark);
1004
  }
1005
 
1006
+ .floating-ai:hover .ai-title {
1007
  opacity: 1;
1008
  transform: translateX(0);
1009
  }
1010
 
1011
+ /* Viewer Container - Comic Style */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  #viewer {
1013
  width: 90%;
1014
+ height: 78vh;
1015
  max-width: 90%;
1016
  margin: 0;
1017
  background: var(--card-bg);
1018
+ border: 4px solid #1F2937;
1019
+ border-radius: var(--radius-md);
1020
  position: fixed;
1021
+ top: 58%;
1022
  left: 50%;
1023
  transform: translate(-50%, -50%);
1024
  z-index: 1000;
1025
  box-shadow: var(--shadow-lg);
1026
+ max-height: calc(78vh - 40px);
1027
  overflow: hidden;
1028
  }
1029
 
 
1031
  z-index: 2000 !important;
1032
  opacity: 1 !important;
1033
  bottom: 0 !important;
1034
+ background: linear-gradient(135deg, #FACC15 0%, #F59E0B 100%) !important;
1035
+ border-top: 3px solid #1F2937 !important;
1036
+ border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
1037
  padding: 12px 0 !important;
 
1038
  }
1039
 
1040
  .flipbook-container .fb3d-menu-bar > ul > li > img,
1041
  .flipbook-container .fb3d-menu-bar > ul > li > div {
1042
  opacity: 1 !important;
1043
  transform: scale(1.2) !important;
1044
+ filter: drop-shadow(2px 2px 0 #1F2937) !important;
1045
  }
1046
 
1047
  .flipbook-container .fb3d-menu-bar > ul > li {
 
1049
  }
1050
 
1051
  .flipbook-container .fb3d-menu-bar > ul > li > span {
1052
+ background: #FFF !important;
1053
+ color: #1F2937 !important;
1054
+ border: 2px solid #1F2937 !important;
1055
  border-radius: var(--radius-sm) !important;
1056
  padding: 8px 12px !important;
1057
  font-size: 13px !important;
1058
  bottom: 55px !important;
1059
+ font-family: 'Comic Neue', cursive !important;
1060
+ font-weight: 700 !important;
1061
+ box-shadow: 3px 3px 0 #1F2937 !important;
1062
  }
1063
 
1064
  @keyframes spin {
 
1066
  100% { transform: rotate(360deg); }
1067
  }
1068
 
1069
+ /* Loading Container - Comic Style */
1070
  .loading-container {
1071
  position: fixed;
1072
  top: 50%;
1073
  left: 50%;
1074
  transform: translate(-50%, -50%);
1075
  text-align: center;
1076
+ background: #FFF;
1077
+ border: 4px solid #1F2937;
1078
  padding: 40px;
1079
  border-radius: var(--radius-md);
1080
  box-shadow: var(--shadow-lg);
 
1082
  }
1083
 
1084
  .loading-spinner {
1085
+ border: 5px solid #FEF9C3;
1086
+ border-top: 5px solid #3B82F6;
1087
  border-radius: 50%;
1088
+ width: 55px;
1089
+ height: 55px;
1090
  margin: 0 auto;
1091
  animation: spin 1s linear infinite;
1092
  }
1093
 
1094
  .loading-text {
1095
  margin-top: 20px;
1096
+ font-family: 'Bangers', cursive;
1097
+ font-size: 1.3rem;
1098
+ color: var(--text-dark);
1099
+ letter-spacing: 1px;
1100
  }
1101
 
1102
  .progress-bar-container {
1103
+ width: 220px;
1104
+ height: 20px;
1105
+ background: #FEF9C3;
1106
+ border: 3px solid #1F2937;
1107
+ border-radius: 10px;
1108
  margin-top: 15px;
1109
  overflow: hidden;
1110
  }
1111
 
1112
  .progress-bar {
1113
  height: 100%;
1114
+ background: linear-gradient(to right, #3B82F6, #8B5CF6);
1115
+ border-radius: 7px;
1116
  transition: width 0.3s ease;
1117
  }
1118
 
 
1121
  bottom: 20px;
1122
  left: 50%;
1123
  transform: translateX(-50%);
1124
+ background: #FFF;
1125
+ border: 3px solid #1F2937;
1126
+ padding: 12px 25px;
1127
+ border-radius: 25px;
1128
+ box-shadow: 4px 4px 0 #1F2937;
1129
+ font-family: 'Comic Neue', cursive;
1130
  font-size: 14px;
1131
+ font-weight: 700;
1132
+ color: var(--text-dark);
1133
  z-index: 9998;
1134
  }
1135
 
1136
+ /* AI Chat Container - Comic Style */
1137
  #aiChatContainer {
1138
  position: fixed;
1139
  top: 0;
1140
  right: 0;
1141
+ width: 420px;
1142
  height: 100%;
1143
+ background: #FFF;
1144
+ border-left: 4px solid #1F2937;
1145
+ box-shadow: -8px 0 0 #1F2937;
1146
  z-index: 10000;
1147
  transform: translateX(100%);
1148
  transition: transform 0.3s ease;
 
1159
  justify-content: space-between;
1160
  align-items: center;
1161
  padding: 20px;
1162
+ border-bottom: 4px solid #1F2937;
1163
+ background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
1164
  }
1165
 
1166
  #aiChatHeader h3 {
1167
  margin: 0;
1168
  color: white;
1169
+ font-family: 'Bangers', cursive;
1170
+ font-size: 1.5rem;
1171
+ letter-spacing: 2px;
1172
+ text-shadow: 2px 2px 0 #1F2937;
1173
  display: flex;
1174
  align-items: center;
1175
  }
 
1179
  }
1180
 
1181
  #aiChatClose {
1182
+ background: #FFF;
1183
+ border: 3px solid #1F2937;
1184
  cursor: pointer;
1185
  font-size: 18px;
1186
+ color: #1F2937;
1187
+ width: 40px;
1188
+ height: 40px;
1189
+ border-radius: 8px;
1190
  display: flex;
1191
  align-items: center;
1192
  justify-content: center;
1193
+ box-shadow: 3px 3px 0 #1F2937;
1194
  transition: var(--transition);
1195
  }
1196
 
1197
  #aiChatClose:hover {
1198
+ background: #FACC15;
1199
+ transform: translate(-2px, -2px);
1200
+ box-shadow: 5px 5px 0 #1F2937;
1201
  }
1202
 
1203
  #aiChatMessages {
1204
  flex: 1;
1205
  overflow-y: auto;
1206
  padding: 20px;
1207
+ background: #FEF9C3;
1208
  }
1209
 
1210
  .chat-message {
 
1218
  }
1219
 
1220
  .chat-avatar {
1221
+ width: 40px;
1222
+ height: 40px;
1223
+ border-radius: 8px;
1224
+ border: 3px solid #1F2937;
1225
  display: flex;
1226
  justify-content: center;
1227
  align-items: center;
1228
  flex-shrink: 0;
1229
+ box-shadow: 2px 2px 0 #1F2937;
1230
  }
1231
 
1232
  .chat-message.user .chat-avatar {
1233
  margin-left: 10px;
1234
+ background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
1235
  color: white;
1236
  }
1237
 
1238
  .chat-message.ai .chat-avatar {
1239
  margin-right: 10px;
1240
+ background: linear-gradient(135deg, #10B981 0%, #059669 100%);
1241
  color: white;
1242
  }
1243
 
 
1246
  }
1247
 
1248
  .chat-content {
1249
+ padding: 14px 18px;
1250
+ border-radius: 12px;
1251
+ border: 3px solid #1F2937;
1252
  word-break: break-word;
1253
+ font-family: 'Comic Neue', cursive;
1254
  font-size: 14px;
1255
+ font-weight: 700;
1256
+ line-height: 1.6;
1257
+ box-shadow: 3px 3px 0 #1F2937;
1258
  }
1259
 
1260
  .chat-message.user .chat-content {
1261
+ background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
1262
  color: white;
1263
  border-bottom-right-radius: 4px;
1264
  }
1265
 
1266
  .chat-message.ai .chat-content {
1267
+ background: #FFF;
1268
+ color: #1F2937;
1269
  border-bottom-left-radius: 4px;
1270
  }
1271
 
1272
  .chat-time {
1273
+ font-size: 11px;
1274
+ color: #6B7280;
1275
+ margin-top: 6px;
1276
  text-align: right;
1277
+ font-weight: 700;
1278
  }
1279
 
1280
  .chat-message.ai .chat-time {
 
1284
  #aiChatForm {
1285
  display: flex;
1286
  padding: 15px 20px;
1287
+ border-top: 4px solid #1F2937;
1288
+ background: #FFF;
1289
+ gap: 10px;
1290
  }
1291
 
1292
  #aiChatInput {
1293
  flex: 1;
1294
+ padding: 14px 20px;
1295
+ border: 3px solid #1F2937;
1296
  border-radius: 25px;
1297
+ font-family: 'Comic Neue', cursive;
1298
  font-size: 14px;
1299
+ font-weight: 700;
1300
  outline: none;
1301
  transition: var(--transition);
1302
+ background: #FEF9C3;
1303
  }
1304
 
1305
  #aiChatInput:focus {
1306
+ border-color: #3B82F6;
1307
+ box-shadow: 3px 3px 0 #3B82F6;
1308
  }
1309
 
1310
  #aiChatSubmit {
1311
+ background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
1312
+ border: 3px solid #1F2937;
1313
  color: white;
1314
+ width: 50px;
1315
+ height: 50px;
1316
  border-radius: 50%;
 
1317
  display: flex;
1318
  justify-content: center;
1319
  align-items: center;
1320
  cursor: pointer;
1321
+ box-shadow: 3px 3px 0 #1F2937;
1322
  transition: var(--transition);
1323
  }
1324
 
1325
  #aiChatSubmit:hover {
1326
+ transform: translate(-2px, -2px);
1327
+ box-shadow: 5px 5px 0 #1F2937;
1328
+ }
1329
+
1330
+ #aiChatSubmit:active {
1331
+ transform: translate(2px, 2px);
1332
+ box-shadow: 1px 1px 0 #1F2937;
1333
  }
1334
 
1335
  #aiChatSubmit:disabled {
1336
+ background: #9CA3AF;
1337
  cursor: not-allowed;
1338
  transform: none;
1339
+ box-shadow: 3px 3px 0 #1F2937;
1340
  }
1341
 
1342
  .typing-indicator {
 
1347
 
1348
  .typing-indicator .chat-avatar {
1349
  margin-right: 10px;
1350
+ background: linear-gradient(135deg, #10B981 0%, #059669 100%);
1351
  color: white;
1352
  }
1353
 
1354
  .typing-indicator span {
1355
+ height: 10px;
1356
+ width: 10px;
1357
+ background: #10B981;
1358
  border-radius: 50%;
1359
  display: inline-block;
1360
+ margin-right: 5px;
1361
+ border: 2px solid #1F2937;
1362
  animation: typing 1s infinite;
1363
  }
1364
 
 
1366
  .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
1367
 
1368
  @keyframes typing {
1369
+ 0%, 100% { transform: translateY(0); }
1370
+ 50% { transform: translateY(-8px); }
1371
  }
1372
 
1373
  .error-container {
 
1376
  left: 50%;
1377
  transform: translate(-50%, -50%);
1378
  text-align: center;
1379
+ background: #FFF;
1380
+ border: 4px solid #1F2937;
1381
  padding: 40px;
1382
  border-radius: var(--radius-md);
1383
  box-shadow: var(--shadow-lg);
 
1385
  }
1386
 
1387
  .error-container i {
1388
+ font-size: 50px;
1389
+ color: #EF4444;
1390
  margin-bottom: 20px;
1391
+ text-shadow: 3px 3px 0 #1F2937;
1392
  }
1393
 
1394
  .error-container p {
1395
+ font-family: 'Comic Neue', cursive;
1396
  font-size: 16px;
1397
+ font-weight: 700;
1398
+ color: var(--text-dark);
1399
  margin-bottom: 20px;
1400
  }
1401
 
1402
  .error-container button {
1403
+ padding: 12px 30px;
1404
+ background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
1405
  color: white;
1406
+ border: 3px solid #1F2937;
1407
+ border-radius: 8px;
1408
  cursor: pointer;
1409
+ font-family: 'Bangers', cursive;
1410
+ font-size: 1.2rem;
1411
+ letter-spacing: 1px;
1412
+ box-shadow: 4px 4px 0 #1F2937;
1413
  transition: var(--transition);
1414
  }
1415
 
1416
  .error-container button:hover {
1417
+ transform: translate(-2px, -2px);
1418
+ box-shadow: 6px 6px 0 #1F2937;
1419
+ }
1420
+
1421
+ /* Footer - Comic Style */
1422
+ .footer-comic {
1423
+ position: fixed;
1424
+ bottom: 10px;
1425
+ right: 10px;
1426
+ text-align: center;
1427
+ padding: 10px 20px;
1428
+ background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
1429
+ border: 3px solid #1F2937;
1430
+ border-radius: 10px;
1431
+ box-shadow: 4px 4px 0 #1F2937;
1432
+ z-index: 100;
1433
+ }
1434
+
1435
+ .footer-comic p {
1436
+ font-family: 'Comic Neue', cursive;
1437
+ color: #FFF;
1438
+ margin: 3px 0;
1439
+ font-weight: 700;
1440
+ font-size: 0.85rem;
1441
+ }
1442
+
1443
+ .footer-comic a {
1444
+ color: #FACC15;
1445
+ text-decoration: none;
1446
+ font-weight: 700;
1447
+ }
1448
+
1449
+ .footer-comic a:hover {
1450
+ text-decoration: underline;
1451
+ }
1452
+
1453
+ /* Scrollbar - Comic Style */
1454
+ ::-webkit-scrollbar {
1455
+ width: 14px;
1456
+ height: 14px;
1457
+ }
1458
+
1459
+ ::-webkit-scrollbar-track {
1460
+ background: #FEF9C3;
1461
+ border: 2px solid #1F2937;
1462
+ }
1463
+
1464
+ ::-webkit-scrollbar-thumb {
1465
+ background: linear-gradient(135deg, #3B82F6, #8B5CF6);
1466
+ border: 2px solid #1F2937;
1467
+ border-radius: 7px;
1468
+ }
1469
+
1470
+ ::-webkit-scrollbar-thumb:hover {
1471
+ background: linear-gradient(135deg, #EF4444, #F97316);
1472
+ }
1473
+
1474
+ ::selection {
1475
+ background: #FACC15;
1476
+ color: #1F2937;
1477
  }
1478
 
1479
  @media (max-width: 768px) {
1480
+ .home-button-container {
1481
+ padding: 10px 15px;
1482
+ gap: 10px;
1483
+ flex-wrap: wrap;
1484
+ }
1485
+
1486
+ .home-button {
1487
+ font-size: 1.1rem;
1488
+ padding: 8px 18px;
1489
+ }
1490
+
1491
+ .url-display {
1492
+ font-size: 0.9rem;
1493
+ padding: 6px 12px;
1494
+ }
1495
+
1496
  .header-info {
1497
+ top: 80px;
1498
+ padding: 12px 20px;
1499
  max-width: 90%;
1500
  }
1501
 
1502
  .header-info .title {
1503
+ font-size: 1.5rem;
1504
  }
1505
 
1506
  .header-info .description {
1507
+ font-size: 0.8rem;
1508
  }
1509
 
1510
  .floating-ai {
1511
+ width: 55px;
1512
+ height: 55px;
1513
+ top: 15px;
1514
+ right: 15px;
1515
  }
1516
 
1517
  .floating-ai .icon {
1518
+ font-size: 22px;
1519
  }
1520
 
1521
  #aiChatContainer {
 
1524
 
1525
  #viewer {
1526
  width: 95%;
1527
+ height: 72vh;
1528
+ top: 60%;
1529
+ }
1530
+
1531
+ .footer-comic {
1532
+ display: none;
1533
  }
1534
  }
1535
  </style>
1536
  </head>
1537
  <body>
1538
+ <!-- HOME Button Container - Z-Image Style -->
1539
+ <div class="home-button-container">
1540
+ <a href="https://ginigen.ai" target="_blank" class="home-button">
1541
+ 🏠 HOME
1542
+ </a>
1543
+ <span class="url-display">🌐 ginigen.ai</span>
1544
+ </div>
1545
+
1546
+ <!-- Header Info - Comic Style -->
1547
  <div class="header-info">
1548
+ <div class="title">πŸ“š AI ν”Œλ¦½λΆ πŸ“š</div>
1549
+ <div class="description">λ‚˜λ§Œμ˜ PDF μ „μžμ±…μ„ λ”μš± κ°€μΉ˜μžˆκ²Œ! μž…μ²΄μ μΈ λΉ„μ£Όμ–Όκ³Ό AI챗봇을 톡해 μƒν˜Έ μΈν„°λ ‰ν‹°λΈŒλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€.</div>
1550
+ <div style="margin-top:10px">
1551
+ <span class="stats-badge">⚑ λΉ λ₯Έ λ‘œλ”©</span>
1552
+ <span class="stats-badge">πŸ€– AI 챗봇</span>
1553
+ <span class="stats-badge">πŸ“– 3D ν”Œλ¦½λΆ</span>
1554
+ </div>
1555
  </div>
1556
 
1557
+ <!-- Floating AI Button - Comic Style -->
1558
  <div id="aiButton" class="floating-ai">
1559
  <div class="icon"><i class="fas fa-robot"></i></div>
1560
+ <div class="ai-title">πŸ€– AI μ–΄μ‹œμŠ€ν„΄νŠΈ</div>
1561
  </div>
1562
 
1563
+ <!-- AI Chat Container -->
1564
  <div id="aiChatContainer">
1565
  <div id="aiChatHeader">
1566
  <h3><i class="fas fa-robot"></i> AI μ–΄μ‹œμŠ€ν„΄νŠΈ</h3>
 
1573
  </form>
1574
  </div>
1575
 
1576
+ <!-- PDF Viewer -->
1577
  <div id="viewer"></div>
1578
  <div id="loadingPages" class="loading-pages" style="display:none;">νŽ˜μ΄μ§€ λ‘œλ”© 쀑... <span id="loadingPagesCount">0%</span></div>
1579
 
1580
+ <!-- Footer - Comic Style -->
1581
+ <div class="footer-comic">
1582
+ <p style="font-family:'Bangers',cursive;font-size:1.1rem;letter-spacing:1px">πŸ“š AI FLIPBOOK πŸ“š</p>
1583
+ <p>Powered by VLM + 3D FlipBook</p>
1584
+ <p><a href="https://ginigen.ai" target="_blank">🏠 ginigen.ai</a></p>
1585
+ </div>
1586
+
1587
  <script>
1588
  let fb = null;
1589
  const viewer = document.getElementById('viewer');
 
1705
  if (statusData.status === 'analyzing') {
1706
  removeTypingIndicator();
1707
  const progress = statusData.progress || 0;
1708
+ addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ ν˜„μž¬ PDFλ₯Ό AIκ°€ λΆ„μ„ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. πŸ“Š<br><br>μ§„ν–‰λ₯ : <strong>${progress}%</strong><br><small style="color:#6B7280;">뢄석이 μ™„λ£Œλ˜λ©΄ μžλ™μœΌλ‘œ μ•Œλ €λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€.</small>`);
1709
  hasLoadedSummary = true;
1710
  isAiProcessing = false;
1711
 
 
1716
 
1717
  if (statusData.status === 'error') {
1718
  removeTypingIndicator();
1719
+ addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ PDF 뢄석 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. ⚠️<br><br><small style="color:#EF4444;">${statusData.error || 'μ•Œ 수 μ—†οΏ½οΏ½οΏ½ 였λ₯˜'}</small><br><br>νŽ˜μ΄μ§€λ₯Ό μƒˆλ‘œκ³ μΉ¨ν•˜κ±°λ‚˜ μž μ‹œ ν›„ λ‹€μ‹œ μ‹œλ„ν•΄μ£Όμ„Έμš”.`);
1720
  hasLoadedSummary = true;
1721
  isAiProcessing = false;
1722
  return;
 
1724
 
1725
  if (statusData.status === 'not_started') {
1726
  removeTypingIndicator();
1727
+ addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ PDF 뢄석이 아직 μ‹œμž‘λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. πŸ”„<br><br><small style="color:#6B7280;">μž μ‹œλ§Œ κΈ°λ‹€λ €μ£Όμ„Έμš”...</small>`);
1728
  hasLoadedSummary = true;
1729
  isAiProcessing = false;
1730
  startAnalysisPolling();
 
1739
 
1740
  if (data.summary) {
1741
  const pageInfo = data.analyzed_pages ? ` (${data.analyzed_pages}/${data.total_pages}νŽ˜μ΄μ§€ λΆ„μ„μ™„λ£Œ)` : '';
1742
+ addChatMessage(`μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ 이 PDF에 λŒ€ν•΄ 무엇이든 μ§ˆλ¬Έν•΄μ£Όμ„Έμš”.${pageInfo}<br><br><strong>πŸ“„ PDF μš”μ•½:</strong><br>${data.summary}`);
1743
  } else {
1744
+ addChatMessage("μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ PDF에 λŒ€ν•΄ μ§ˆλ¬Έν•΄μ£Όμ„Έμš”. μ΅œμ„ μ„ λ‹€ν•΄ λ‹΅λ³€ν•˜κ² μŠ΅λ‹ˆλ‹€.");
1745
  }
1746
  hasLoadedSummary = true;
1747
 
1748
  } catch (error) {
1749
  console.error("PDF μš”μ•½ λ‘œλ“œ 였λ₯˜:", error);
1750
  removeTypingIndicator();
1751
+ addChatMessage("μ•ˆλ…•ν•˜μ„Έμš”! πŸ’₯ PDF에 λŒ€ν•΄ μ§ˆλ¬Έν•΄μ£Όμ„Έμš”.");
1752
  hasLoadedSummary = true;
1753
  } finally {
1754
  isAiProcessing = false;
 
1895
 
1896
  let width, height;
1897
  if (aspectRatio > 1) {
1898
+ height = Math.min(windowHeight * 0.78, windowHeight - 150);
1899
  width = height * aspectRatio * 0.75;
1900
  if (width > windowWidth * 0.9) {
1901
  width = windowWidth * 0.9;
 
1904
  } else {
1905
  width = Math.min(windowWidth * 0.95, windowWidth - 20);
1906
  height = width / aspectRatio * 0.85;
1907
+ if (height > windowHeight * 0.72) {
1908
+ height = windowHeight * 0.72;
1909
  width = height * aspectRatio * 0.85;
1910
  }
1911
  }