/* ============== Global Styles ============== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============== Navigation ============== */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.8;
}

/* ============== Container ============== */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  flex: 1;
}

/* ============== Gallery Header ============== */
.gallery-header {
  text-align: center;
  color: white;
  margin-bottom: 2rem;
}

.gallery-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.gallery-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ============== Forms ============== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #222;
}

input[type='text'],
input[type='password'],
input[type='email'],
input[type='file'],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type='text']:focus,
input[type='password']:focus,
input[type='email']:focus,
input[type='file']:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
  resize: vertical;
}

/* ============== Buttons ============== */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-success {
  background: #4caf50;
  color: white;
}

.btn-success:hover {
  background: #45a049;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #da190b;
}

/* ============== Upload Section ============== */
.upload-section {
  margin-bottom: 3rem;
}

.upload-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.upload-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #333;
}

/* ============== Status Messages ============== */
.status-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  display: none;
}

.status-message.loading {
  display: block;
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

.status-message.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.status-message.error {
  display: block;
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #f44336;
}

.floating-status {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.floating-status.success {
  background: #4caf50;
  color: white;
}

.floating-status.error {
  background: #f44336;
  color: white;
}

/* ============== Filter Section ============== */
.filter-section {
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-controls label {
  margin-bottom: 0;
  font-weight: 600;
}

.filter-controls select {
  max-width: 300px;
}

/* ============== Gallery Grid ============== */
.gallery-section {
  margin-bottom: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

.photo-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.photo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.photo-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.photo-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-info small {
  color: #666;
  font-size: 0.9rem;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: white;
  font-size: 1.1rem;
}

.no-photos {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  color: #666;
  font-size: 1.1rem;
}

.error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: #ffebee;
  border-radius: 12px;
  color: #c62828;
  font-size: 1.1rem;
}

/* ============== Footer ============== */
footer {
  background: rgba(0, 0, 0, 0.2);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
}

/* ============== Responsive ============== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-title {
    font-size: 1.5rem;
  }

  .gallery-header h2 {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 1rem;
  }

  .upload-card {
    padding: 1.5rem;
  }
}
