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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ff7f50 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: fadeInDown 1s ease-out;
}

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

.upload-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease-out;
}

.upload-form {
  display: grid;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input {
  display: none;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border: 2px dashed #667eea;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  color: #667eea;
  font-weight: 600;
}

.file-input-label:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.submit-btn {
  padding: 15px 30px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.controls {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-box {
  flex: 1;
  max-width: 300px;
  padding: 12px 20px;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  font-size: 16px;
}

.filter-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  transform: translateY(-2px);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
  animation: slideInUp 0.6s ease-out;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.card-header {
  padding: 20px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.card-date {
  opacity: 0.8;
  font-size: 0.9rem;
}

.media-container {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.card img,
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img,
.card:hover video {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
}

.reactions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.reaction-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.reaction-btn.active {
  background: #667eea;
  color: white;
}

.comments-section {
  border-top: 1px solid #e1e5e9;
  padding-top: 20px;
}

.comment-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #e1e5e9;
  border-radius: 25px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.comment-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
}

.comment-btn {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-btn:hover {
  background: #5a6fd8;
  transform: scale(1.05);
}

.comment {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 10px;
  border-left: 4px solid #667eea;
  animation: fadeIn 0.5s ease-out;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.comment-user {
  font-weight: 600;
  color: #667eea;
}

.comment-time {
  font-size: 0.8rem;
  color: #666;
}

.comment-text {
  line-height: 1.6;
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  gap: 10px;
}

.comment-action {
  padding: 5px 10px;
  border: none;
  border-radius: 15px;
  background: #e1e5e9;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.comment-action:hover {
  background: #667eea;
  color: white;
}

.reply {
  margin-right: 30px;
  margin-top: 10px;
  padding-right: 15px;
  border-right: 2px solid #e1e5e9;
}

.delete-card-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover .delete-card-btn {
  opacity: 1;
}

.delete-card-btn:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.modal img,
.modal video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 20px;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(50%) translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(50%) translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateX(50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(50%) translateY(-100%);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .controls {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-box {
    max-width: 100%;
  }
}