/* Tier List Styles */
.selection-screen {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 2rem;
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
}

.tier-option {
	background-color: var(--bg-secondary);
	border-radius: 0.5rem;
	padding: 1.5rem;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tier-option:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
	border-color: var(--accent-color);
}

.tier-option-icon {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	color: var(--accent-color);
}

.tier-option h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.tier-option p {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

.select-button {
	background-color: var(--accent-color);
	color: white;
	border: none;
	padding: 0.5rem 1.5rem;
	border-radius: 0.375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	align-self: center;
}

.select-button:hover {
	background-color: var(--accent-color-hover);
	transform: scale(1.05);
}

/* Tier List Creator */
.tier-list-creator {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 2rem;
	background-color: var(--card-bg);
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--border-color);
}

.back-button {
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.back-button:hover {
	background-color: var(--bg-tertiary);
	border-color: var(--accent-color);
}

.tier-list-container {
	margin-top: 2rem;
}

.tier-rows {
	margin-bottom: 2rem;
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	overflow: hidden;
}

.tier-row {
	display: flex;
	margin-bottom: 0;
	min-height: 100px;
	background-color: var(--bg-secondary);
	position: relative;
}

.tier-row:not(:last-child) {
	border-bottom: 2px solid var(--border-color);
}

.tier-label {
	width: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 2rem;
	color: #0e0e0e;
	text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.tier-s {
	background-color: #7fff7f;
	background: linear-gradient(135deg, #7fff7f 0%, #5ac75a 100%);
}

.tier-a {
	background-color: #bfff7f;
	background: linear-gradient(135deg, #bfff7f 0%, #8fd75a 100%);
}

.tier-b {
	background-color: #ffff7f;
	background: linear-gradient(135deg, #ffff7f 0%, #d7d75a 100%);
}

.tier-c {
	background-color: #ffdf7f;
	background: linear-gradient(135deg, #ffdf7f 0%, #d7b75a 100%);
}

.tier-d {
	background-color: #ffbf7f;
	background: linear-gradient(135deg, #ffbf7f 0%, #d78f5a 100%);
}

.tier-f {
	background-color: #ff7f7f;
	background: linear-gradient(135deg, #ff7f7f 0%, #d75a5a 100%);
}

.tier-items {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 0.5rem;
	gap: 0.5rem;
	min-height: 100px;
	background-color: rgba(255, 255, 255, 0.1);
}

.tier-item {
	width: 120px;
	height: 90px;
	border-radius: 0.5rem;
	overflow: hidden;
	cursor: grab;
	position: relative;
	transition: all 0.2s ease;
	border: 2px solid transparent;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tier-item:hover {
	z-index: 10;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
	border-color: var(--accent-color);
}

.tier-item.dragging {
	opacity: 0.8;
	transform: scale(1.05);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tier-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tier-item .item-name {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	color: white;
	font-size: 0.8rem;
	padding: 0.3rem;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.unranked-section {
	margin-top: 3rem;
	background-color: var(--bg-secondary);
	padding: 1.5rem;
	border-radius: 0.5rem;
	border: 2px dashed var(--border-color);
	position: relative;
}

.unranked-section::before {
	content: "Drag items here to unrank them";
	position: absolute;
	top: -12px;
	left: 20px;
	background-color: var(--card-bg);
	padding: 0 10px;
	font-size: 0.9rem;
	color: var(--text-secondary);
	font-weight: 600;
}

.unranked-title {
	font-size: 1.3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.unranked-title::before {
	content: "↓";
	font-size: 1.5rem;
	color: var(--accent-color);
}

.unranked-items {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1rem;
	min-height: 150px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 0.25rem;
	transition: all 0.3s ease;
}

.unranked-items.drag-over {
	background-color: rgba(var(--accent-color-rgb), 0.1);
	border-color: var(--accent-color);
}

.action-buttons {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin-top: 3rem;
}

.action-button {
	padding: 0.75rem 2rem;
	border-radius: 0.5rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	border: none;
}

.action-button i {
	font-size: 1.1rem;
}

.reset-button {
	background-color: #f44336;
	color: white;
}

.reset-button:hover {
	background-color: #d32f2f;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* Share Modal Styles */
.share-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.share-modal.hidden {
	display: none;
}

.share-modal-content {
	background-color: var(--card-bg);
	padding: 2rem;
	border-radius: 0.75rem;
	max-width: 500px;
	width: 90%;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	border: 1px solid var(--border-color);
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.share-modal h3 {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.share-modal p {
	margin-bottom: 1.5rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

.share-url-container {
	display: flex;
	margin-bottom: 1.5rem;
}

.share-url-input {
	flex: 1;
	padding: 0.5rem;
	border: 1px solid var(--border-color);
	border-radius: 0.375rem 0 0 0.375rem;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	font-size: 0.9rem;
	overflow: hidden;
	text-overflow: ellipsis;
}

.copy-url-button {
	padding: 0.5rem 1rem;
	background-color: var(--accent-color);
	color: white;
	border: none;
	border-radius: 0 0.375rem 0.375rem 0;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.copy-url-button:hover {
	background-color: var(--accent-color-hover);
}

.share-modal-close {
	padding: 0.5rem 1.5rem;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
	border-radius: 0.375rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
}

.share-modal-close:hover {
	background-color: var(--bg-tertiary);
}

/* Animation when modal appears */
.share-modal:not(.hidden) {
	opacity: 1;
}

.share-modal:not(.hidden) .share-modal-content {
	transform: translateY(0);
}

/* Load Tier List Section */
.load-tier-list {
	margin-top: 3rem;
	background-color: var(--bg-secondary);
	padding: 1.5rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border-color);
	text-align: center;
}

.load-tier-list h3 {
	font-size: 1.3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.load-tier-list-container {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.load-tier-list-input {
	flex: 1;
	padding: 0.5rem;
	border: 1px solid var(--border-color);
	border-radius: 0.375rem;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
}

.load-tier-list-button {
	padding: 0.5rem 1rem;
	background-color: var(--accent-color);
	color: white;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: all 0.3s ease;
}

.load-tier-list-button:hover {
	background-color: var(--accent-color-hover);
}

/* Error notification */
.save-notification.error {
	background-color: #f44336;
}

/* Share button */
.share-button {
	background-color: #2196F3;
	color: white;
}

.share-button:hover {
	background-color: #0b7dda;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Save Button Styles */
.save-button {
	background-color: #4CAF50;
	color: white;
}

.save-button:hover {
	background-color: #388E3C;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Save Notification */
.save-notification {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #4CAF50;
	color: white;
	padding: 12px 24px;
	border-radius: 4px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	opacity: 1;
	transition: opacity 0.5s ease;
}

.save-notification.fade-out {
	opacity: 0;
}

/* Drag and drop visual feedback */
.drag-over {
	background-color: rgba(var(--accent-color-rgb), 0.1) !important;
	border-color: var(--accent-color) !important;
}

/* Reset Modal Styles */
.reset-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.reset-modal.hidden {
	display: none;
}

.reset-modal-content {
	background-color: var(--card-bg);
	padding: 2rem;
	border-radius: 0.75rem;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	border: 1px solid var(--border-color);
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.reset-modal h3 {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	color: var(--text-primary);
}

.reset-modal p {
	margin-bottom: 2rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

.reset-modal-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
}

.reset-modal-cancel,
.reset-modal-confirm {
	padding: 0.5rem 1.5rem;
	border-radius: 0.375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.reset-modal-cancel {
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.reset-modal-cancel:hover {
	background-color: var(--bg-tertiary);
}

.reset-modal-confirm {
	background-color: #f44336;
	color: white;
	border: none;
}

.reset-modal-confirm:hover {
	background-color: #d32f2f;
	transform: translateY(-2px);
}

/* Animation when modal appears */
.reset-modal:not(.hidden) {
	opacity: 1;
}

.reset-modal:not(.hidden) .reset-modal-content {
	transform: translateY(0);
}

/* Prevent scrolling when modal is open */
body.modal-open {
	overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.selection-screen {
		padding: 1rem;
	}

	.tier-option {
		padding: 1.25rem;
	}

	.tier-label {
		width: 60px;
		font-size: 1.5rem;
	}

	.tier-item {
		width: 100px;
		height: 70px;
	}

	.unranked-items {
		gap: 0.75rem;
	}

	.action-buttons {
		flex-direction: column;
		gap: 1rem;
	}

	.action-button {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.tier-item {
		width: 90px;
		height: 60px;
	}

	.unranked-title {
		font-size: 1.1rem;
	}
}