/* ===========================
   GLOBAL
=========================== */

body {
	margin: 0;
	min-height: 100vh;
	background: linear-gradient(145deg, #0a0f19, #1a2537);
	font-family: "Inter", Arial, sans-serif;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	box-sizing: border-box;
}

/* ===========================
   GLASS CARD (index.php)
=========================== */

.glass-card {
	width: 480px;
	padding: 35px;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(18px);
	border: 1px solid rgba(255,255,255,0.18);
	box-shadow: 0 12px 45px rgba(0, 0, 0, 0.55);
	text-align: center;
	animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

h2 {
	margin-bottom: 25px;
	font-weight: 500;
	letter-spacing: 1px;
}

/* ===========================
   DROPZONE
=========================== */

.dropzone {
	border: 2px dashed rgba(255,255,255,0.35);
	border-radius: 16px;
	padding: 28px;
	cursor: pointer;
	background: rgba(255,255,255,0.05);
	min-height: 180px;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	transition: 0.25s;

	position: relative;
	overflow: hidden;
}

.dropzone:hover {
	border-color: #5fa0ff;
	box-shadow: 0 0 18px rgba(90,160,255,0.5);
}

/* preview image */
.preview-img {
	max-width: 100%;
	max-height: 240px;
	border-radius: 14px;
	margin-bottom: 15px;
	box-shadow: 0 6px 20px rgba(0,0,0,0.5);
	display: none;
}

.droptext {
	font-size: 15px;
	color: rgba(255,255,255,0.75);
}

/* upload button */
.upload-btn {
	width: 100%;
	padding: 14px;
	margin-top: 18px;

	border-radius: 12px;
	border: none;
	background: linear-gradient(135deg, #5fa0ff, #2d6bff);
	color: white;

	font-size: 17px;
	font-weight: 500;
	cursor: pointer;

	box-shadow: 0 4px 14px rgba(60,120,255,0.4);
	transition: 0.2s ease;
}

.upload-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 22px rgba(80,140,255,0.55);
}

/* ===========================
   RESULT (после загрузки)
=========================== */

.result-area {
	margin-top: 22px;
}

.uploaded-preview {
	max-width: 100%;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.45);
	cursor: pointer;
	transition: 0.25s;
}

.result-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.result-box {
	margin-top: 18px;
	padding: 14px;
	font-size: 15px;
	background: rgba(255,255,255,0.12);
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,0.22);
	backdrop-filter: blur(10px);
	word-break: break-all;
}

/* Actions buttons */
.copy-btn, .open-btn {
	padding: 10px 16px;
	border-radius: 10px;
	border: none;
	background: rgba(120,160,255,0.3);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(8px);
	transition: 0.2s ease;
}

.copy-btn:hover, .open-btn:hover {
	background: rgba(150,180,255,0.45);
	transform: translateY(-1px);
}

/* TOAST */
.toast {
	position: fixed;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(60,130,255,0.5);
	padding: 10px 18px;
	border-radius: 10px;
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: .3s ease;
}

.toast.show {
	opacity: 1;
}

/* ===========================
   VIEW.PHP IMAGE BLOCK
=========================== */

.viewer-container {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
}

.viewer-img {
	max-width: 100%;
	max-height: 80vh;
	border-radius: 16px;
	box-shadow: 0 12px 45px rgba(0,0,0,0.55);
	cursor: zoom-in;
	transition: .2s;
}

/* controls */
.controls {
	margin-top: 22px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.ctrl-btn {
	padding: 12px 20px;
	border-radius: 12px;
	border: 1px solid rgba(255,255,255,0.3);
	background: rgba(255,255,255,0.12);
	backdrop-filter: blur(10px);
	color: white;
	cursor: pointer;
	text-decoration: none;
}

.ctrl-btn:hover {
	background: rgba(255,255,255,0.22);
	transform: translateY(-2px);
}

/* ===========================
   MODAL ZOOM
=========================== */

.zoom-modal {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.9);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 99999;
}

.zoom-wrapper {
    overflow: visible;
    max-width: none;
    max-height: none;
}

.zoom-img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 14px;
	user-select: none;
	touch-action: none;
	cursor: grab;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 768px) {

	.glass-card {
		width: 90%;
		padding: 25px;
	}

	.dropzone {
		min-height: 150px;
	}

	h2 {
		font-size: 20px;
	}

	.upload-btn {
		font-size: 15px;
	}

	.ctrl-btn {
		padding: 10px 16px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {

	body {
		padding: 10px;
	}

	.glass-card {
		width: 100%;
		padding: 22px;
	}

	.viewer-img {
		max-height: 65vh;
	}

	.ctrl-btn {
		flex: 1;
		text-align: center;
	}

	.dropzone {
		padding: 20px;
		min-height: 130px;
	}
}

.file-real {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 3;
}

