/* Guebert Family Reunion 2025 - Photo Sharing App */
/* Based on historical family archive aesthetic */

:root {
	--primary-blue: #667eea;
	--secondary-purple: #764ba2;
	--light-blue: #a8b9ff;
	--cream: #faf8f5;
	--warm-white: #ffffff;
	--soft-gray: #666;
	--charcoal: #2c3e50;
	--error-red: #e53e3e;
	--success-green: #38a169;
	--card-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Georgia', serif;
	line-height: 1.6;
	color: var(--charcoal);
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	min-height: 100vh;
}

.container {
	max-width: 900px;
	margin: 0 auto;
	padding: 30px 20px;
}

/* Header Styles */
.header {
	background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-purple) 100%);
	color: white;
	padding: 40px;
	text-align: center;
	border-radius: 15px 15px 0 0;
	box-shadow: var(--card-shadow);
}

.header h1 {
	font-size: 2.8em;
	margin-bottom: 10px;
	font-weight: 700;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header .subtitle {
	font-size: 1.3em;
	opacity: 0.9;
	font-weight: 400;
	font-style: italic;
}

/* Card Styles */
.card {
	background: var(--warm-white);
	border-radius: 0 0 15px 15px;
	padding: 40px;
	margin-bottom: 20px;
	box-shadow: var(--card-shadow);
	border: 1px solid rgba(102, 126, 234, 0.1);
	position: relative;
	overflow: hidden;
}

.card:not(:first-child) {
	border-radius: 15px;
	margin-top: 20px;
}

.card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--primary-blue), var(--secondary-purple));
}

.card h2 {
	color: var(--primary-blue);
	margin-bottom: 25px;
	font-size: 2.2em;
	font-weight: 700;
	text-align: center;
}

.card h3 {
	color: var(--primary-blue);
	margin-bottom: 15px;
	font-size: 1.8em;
	font-weight: 700;
	text-align: center;
}

/* Upload Info Fields */
.upload-info {
	margin-bottom: 25px;
}

.info-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.info-field {
	flex: 1;
	min-width: 250px;
}

.info-field label {
	display: block;
	margin-bottom: 8px;
	color: var(--primary-blue);
	font-weight: 600;
	font-size: 1em;
}

.info-field input[type="text"],
.info-field textarea {
	width: 100%;
	padding: 14px;
	border: 2px solid var(--light-blue);
	border-radius: 10px;
	font-size: 16px;
	font-family: 'Georgia', serif;
	transition: all 0.3s ease;
	background: var(--warm-white);
	resize: vertical;
}

.info-field input[type="text"]:focus,
.info-field textarea:focus {
	outline: none;
	border-color: var(--primary-blue);
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	transform: translateY(-2px);
}

.info-field input[type="text"]::placeholder,
.info-field textarea::placeholder {
	color: var(--soft-gray);
	font-style: italic;
}

.upload-section {
	text-align: center;
}

.upload-area {
	border: 3px dashed var(--primary-blue);
	border-radius: 15px;
	padding: 40px 30px;
	margin: 25px 0;
	cursor: pointer;
	transition: all 0.3s ease;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
	position: relative;
}

.upload-area:hover {
	border-color: var(--secondary-purple);
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.upload-area.dragover {
	border-color: var(--secondary-purple);
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
	transform: scale(1.02);
	box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

.upload-icon {
	font-size: 3.5em;
	color: var(--primary-blue);
	margin-bottom: 20px;
	display: block;
}

.upload-area p {
	color: var(--charcoal);
	font-size: 1.2em;
	margin: 10px 0;
}

.upload-area p:first-of-type {
	font-weight: 600;
	color: var(--primary-blue);
}

#fileInput {
	display: none;
}

/* Button Styles */
.btn {
	background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
	color: white;
	border: none;
	padding: 16px 32px;
	border-radius: 25px;
	cursor: pointer;
	font-size: 1.1em;
	font-family: 'Georgia', serif;
	font-weight: 600;
	transition: all 0.3s ease;
	margin: 10px;
	letter-spacing: 0.5px;
	box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
	background: linear-gradient(135deg, var(--secondary-purple), var(--primary-blue));
}

.btn:active {
	transform: translateY(-1px);
}

.camera-btn {
	background: linear-gradient(135deg, var(--secondary-purple), #5a4e8a);
}

.camera-btn:hover {
	box-shadow: 0 10px 30px rgba(118, 75, 162, 0.4);
	background: linear-gradient(135deg, #5a4e8a, var(--secondary-purple));
}

/* Gallery Styles */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 25px;
	margin-top: 30px;
}

.photo-item {
	position: relative;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
	transition: all 0.3s ease;
	background: var(--warm-white);
	border: 1px solid rgba(102, 126, 234, 0.1);
}

.photo-item:hover {
	transform: translateY(-10px);
	box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

.photo-item img,
.photo-item video {
	width: 100%;
	height: 250px;
	object-fit: cover;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.photo-item:hover img,
.photo-item:hover video {
	transform: scale(1.05);
}

.photo-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(44, 62, 80, 0.9));
	color: white;
	padding: 25px 15px 15px;
	font-size: 0.9em;
}

.photo-caption {
	font-size: 1em;
	color: white;
	font-weight: 600;
	margin-bottom: 5px;
	line-height: 1.3;
}

.photo-credit {
	background: rgba(102, 126, 234, 0.1);
	padding: 8px 12px;
	font-size: 0.8em;
	color: var(--primary-blue);
	font-style: italic;
	border-top: 1px solid rgba(102, 126, 234, 0.2);
	text-align: center;
}

/* Progress and Messages */
.upload-progress {
	width: 100%;
	background: rgba(102, 126, 234, 0.1);
	border-radius: 10px;
	margin: 25px 0;
	overflow: hidden;
	padding: 20px;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.progress-bar-container {
	width: 100%;
	height: 10px;
	background: rgba(102, 126, 234, 0.2);
	border-radius: 5px;
	overflow: hidden;
	margin-top: 10px;
}

.progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--primary-blue), var(--secondary-purple));
	width: 0%;
	transition: width 0.3s ease;
	border-radius: 5px;
}

