Opera8 commited on
Commit
fed0785
·
verified ·
1 Parent(s): 3c1a2de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +80 -16
app.py CHANGED
@@ -282,7 +282,7 @@ document.addEventListener('DOMContentLoaded', () => {
282
  forceLight();
283
  setInterval(forceLight, 1000);
284
 
285
- // 2. NEW GPU Quota Replacer (Complex UI)
286
  const observer = new MutationObserver((mutations) => {
287
  mutations.forEach((mutation) => {
288
  if (mutation.addedNodes.length) {
@@ -376,7 +376,7 @@ document.addEventListener('DOMContentLoaded', () => {
376
  </script>
377
  """
378
 
379
- # --- CSS Updated ---
380
  css_code = """
381
  <style>
382
  @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');
@@ -423,13 +423,13 @@ css_code = """
423
  text-align: right;
424
  background: var(--guide-bg);
425
  backdrop-filter: blur(10px);
426
- padding: 25px; /* Reduced padding for toast */
427
  border-radius: var(--radius-lg-guide);
428
  box-shadow: var(--shadow-xl);
429
  border: 1px solid var(--guide-border);
430
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
431
  width: 100%;
432
- max-width: 450px; /* Constrain width inside toast */
433
  position: relative;
434
  overflow: hidden;
435
  box-sizing: border-box;
@@ -460,18 +460,82 @@ css_code = """
460
  .summary-title { font-weight: 600; color: #2f5a33; font-size: 0.95rem; }
461
  .summary-text { color: #2f5a33; font-size: 0.85rem; line-height: 1.6; }
462
 
463
- .video-button-container { text-align: center; margin: 20px 0 10px 0; }
464
- .elegant-video-button { display: inline-flex; align-items: center; justify-content: center; padding: 7px 15px; background-color: #f0f2f5; color: var(--guide-accent); border: 1px solid #e2e8f0; text-decoration: none; border-radius: var(--radius-md-guide); font-weight: 600; font-size: 0.8rem; cursor: pointer; font-family: inherit; transition: all 0.3s ease; box-shadow: var(--shadow-sm); }
465
- .elegant-video-button:hover { background: var(--primary-gradient-guide); color: white; border-color: transparent; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3); }
466
- .elegant-video-button-icon { width: 16px; height: 16px; margin-left: 8px; fill: currentColor; }
467
-
468
- .guide-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
469
- .action-button { padding: 10px 15px; border: none; border-radius: var(--radius-md-guide); font-size: 0.9rem; font-weight: 600; cursor: pointer; flex: 1; transition: all 0.3s ease; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: inherit; }
470
- .action-button-icon { width: 18px; height: 18px; margin-right: 0; margin-left: 8px; }
471
- .back-button { background: white; color: var(--guide-text-body); border: 2px solid #e2e8f0; flex: 0.4; }
472
- .back-button:hover { background: #f7fafc; border-color: var(--guide-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
473
- .retry-button { background: var(--primary-gradient-guide); color: white; flex: 0.6; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
474
- .retry-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
 
476
  /* --- Main App CSS --- */
477
  body {
 
282
  forceLight();
283
  setInterval(forceLight, 1000);
284
 
285
+ // 2. NEW GPU Quota Replacer (Fixed Buttons)
286
  const observer = new MutationObserver((mutations) => {
287
  mutations.forEach((mutation) => {
288
  if (mutation.addedNodes.length) {
 
376
  </script>
377
  """
378
 
379
+ # --- CSS Updated for Beautiful Buttons ---
380
  css_code = """
381
  <style>
382
  @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');
 
423
  text-align: right;
424
  background: var(--guide-bg);
425
  backdrop-filter: blur(10px);
426
+ padding: 25px;
427
  border-radius: var(--radius-lg-guide);
428
  box-shadow: var(--shadow-xl);
429
  border: 1px solid var(--guide-border);
430
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
431
  width: 100%;
432
+ max-width: 450px;
433
  position: relative;
434
  overflow: hidden;
435
  box-sizing: border-box;
 
460
  .summary-title { font-weight: 600; color: #2f5a33; font-size: 0.95rem; }
461
  .summary-text { color: #2f5a33; font-size: 0.85rem; line-height: 1.6; }
462
 
463
+ /* Tutorial Button Styles */
464
+ .video-button-container { text-align: center; margin: 25px 0 15px 0; width: 100%; }
465
+ .elegant-video-button {
466
+ display: inline-flex !important;
467
+ align-items: center;
468
+ justify-content: center;
469
+ padding: 10px 20px !important;
470
+ background-color: #fff !important;
471
+ color: var(--guide-accent) !important;
472
+ border: 1px solid #e2e8f0 !important;
473
+ text-decoration: none;
474
+ border-radius: 50px !important; /* Capsule shape */
475
+ font-weight: 600 !important;
476
+ font-size: 0.9rem !important;
477
+ cursor: pointer !important;
478
+ font-family: inherit;
479
+ transition: all 0.3s ease !important;
480
+ box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
481
+ width: auto !important;
482
+ }
483
+ .elegant-video-button:hover {
484
+ background: var(--primary-gradient-guide) !important;
485
+ color: white !important;
486
+ border-color: transparent !important;
487
+ transform: translateY(-2px);
488
+ box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3) !important;
489
+ }
490
+ .elegant-video-button-icon { width: 18px; height: 18px; margin-left: 8px; fill: currentColor; }
491
+
492
+ /* Action Buttons Styles (Back & Retry) */
493
+ .guide-actions {
494
+ display: flex !important;
495
+ gap: 12px !important;
496
+ margin-top: 20px;
497
+ padding-top: 20px;
498
+ border-top: 1px solid #e2e8f0;
499
+ width: 100% !important;
500
+ }
501
+ .action-button {
502
+ padding: 12px 15px !important;
503
+ border: none !important;
504
+ border-radius: 12px !important;
505
+ font-size: 0.95rem !important;
506
+ font-weight: 600 !important;
507
+ cursor: pointer !important;
508
+ flex: 1 !important;
509
+ transition: all 0.3s ease !important;
510
+ display: flex !important;
511
+ align-items: center;
512
+ justify-content: center;
513
+ font-family: inherit;
514
+ height: 48px !important;
515
+ }
516
+ .action-button-icon { width: 20px; height: 20px; margin-right: 0; margin-left: 8px; }
517
+
518
+ .back-button {
519
+ background: white !important;
520
+ color: var(--guide-text-body) !important;
521
+ border: 2px solid #e2e8f0 !important;
522
+ }
523
+ .back-button:hover {
524
+ background: #f7fafc !important;
525
+ border-color: var(--guide-accent) !important;
526
+ transform: translateY(-2px);
527
+ box-shadow: var(--shadow-md) !important;
528
+ }
529
+
530
+ .retry-button {
531
+ background: var(--primary-gradient-guide) !important;
532
+ color: white !important;
533
+ box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
534
+ }
535
+ .retry-button:hover {
536
+ transform: translateY(-2px);
537
+ box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
538
+ }
539
 
540
  /* --- Main App CSS --- */
541
  body {