* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: white;
  width: 100%;
  max-width: 700px;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h2 {
  text-align: center;
  color: #333;
}

h3 {
  text-align: center;
  color: #666;
}

.header-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.reset-card {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  border-radius: 15px;
  padding: 20px;
  color: white;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 75, 43, 0.3);
}

.reset-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 75, 43, 0.5);
}

.reset-card .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.reset-card .title {
  font-size: 18px;
  font-weight: bold;
}

.reset-card .desc {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 5px;
}

.btnn-reset:hover {
  background: #c82333;
}

.stats-bar {
  background: #f0f0f0;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}

.stats-bar strong {
  color: #667eea;
  font-size: 16px;
}

.stats-bar a {
  display: inline-block;
  margin-top: 8px;
  color: #17a2b8;
  text-decoration: none;
  font-weight: bold;
}

.stats-bar a:hover {
  text-decoration: underline;
}

.upload-area {
  border: 3px dashed #667eea;
  border-radius: 12px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  background: #f7f8ff;
}

.upload-area:hover {
  background: #eef0ff;
}

.upload-area.dragover {
  background: #dde3ff;
  border-color: #764ba2;
}

.upload-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.upload-text {
  font-size: 20px;
  color: #667eea;
  font-weight: bold;
}

.upload-subtext {
  margin-top: 8px;
  color: #999;
}

input[type="file"] {
  display: none;
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 5px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btnn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity 0.3s;
  margin-bottom: 1rem;
}

.btnn:hover {
  opacity: 0.9;
}

.btnn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.gallery {
  margin-top: 40px;
  border-top: 2px solid #eee;
  padding-top: 20px;
}

.gallery h2 {
  margin-bottom: 20px;
  font-size: 18px;
  color: #333;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-item:hover .gallery-item-delete {
  opacity: 1;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 600;
  font-size: 13px;
}

.form-group p {
  margin-top: 3px;
  font-size: 12px;
  color: #999;
}

.file-count {
  padding: 10px;
  background: #f0f0f0;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  color: #666;
  margin: 10px 0;
}

.file-count.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 15px;
  width: 350px;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.modal-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.action-buttons .btnn {
  flex: 1;
  margin-top: 0;
}

.btnn-danger {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.btnn-danger:hover {
  opacity: 0.9;
}

.menu-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