.message {
	padding: 18px 25px;
	border-radius: 10px;
	margin: 25px 0;
	font-weight: 600;
	font-size: 1.1em;
}

.success {
	background: rgba(56, 161, 105, 0.1);
	color: var(--success-green);
	border: 2px solid rgba(56, 161, 105, 0.3);
}

.error {
	background: rgba(229, 62, 62, 0.1);
	color: var(--error-red);
	border: 2px solid rgba(229, 62, 62, 0.3);
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(44, 62, 80, 0.95);
	backdrop-filter: blur(8px);
}

.modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 95%;
	max-height: 95%;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.modal-content img,
.modal-content video {
	max-width: 100%;
	max-height: 100%;
	border-radius: 15px;
}

.close {
	position: absolute;
	top: 25px;
	right: 40px;
	color: white;
	font-size: 50px;
	font-weight: 300;
	cursor: pointer;
	z-index: 1001;
	text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
	transition: opacity 0.3s ease;
}

.close:hover {
	opacity: 0.7;
}

/* Loading Styles */
.loading {
	display: none;
	text-align: center;
	padding: 40px;
	color: var(--soft-gray);
}

.spinner {
	border: 4px solid rgba(102, 126, 234, 0.2);
	border-top: 4px solid var(--primary-blue);
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 1.2s linear infinite;
	margin: 0 auto 25px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Empty Gallery State */
.gallery-empty {
	text-align: center;
	color: var(--soft-gray);
	padding: 80px 20px;
	font-style: italic;
	font-size: 1.2em;
}

.gallery-empty a {
	color: var(--primary-blue);
	text-decoration: none;
	font-weight: 600;
}

.gallery-empty a:hover {
	text-decoration: underline;
}

/* Modal Caption/Credit Styles */
.modal-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(44, 62, 80, 0.95));
	color: white;
	padding: 40px 25px 25px;
	border-radius: 0 0 15px 15px;
}

.modal-caption {
	font-size: 1.2em;
	font-weight: 600;
	margin-bottom: 10px;
	line-height: 1.4;
}

.modal-credit {
	font-size: 1em;
	font-style: italic;
	color: var(--light-blue);
	opacity: 0.9;
}

.modal-media {
	position: relative;
	display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 20px 15px;
	}
	
	.header {
		padding: 30px 20px;
	}
	
	.header h1 {
		font-size: 2.2em;
	}
	
	.header .subtitle {
		font-size: 1.1em;
	}
	
	.card {
		padding: 25px 20px;
	}
	
	.card h2 {
		font-size: 1.8em;
	}
	
	.upload-area {
		padding: 30px 20px;
	}
	
	.upload-icon {
		font-size: 3em;
	}
	
	.gallery {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 20px;
	}
	
	.photo-item img,
	.photo-item video {
		height: 200px;
	}
	
	.btn {
		padding: 14px 24px;
		font-size: 1em;
		margin: 8px;
	}
	
	.info-row {
		flex-direction: column;
		gap: 15px;
	}
	
	.info-field {
		min-width: auto;
	}
	
	.info-field input[type="text"],
	.info-field textarea {
		padding: 12px;
		font-size: 16px; /* Prevents zoom on iOS */
	}
}

@media (max-width: 480px) {
	.header {
		padding: 25px 15px;
	}
	
	.header h1 {
		font-size: 1.9em;
	}
	
	.card {
		margin-bottom: 15px;
	}
	
	.gallery {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 15px;
	}
	
	.photo-item img,
	.photo-item video {
		height: 160px;
	}
	
	.close {
		top: 15px;
		right: 25px;
		font-size: 40px;
	}
}
