Files
Mathieu Moran 91bcaea90a fixed match modal centering on iphone
prevented body scroll when modal shows

viewport units and mobile responsive fixes
overflow hidden on body/html when match popup active
mobile media queries for smaller screens

terry davis would be proud of this viewport handling
2025-12-28 04:47:06 -05:00

509 lines
8.6 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
overflow-x: hidden;
}
html {
overflow-x: hidden;
}
.app-container {
width: 100%;
max-width: 400px;
position: relative;
}
header {
text-align: center;
color: white;
margin-bottom: 20px;
}
header h1 {
font-size: 2.5em;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.subtitle {
font-size: 0.9em;
opacity: 0.9;
}
.card-container {
position: relative;
height: 600px;
margin-bottom: 20px;
}
.background-image-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 75%;
max-width: 300px;
z-index: 0;
overflow: hidden;
border-radius: 10px;
pointer-events: none;
}
.background-image {
width: 100%;
height: auto;
display: block;
opacity: 0;
transition: opacity 0.4s ease-out;
}
.card {
position: absolute;
width: 100%;
height: 100%;
background: white;
border-radius: 20px;
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
overflow: hidden;
cursor: grab;
user-select: none;
transition: transform 0.4s ease-out, opacity 0.4s ease-out;
opacity: 1;
z-index: 1;
}
.card:active {
cursor: grabbing;
}
.card-image-container {
width: 100%;
height: 65%;
position: relative;
overflow: hidden;
background: #f0f0f0;
}
.card-image-container img {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
}
.card-overlay.active {
opacity: 1;
}
.like-badge, .nope-badge {
position: absolute;
top: 50px;
padding: 10px 30px;
border: 4px solid;
border-radius: 10px;
font-size: 2em;
font-weight: bold;
transform: rotate(-20deg);
text-transform: uppercase;
letter-spacing: 2px;
}
.like-badge {
right: 20px;
color: #4ade80;
border-color: #4ade80;
background: rgba(74, 222, 128, 0.1);
}
.nope-badge {
left: 20px;
color: #f87171;
border-color: #f87171;
background: rgba(248, 113, 113, 0.1);
}
.card-info {
padding: 20px;
height: 35%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.card-info h2 {
font-size: 1.8em;
color: #333;
margin-bottom: 10px;
}
.card-info p {
color: #666;
font-size: 1em;
line-height: 1.5;
margin-bottom: 15px;
}
.brick-stats {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.brick-stats span {
background: #f0f0f0;
padding: 5px 15px;
border-radius: 20px;
font-size: 0.9em;
color: #555;
}
.actions {
display: flex;
justify-content: center;
gap: 30px;
margin-bottom: 20px;
}
.action-btn {
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
font-size: 1.5em;
cursor: pointer;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.action-btn:active {
transform: scale(0.9);
}
.nope-btn {
background: white;
color: #f87171;
}
.nope-btn:hover {
background: #fee2e2;
box-shadow: 0 6px 20px rgba(248, 113, 113, 0.4);
}
.like-btn {
background: white;
color: #4ade80;
}
.like-btn:hover {
background: #dcfce7;
box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}
.stats {
display: flex;
justify-content: space-around;
background: rgba(255, 255, 255, 0.2);
padding: 15px;
border-radius: 15px;
color: white;
backdrop-filter: blur(10px);
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
}
.stat-label {
font-size: 0.9em;
opacity: 0.9;
}
.stat-value {
font-size: 1.5em;
font-weight: bold;
}
.restart-btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 12px 30px;
border-radius: 25px;
font-size: 1em;
cursor: pointer;
font-weight: bold;
transition: transform 0.2s;
}
.restart-btn:hover {
transform: scale(1.05);
}
.end-screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
border-radius: 20px;
display: none;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 40px;
text-align: center;
z-index: 100;
overflow-y: auto;
}
.end-screen.show {
display: flex;
}
.match-popup {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
min-height: 100vh;
background: rgba(0, 0, 0, 0.7);
display: none;
justify-content: center;
align-items: center;
z-index: 1000;
transition: opacity 0.3s ease;
opacity: 0;
padding: 20px;
box-sizing: border-box;
overflow: hidden;
-webkit-overflow-scrolling: touch;
}
.match-popup.show {
display: flex;
opacity: 1;
}
.match-content {
background: white;
padding: 40px;
border-radius: 20px;
text-align: center;
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
animation: scaleIn 0.3s ease, scaleOut 0.3s ease 1.7s;
max-width: 400px;
width: 100%;
box-sizing: border-box;
margin: auto;
position: relative;
}
@keyframes scaleIn {
from {
transform: scale(0.8);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
@keyframes scaleOut {
from {
transform: scale(1);
opacity: 1;
}
to {
transform: scale(0.8);
opacity: 0;
}
}
.match-content h2 {
font-size: 2em;
color: #667eea;
margin-bottom: 25px;
}
.match-profiles {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
margin-bottom: 25px;
}
.profile-picture {
width: 120px;
height: 120px;
border-radius: 50%;
overflow: hidden;
border: 4px solid #667eea;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
animation: profilePop 0.5s ease 0.2s both;
}
.profile-picture.left-profile {
animation-delay: 0.2s;
}
.profile-picture.right-profile {
animation-delay: 0.3s;
}
@keyframes profilePop {
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
.profile-picture img {
width: 100%;
height: 100%;
object-fit: cover;
}
.match-content p {
font-size: 1.2em;
color: #666;
}
/* Mobile fixes for match popup */
@media screen and (max-width: 480px) {
.match-popup {
padding: 10px;
}
.match-content {
padding: 30px 20px;
max-width: calc(100% - 20px);
}
.match-content h2 {
font-size: 1.5em;
margin-bottom: 20px;
}
.match-profiles {
gap: 15px;
margin-bottom: 20px;
}
.profile-picture {
width: 100px;
height: 100px;
}
.match-content p {
font-size: 1em;
}
}
.end-screen h2 {
font-size: 2em;
color: #333;
margin-bottom: 20px;
}
.end-screen p {
font-size: 1.2em;
color: #666;
margin-bottom: 30px;
}
#finalLikedCount {
font-weight: bold;
color: #667eea;
font-size: 1.5em;
}
.video-container {
width: 100%;
max-width: 560px;
margin: 20px 0 30px 0;
position: relative;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
overflow: hidden;
}
.video-link-container {
display: block;
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
overflow: hidden;
cursor: pointer;
transition: transform 0.2s;
}
.video-link-container:hover {
transform: scale(1.02);
}
.video-thumbnail {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 68px;
height: 48px;
background: rgba(0,0,0,0.8);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s, background 0.2s;
}
.video-link-container:hover .play-button {
transform: translate(-50%, -50%) scale(1.1);
background: rgba(255,0,0,0.9);
}