/* Your Fav Movie Core — front-end widget styles (theme-agnostic). */

.yfm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 20px;
}
.yfm-movie-grid .yfm-card {
	display: flex;
	flex-direction: column;
	background: var(--yfm-card-bg, #fff);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.yfm-movie-grid .yfm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}
.yfm-card__media {
	position: relative;
	display: block;
	aspect-ratio: 2 / 3;
	background: linear-gradient(135deg, #1f2440, #3a2150);
	overflow: hidden;
}
.yfm-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.yfm-card__noposter {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 16px;
	color: #fff;
	font-weight: 600;
	text-align: center;
}
.yfm-card__rank {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	padding: 3px 9px;
	border-radius: 999px;
}
.yfm-card__badge {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 999px;
	color: #1a1207;
}
.yfm-card__badge--featured { background: #ffcf4d; }
.yfm-card__badge--gem { background: #6ee7b7; }
.yfm-card__body { padding: 12px 14px 16px; }
.yfm-card__title {
	margin: 0 0 6px;
	font-size: 1rem;
	line-height: 1.3;
}
.yfm-card__title a { text-decoration: none; color: inherit; }
.yfm-card__meta {
	display: flex;
	gap: 8px;
	font-size: 0.8rem;
	opacity: 0.7;
	margin-bottom: 8px;
}
.yfm-card__rating { font-size: 0.9rem; }
.yfm-card__score { font-weight: 800; font-size: 1.1rem; color: var(--yfm-accent, #e0245e); }
.yfm-card__scoremax, .yfm-card__votes { opacity: 0.6; }

/* Section title */
.yfm-section__title { margin: 0 0 18px; font-size: 1.6rem; }

/* Empty + notices */
.yfm-empty { padding: 24px; text-align: center; opacity: 0.7; }
.yfm-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.yfm-notice--success { background: #e7f7ef; color: #06633d; }
.yfm-notice--error { background: #fdecec; color: #a51212; }

/* Submission form */
.yfm-submit-form { max-width: 640px; }
.yfm-field { margin-bottom: 16px; }
.yfm-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.yfm-field input[type="text"],
.yfm-field input[type="url"],
.yfm-field input[type="search"],
.yfm-field select,
.yfm-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d7d7e0;
	border-radius: 10px;
	font: inherit;
	box-sizing: border-box;
}
.yfm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.yfm-req { color: #e0245e; }

/* Buttons */
.yfm-btn {
	display: inline-block;
	padding: 11px 20px;
	border: none;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
	background: #2a2f45;
	color: #fff;
	font: inherit;
	font-weight: 700;
}
.yfm-btn--primary { background: var(--yfm-accent, #e0245e); }
.yfm-btn:hover { opacity: 0.92; }

/* Search */
.yfm-search { display: flex; gap: 8px; max-width: 560px; }
.yfm-search__field {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #d7d7e0;
	border-radius: 999px;
	font: inherit;
}
.yfm-search__submit {
	padding: 12px 22px;
	border: none;
	border-radius: 999px;
	background: var(--yfm-accent, #e0245e);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

/* Categories */
.yfm-cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.yfm-cat-list__item a {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 8px 14px;
	background: #f1f1f6;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
}
.yfm-cat-list__item a:hover { background: var(--yfm-accent, #e0245e); color: #fff; }
.yfm-cat-list__count { opacity: 0.6; font-weight: 400; }

/* Voting */
.yfm-vote { display: inline-flex; gap: 8px; }
.yfm-vote__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #d7d7e0;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}
.yfm-vote__up.is-active { background: #e7f7ef; border-color: #06633d; color: #06633d; }
.yfm-vote__down.is-active { background: #fdecec; border-color: #a51212; color: #a51212; }
.yfm-vote__btn[disabled] { opacity: 0.6; cursor: default; }

/* Rating */
.yfm-rating__summary { font-size: 1.1rem; margin-bottom: 8px; }
.yfm-rating__avg { font-size: 2rem; font-weight: 800; color: var(--yfm-accent, #e0245e); }
.yfm-rating__max, .yfm-rating__count { opacity: 0.6; }
.yfm-rating__stars { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.yfm-rating__star {
	width: 36px;
	height: 36px;
	border: 1px solid #d7d7e0;
	background: #fff;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
}
.yfm-rating__star:hover, .yfm-rating__star.is-hover { background: #ffcf4d; }
.yfm-rating__star.is-selected { background: var(--yfm-accent, #e0245e); color: #fff; border-color: transparent; }
.yfm-rating__msg { margin: 8px 0 0; font-size: 0.9rem; color: #06633d; }

/* Report */
.yfm-report { display: inline-block; position: relative; }
.yfm-report__toggle {
	background: none;
	border: none;
	color: inherit;
	opacity: 0.6;
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
}
.yfm-report__panel {
	margin-top: 10px;
	padding: 14px;
	border: 1px solid #d7d7e0;
	border-radius: 12px;
	background: #fff;
	max-width: 320px;
}
.yfm-report__panel select { width: 100%; padding: 8px; margin: 6px 0 10px; border-radius: 8px; border: 1px solid #d7d7e0; }
.yfm-report__msg { margin: 8px 0 0; font-size: 0.85rem; color: #06633d; }

/* Ads */
.yfm-ad { margin: 24px 0; text-align: center; }
.yfm-ad--placeholder {
	border: 2px dashed #c7c7d4;
	border-radius: 12px;
	padding: 22px;
	color: #8a8a99;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

@media (max-width: 600px) {
	.yfm-grid-2 { grid-template-columns: 1fr; }
	.yfm-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
}
