CoderHassan commited on
Commit
46cf077
·
verified ·
1 Parent(s): 3ecfa56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -18
app.py CHANGED
@@ -8,19 +8,22 @@ st.set_page_config(
8
  page_icon="🌡️",
9
  layout="centered"
10
  )
11
-
 
 
12
  # -----------------------------
13
  # NEON + ANIMATED UI (ONLY ADDITION)
14
  # -----------------------------
15
  st.markdown("""
16
  <style>
17
 
18
- /* Animated Background */
19
  .stApp {
20
  background: linear-gradient(-45deg, #0f172a, #1e293b, #0b1220, #1e3a8a);
21
  background-size: 400% 400%;
22
  animation: gradientMove 10s ease infinite;
23
  color: white;
 
24
  }
25
 
26
  @keyframes gradientMove {
@@ -29,7 +32,7 @@ st.markdown("""
29
  100% {background-position: 0% 50%;}
30
  }
31
 
32
- /* Title Glow */
33
  h1 {
34
  text-align: center;
35
  color: white;
@@ -39,30 +42,18 @@ h1 {
39
  0 0 40px #3b82f6;
40
  }
41
 
42
- /* 🔥 SEPARATE COMPONENT GLOW BOXES */
43
  div[data-testid="stNumberInput"],
44
- div[data-testid="stRadio"],
45
- div[data-testid="stSelectbox"],
46
- div[data-testid="stTextInput"] {
47
  background: rgba(255,255,255,0.06);
48
  padding: 15px;
49
  border-radius: 15px;
50
  margin-bottom: 15px;
51
  backdrop-filter: blur(10px);
52
  box-shadow: 0 0 15px rgba(59,130,246,0.25);
53
- transition: 0.3s ease;
54
- }
55
-
56
- /* Hover glow per component */
57
- div[data-testid="stNumberInput"]:hover,
58
- div[data-testid="stRadio"]:hover,
59
- div[data-testid="stSelectbox"]:hover,
60
- div[data-testid="stTextInput"]:hover {
61
- box-shadow: 0 0 25px rgba(56,189,248,0.6);
62
- transform: scale(1.01);
63
  }
64
 
65
- /* Button Styling */
66
  .stButton>button {
67
  width: 100%;
68
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
@@ -80,6 +71,24 @@ div[data-testid="stTextInput"]:hover {
80
  box-shadow: 0 0 25px rgba(59,130,246,0.9);
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  </style>
84
  """, unsafe_allow_html=True)
85
 
 
8
  page_icon="🌡️",
9
  layout="centered"
10
  )
11
+ .stApp {
12
+ text-align: center;
13
+ }
14
  # -----------------------------
15
  # NEON + ANIMATED UI (ONLY ADDITION)
16
  # -----------------------------
17
  st.markdown("""
18
  <style>
19
 
20
+ /* ---------------- BACKGROUND ---------------- */
21
  .stApp {
22
  background: linear-gradient(-45deg, #0f172a, #1e293b, #0b1220, #1e3a8a);
23
  background-size: 400% 400%;
24
  animation: gradientMove 10s ease infinite;
25
  color: white;
26
+ text-align: center; /* ✅ CENTER EVERYTHING */
27
  }
28
 
29
  @keyframes gradientMove {
 
32
  100% {background-position: 0% 50%;}
33
  }
34
 
35
+ /* ---------------- TITLE ---------------- */
36
  h1 {
37
  text-align: center;
38
  color: white;
 
42
  0 0 40px #3b82f6;
43
  }
44
 
45
+ /* ---------------- INPUT BOXES ---------------- */
46
  div[data-testid="stNumberInput"],
47
+ div[data-testid="stRadio"] {
 
 
48
  background: rgba(255,255,255,0.06);
49
  padding: 15px;
50
  border-radius: 15px;
51
  margin-bottom: 15px;
52
  backdrop-filter: blur(10px);
53
  box-shadow: 0 0 15px rgba(59,130,246,0.25);
 
 
 
 
 
 
 
 
 
 
54
  }
55
 
56
+ /* ---------------- BUTTON ---------------- */
57
  .stButton>button {
58
  width: 100%;
59
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
 
71
  box-shadow: 0 0 25px rgba(59,130,246,0.9);
72
  }
73
 
74
+ /* ---------------- SUCCESS / OUTPUT BOX ---------------- */
75
+ div[data-testid="stSuccess"] {
76
+ background: rgba(0, 255, 120, 0.08); /* light green glow */
77
+ border: 2px solid white; /* white border */
78
+ border-radius: 15px;
79
+ padding: 20px;
80
+ color: #00ff99 !important; /* GREEN TEXT */
81
+ font-size: 20px;
82
+ font-weight: bold;
83
+ box-shadow: 0 0 20px rgba(255,255,255,0.6);
84
+ text-align: center;
85
+ }
86
+
87
+ /* Make success text green */
88
+ div[data-testid="stSuccess"] * {
89
+ color: #00ff99 !important;
90
+ }
91
+
92
  </style>
93
  """, unsafe_allow_html=True)
94