Skip to content

Commit 602e402

Browse files
Merge pull request #691 from Mudita-Singh/issue/ui-modal-card-layout-fix
Fix UI/Layout Inconsistencies Across Project Cards and Modal Rendering (#595)
2 parents d4f0c26 + 7f5ebd6 commit 602e402

3 files changed

Lines changed: 471 additions & 220 deletions

File tree

web-app/css/styles.css

Lines changed: 253 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,10 @@ body {
18271827
color: #999fee;
18281828
}
18291829

1830+
.game-icon-blackjack {
1831+
color: #8b5cf6;
1832+
}
1833+
18301834
.game-icon-dice {
18311835
color: #e04f4f;
18321836
}
@@ -3015,6 +3019,120 @@ body {
30153019
}
30163020
}
30173021

3022+
/* ==========================================================================
3023+
CARD AND MODAL LAYOUT STANDARDIZATION
3024+
========================================================================== */
3025+
3026+
.projects-grid {
3027+
display: grid;
3028+
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
3029+
gap: 1.2rem;
3030+
margin-top: 2rem;
3031+
align-items: stretch;
3032+
}
3033+
3034+
.project-card {
3035+
min-height: 240px;
3036+
display: flex;
3037+
flex-direction: column;
3038+
justify-content: space-between;
3039+
align-items: stretch;
3040+
padding: 1.75rem 1.5rem 1.5rem;
3041+
border-radius: 28px;
3042+
background: var(--surface-color);
3043+
border: 1px solid var(--accent-border);
3044+
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
3045+
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
3046+
}
3047+
3048+
.project-card h3 {
3049+
margin-bottom: 0.8rem;
3050+
font-size: 1.15rem;
3051+
line-height: 1.35;
3052+
color: var(--text-color);
3053+
}
3054+
3055+
.project-card p {
3056+
margin-bottom: 1rem;
3057+
color: var(--text-secondary);
3058+
font-size: 0.95rem;
3059+
line-height: 1.65;
3060+
flex: 1 1 auto;
3061+
}
3062+
3063+
.project-card .btn-play {
3064+
margin-top: auto;
3065+
align-self: flex-start;
3066+
}
3067+
3068+
.card-icon {
3069+
width: 72px;
3070+
height: 72px;
3071+
display: grid;
3072+
place-items: center;
3073+
border-radius: 22px;
3074+
background: var(--accent-soft);
3075+
color: var(--accent-color);
3076+
margin-bottom: 1.2rem;
3077+
font-size: 2rem;
3078+
flex-shrink: 0;
3079+
}
3080+
3081+
.modal-content {
3082+
width: min(100%, 900px);
3083+
max-width: 900px;
3084+
min-width: 320px;
3085+
max-height: 92vh;
3086+
overflow-y: auto;
3087+
overflow-x: hidden;
3088+
padding: 2rem;
3089+
border-radius: 20px;
3090+
box-shadow: var(--shadow-modal);
3091+
background: var(--surface-color);
3092+
border: 1px solid var(--border-color);
3093+
}
3094+
3095+
#modalBody {
3096+
width: 100%;
3097+
display: flex;
3098+
flex-direction: column;
3099+
gap: 1rem;
3100+
align-items: stretch;
3101+
}
3102+
3103+
#modalBody > * {
3104+
width: 100%;
3105+
max-width: 100%;
3106+
}
3107+
3108+
.modal-close {
3109+
z-index: 2100;
3110+
}
3111+
3112+
@media (max-width: 768px) {
3113+
.modal-content {
3114+
width: min(100%, 92vw);
3115+
padding: 1.5rem;
3116+
max-height: 90vh;
3117+
}
3118+
3119+
.project-card {
3120+
min-height: auto;
3121+
padding: 1.5rem 1.25rem;
3122+
}
3123+
}
3124+
3125+
@media (max-width: 576px) {
3126+
.projects-grid {
3127+
grid-template-columns: 1fr;
3128+
gap: 1rem;
3129+
}
3130+
3131+
.project-card {
3132+
padding: 1.25rem;
3133+
}
3134+
}
3135+
30183136
/* ==========================================================================
30193137
ARCADE REDESIGN OVERRIDES
30203138
========================================================================== */
@@ -4333,6 +4451,8 @@ html[data-theme="dark"] body {
43334451
.btn-play {
43344452
transform: none !important;
43354453
}
4454+
}
4455+
43364456
/* Fix card content alignment */
43374457
.project-card {
43384458
text-align: left;
@@ -4359,4 +4479,136 @@ html[data-theme="dark"] body {
43594479
padding: 1rem;
43604480
}
43614481
}
4362-
}
4482+
4483+
/* ==========================================================================
4484+
FINAL CARD + MODAL CONSISTENCY OVERRIDES
4485+
This section is intentionally appended at the end to override earlier
4486+
duplicate card/modal definitions and enforce consistent spacing, sizing,
4487+
and responsive behavior across all project pages.
4488+
========================================================================== */
4489+
4490+
.projects-grid {
4491+
display: grid !important;
4492+
grid-template-columns: repeat(auto-fit, minmax(260px, 360px)) !important;
4493+
justify-content: center !important;
4494+
gap: 1.2rem !important;
4495+
margin: 0 auto 2rem !important;
4496+
align-items: stretch !important;
4497+
}
4498+
4499+
.projects-grid > .project-card {
4500+
justify-self: center !important;
4501+
width: 100% !important;
4502+
max-width: 360px !important;
4503+
}
4504+
4505+
.project-card {
4506+
min-height: 240px !important;
4507+
display: flex;
4508+
flex-direction: column !important;
4509+
justify-content: flex-start !important;
4510+
align-items: flex-start !important;
4511+
padding: 1.75rem 1.5rem 1.5rem !important;
4512+
border-radius: 28px !important;
4513+
background: var(--surface-color) !important;
4514+
border: 1px solid var(--accent-border) !important;
4515+
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08) !important;
4516+
transition: transform 0.2s ease !important;
4517+
margin: 0 auto !important;
4518+
font-size: 0.95rem !important;
4519+
line-height: 1.6 !important;
4520+
}
4521+
4522+
.project-card .btn-play {
4523+
margin-top: 1rem !important;
4524+
align-self: flex-start !important;
4525+
}
4526+
4527+
.card-icon {
4528+
width: 72px !important;
4529+
height: 72px !important;
4530+
display: grid !important;
4531+
place-items: center !important;
4532+
border-radius: 22px !important;
4533+
background: var(--accent-soft) !important;
4534+
color: var(--accent-color) !important;
4535+
margin: 0 auto 1.2rem !important;
4536+
font-size: 2rem !important;
4537+
}
4538+
4539+
.modal {
4540+
display: none !important;
4541+
position: fixed !important;
4542+
top: 0 !important;
4543+
left: 0 !important;
4544+
width: 100% !important;
4545+
height: 100% !important;
4546+
background: var(--overlay-color) !important;
4547+
backdrop-filter: blur(6px) !important;
4548+
-webkit-backdrop-filter: blur(6px) !important;
4549+
z-index: 2000 !important;
4550+
animation: fadeIn 0.3s ease !important;
4551+
}
4552+
4553+
.modal.active {
4554+
display: flex !important;
4555+
align-items: center !important;
4556+
justify-content: center !important;
4557+
}
4558+
4559+
.modal-content {
4560+
width: min(100%, 900px) !important;
4561+
max-width: 900px !important;
4562+
min-width: 320px !important;
4563+
max-height: 92vh !important;
4564+
overflow-y: auto !important;
4565+
overflow-x: hidden !important;
4566+
padding: 2rem !important;
4567+
border-radius: 20px !important;
4568+
box-shadow: var(--shadow-modal) !important;
4569+
background: var(--surface-color) !important;
4570+
border: 1px solid var(--border-color) !important;
4571+
margin: auto !important;
4572+
}
4573+
4574+
#modalBody {
4575+
width: 100% !important;
4576+
display: flex !important;
4577+
flex-direction: column !important;
4578+
gap: 1rem !important;
4579+
align-items: stretch !important;
4580+
}
4581+
4582+
#modalBody > * {
4583+
width: 100% !important;
4584+
max-width: 100% !important;
4585+
}
4586+
4587+
.modal-close {
4588+
z-index: 2100 !important;
4589+
}
4590+
4591+
@media (max-width: 768px) {
4592+
.modal-content {
4593+
width: min(100%, 92vw) !important;
4594+
padding: 1.5rem !important;
4595+
max-height: 90vh !important;
4596+
}
4597+
4598+
.project-card {
4599+
min-height: auto !important;
4600+
padding: 1.5rem 1.25rem !important;
4601+
}
4602+
}
4603+
4604+
@media (max-width: 576px) {
4605+
.projects-grid {
4606+
grid-template-columns: 1fr !important;
4607+
gap: 1rem !important;
4608+
}
4609+
4610+
.project-card {
4611+
padding: 1.25rem !important;
4612+
min-height: auto !important;
4613+
}
4614+
}

0 commit comments

Comments
 (0)