:root {
	--primary:  #ff2d55;
	--secondary:  #fffbe7;
	--text:  #333;
	--btn-hover:  #ff5e89;
}

body{
	margin: 0;
	padding: 0;
	background: var(--secondary);
	font-family: 'Inter', 'Arial', sans-serif;
	color:  var(--text);
	min-height: 100vh;
}

.container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 2rem 1rem;
}

.logo .emoji {
	font-size: 4rem;
	animation: bounce 1s infinite alternate;
	display: block;
	margin-bottom: 1.5rem;
}

@keyframes bounce {
	to { transform: translateY(-12px); }
}

.subtitle {
	font-size: 1.1rem;
	color:  #555;
	margin-bottom: 2rem;
	text-align: center;
}

.main-btn {
	background: var(--primary);
	color:  white;
	font-size: 1.2rem;
	font-weight:  700;
	padding:  1rem 2.5rem;
	border:  none;
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(255,45,85,0.14);
	text-decoration: none;
	transition: background 0.2s, transform 0.15s;
	cursor: pointer;
	margin-top: 10px;
	display: inline-block;
}

.main-btn:hover,
.main-btn:active {
	background: : var(--btn-hover);
	transform: scale(1.04);
}

@media (min-width:  600px) {
	.container {
		padding: 3rem 0;
	}
	.title {
		font-size: 2.8rem;
	}
	.logo emoji {
		font-size: 5.5rem;
	}
}

.memes-list {
	width: 100%;
	max-width: 450px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.meme-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 4px 18px rgba(0,0,0,0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.2rem 1rem;
	transition: box-shadow 0.2s;
	width:  100%;
	height: 400px;
	perspective: 1000px;
	margin: 1rem;
}

.meme-card:hover {
	box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.meme-img {
	width: 100%;
	max-width: 380px;
	height: auto;
	border-radius: 12px;
	margin-bottom: 1rem;
	background: #eee;
}

.meme-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0.5rem 0;
	text-align:  center;
}

.meme-context {
	font-size: 0.98rem;
	color:  #444;
	text-align: center;
	margin-bottom: 1.1rem;
}

.fav-btn {
	background: var(--primary);
	color: white;
	font-size: 1rem;
	font-weight: 700;
	padding: 0.7rem 1.6rem;
	border: none;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(255,45,85,0.1);
	text-decoration: none;
	transition: background 0.2s transform 0.15s;
	cursor: pointer;
	margin-top: 0.2rem;
	display: inline-block;
}

.fav-btn: hover,
.fav-btn:active {
	background: var(--btn-hover);
	transform: scale(1.05);
}

.card-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition:  transform 0.6s cubic-bezier(.7,0,.3,1);
	transform-style:  preserve-3d;
}

.card-front, .card-back {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rbgba(0,0,0,.12);
}

.card-front {
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.card-back {
	background: #fafafa;
	transform:  rotateY(180deg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.meme-card.flipped .card-inner {
	transform: rotateY(180deg);
}

.whats-this-btn, .back-btn {
	margin-top: 1rem;
	padding:  0.5em 1em;
	broder:  none;
	border-radius: 6px;
	background: #5555fa;
	color:  #fff;
	cursor: pointer;
}

#about {
	margin: 10px;
}

.favorite-container {
	max-width: 400px;
	margin:  3rem auto;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 4px 16px rgba(60 60, 130, 0.09);
	padding:  2rem 2rem 1.5rem;
	text-align: center;
}

h1 {
	margin-top: 0;
	color: #333;
	font-size: 1.7rem;
	letter-spacing: 0.5px;
}

.selected-meme-card {
	margin:  1.2rem 0 2rem;
	display: flex;
	justify-content: center;
	align-items: center;
}

.selected-meme-card img {
	max-width: 100%;
	max-height: 230px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(60, 60, 130, 0.13);
	border:  1px solid #ececec;
}

.brand-form {
	display: flex;
	flex-direction: column;
	gap:  1rem;
}

.brand-form label {
	font-size: 1.02rem;
	color:  #555;
	text-align: left;
}

.brand-form input[type="text"] {
	padding:  0.7rem 1em;
	border:  1px solid #bfc6de;
	border-radius: 7px;
	font-size: 1.1em;
	outline: none;
	transition:  border 0.2s;
}

.brand-form button[type="submit"] {
	background: #4d60fa;
	color: #fff;
	broder:  none;
	border-radius: 7px;
	font-size: 1.1em;
	padding: 0.7em;
	cursor: pointer;
	transition: background 0.2s;
}

.brand-form button[type="submit"]:hover {
	background: #3240c9;
}