5240-indiv-assignment / styles.css
slliac's picture
Update styles.css
a7d4d98 verified
raw
history blame
8.72 kB
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+HK:wght@400;500;700&display=swap');
.banner-container {
max-width: 100%;
margin: 20px auto;
overflow: hidden;
font-family: 'Trebuchet MS', 'Arial', sans-serif;
}
.magician-banner {
background: linear-gradient(135deg, #1a2a6c 0%, #2a4065 35%, #4776b8 70%, #1a2a6c 100%);
background-size: 200% 200%;
border-radius: 12px;
padding: 25px 20px;
box-shadow: 0 10px 30px rgba(0,0,0,0.25);
text-align: center;
position: relative;
overflow: hidden;
animation: gradientShift 8s infinite linear;
border: 3px solid #6991c7;
}
.magician-banner::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image:
radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 1px, transparent 2px),
radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1) 1px, transparent 2px),
radial-gradient(circle at 50% 40%, rgba(255,255,255,0.1) 1px, transparent 2px),
radial-gradient(circle at 70% 80%, rgba(255,255,255,0.1) 1px, transparent 2px),
radial-gradient(circle at 90% 10%, rgba(255,255,255,0.1) 1px, transparent 2px);
background-size: 200px 200px;
z-index: 1;
}
.title {
color: #fff;
font-size: 2.5rem;
font-weight: bold;
text-shadow: 0 0 10px #00c6ff,
0 0 20px #00c6ff,
0 0 30px #00c6ff;
margin: 0;
padding: 10px;
position: relative;
z-index: 2;
letter-spacing: 1px;
}
.magic-elements {
position: absolute;
font-size: 1.8rem;
z-index: 2;
}
.wand-left {
top: 50%;
left: 15px;
transform: translateY(-50%) rotate(-30deg);
font-size: 2.2rem;
animation: wandGlow 3s infinite alternate;
}
.wand-right {
top: 50%;
right: 15px;
transform: translateY(-50%) rotate(30deg);
font-size: 2.2rem;
animation: wandGlow 3s infinite alternate-reverse;
}
.magic-hat {
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
font-size: 2.5rem;
animation: floatHat 4s ease-in-out infinite;
text-shadow: 0 0 5px #00c6ff;
z-index: 3;
}
.sparkle {
position: absolute;
opacity: 0;
font-size: 1.2rem;
animation: sparkleEffect 4s infinite;
color: white;
text-shadow: 0 0 8px #fcf403;
z-index: 2;
}
.spark1 { top: 20%; left: 25%; animation-delay: 0s; }
.spark2 { top: 25%; left: 75%; animation-delay: 0.7s; }
.spark3 { top: 65%; left: 20%; animation-delay: 1.4s; }
.spark4 { top: 70%; left: 80%; animation-delay: 2.1s; }
.spark5 { top: 40%; left: 50%; animation-delay: 2.8s; }
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
@keyframes wandGlow {
0% { text-shadow: 0 0 5px #00c6ff, 0 0 10px #00c6ff; }
100% { text-shadow: 0 0 10px #00c6ff, 0 0 20px #00c6ff, 0 0 30px #00c6ff; }
}
@keyframes floatHat {
0%, 100% { transform: translateX(-50%) translateY(0); }
50% { transform: translateX(-50%) translateY(-10px); }
}
@keyframes sparkleEffect {
0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
20% { opacity: 1; transform: scale(1.2) rotate(45deg); }
40% { opacity: 0; transform: scale(0.5) rotate(90deg); }
100% { opacity: 0; }
}
@media (max-width: 600px) {
.title {
font-size: 1.8rem;
}
.wand-left, .wand-right {
font-size: 1.8rem;
}
.magic-hat {
font-size: 2rem;
}
}
:root {
--primary-color: #6C63FF;
--secondary-color: #41B883;
--accent-color: #FF6B6B;
--background-light: #F7F9FC;
--text-dark: #2E3A59;
--shadow: 0 10px 20px rgba(0,0,0,0.08);
--border-radius: 16px;
}
.stApp {
background: linear-gradient(135deg, #F4F9FF, #EEFAFF);
font-family: 'Noto Sans HK', sans-serif;
color: var(--text-dark);
}
.main .block-container {
max-width: 1000px;
padding-top: 2rem;
padding-bottom: 2rem;
}
/* Modern headers */
h1, h2, h3 {
font-family: 'Noto Sans HK', sans-serif;
font-weight: 700;
color: var(--primary-color);
}
h1 {
font-size: 2.5rem;
text-align: center;
margin-bottom: 0;
}
h2 {
font-size: 1.8rem;
margin-bottom: 1rem;
}
h3 {
font-size: 1.4rem;
margin-bottom: 0.8rem;
}
/* Subtitle */
.subtitle {
text-align: center;
color: #6B7897;
font-size: 1.2rem;
margin-bottom: 2rem;
}
/* Card containers */
.stCard {
background: white;
border-radius: var(--border-radius);
padding: 1.5rem;
box-shadow: var(--shadow);
margin-bottom: 1.5rem;
}
/* Accent borders for stages */
.css-nahz7x, .css-ocqkz7, .css-4z1n4l {
border-left: it 5px solid var(--primary-color) !important;
}
.css-1r6slb0, .css-1ubpcwi {
border-left: 5px solid var(--secondary-color) !important;
}
.css-pkbazv, .css-5rimss {
border-left: 5px solid var(--accent-color) !important;
}
/* Custom file uploader */
.stFileUploader > div > div {
background: var(--background-light);
border: 2px dashed #D0D8E6;
border-radius: 12px;
padding: 20px;
transition: all 0.3s ease;
}
.stFileUploader > div > div:hover {
border-color: var(--primary-color);
}
/* Uploaded image styling */
.stImage img {
border-radius: 12px;
box-shadow: var(--shadow);
}
/* Stage icons */
.stage-icon {
font-size: 1.6rem;
margin-right: 10px;
vertical-align: middle;
}
/* Response styling */
.stText {
font-size: 1.1rem;
line-height: 1.7;
background: var(--background-light);
padding: 1rem;
border-radius: 12px;
border-left: 4px solid var(--secondary-color);
margin: 1rem 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
/* Button styling */
.stButton > button {
background: var(--secondary-color) !important;
color: white !important;
border: none !important;
border-radius: 50px !important;
padding: 0.6rem 1.5rem !important;
font-size: 1.1rem !important;
font-weight: 600 !important;
font-family: 'Noto Sans HK', sans-serif !important;
transition: all 0.3s ease !important;
box-shadow: 0 5px 15px rgba(65, 184, 131, 0.3) !important;
}
.stButton > button:hover {
background: #37A574 !important;
transform: translateY(-3px) !important;
box-shadow: 0 8px 20px rgba(65, 184, 131, 0.4) !important;
}
.stButton > button:active {
transform: translateY(0) !important;
}
/* Audio player styling */
audio {
width: 100%;
border-radius: 50px;
height: 40px;
}
/* Emoji animation */
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-15px); }
}
.emoji {
font-size: 1.8rem;
display: inline-block;
animation: bounce 2s infinite;
margin: 0 8px;
}
.emoji:nth-child(2) {
animation-delay: 0.2s;
}
.emoji:nth-child(3) {
animation-delay: 0.4s;
}
.emoji:nth-child(4) {
animation-delay: 0.6s;
}
/* Welcome message */
.welcome-message {
text-align: center;
padding: 3rem 1.5rem;
}
.welcome-icon {
font-size: 4rem;
margin-bottom: 1rem;
}
/* Audio player container */
.audio-container {
background: white;
padding: 1rem;
border-radius: 12px;
margin-bottom: 1rem;
box-shadow: var(--shadow);
}
.audio-title {
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--primary-color);
}