/* Media Upload Modal Styles */

.media-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.media-modal-content {
  background: linear-gradient(135deg, #2a1a4a 0%, #1a1333 100%);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.media-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.media-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.media-modal-header h2 {
  color: white;
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
}

.media-modal-header p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 0.95rem;
}

/* Upload Steps */

.upload-step {
  animation: fadeIn 0.3s ease;
}

.step-icon {
  text-align: center;
  margin-bottom: 1.5rem;
}

.step-icon i {
  font-size: 4rem;
  color: #5865F2;
}

.upload-step h3 {
  text-align: center;
  color: white;
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.upload-step > p {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Buttons */

.media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.media-btn.primary {
  background: #5865F2;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
}

.media-btn.primary:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

.media-btn.primary:active {
  transform: translateY(0);
}

.media-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.media-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Upload Actions */

.upload-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.upload-actions button {
  flex: 1;
}

/* Button Variants */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-primary {
  background: #946fe3;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #7c5bc4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(148, 111, 227, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Auth Status */

.auth-status {
  display: none;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-status.info {
  background: rgba(108, 71, 166, 0.2);
  border: 1px solid rgba(108, 71, 166, 0.4);
  color: #946fe3;
}

.auth-status.success {
  background: rgba(67, 181, 129, 0.2);
  border: 1px solid rgba(67, 181, 129, 0.4);
  color: #43b581;
}

.auth-status.error {
  background: rgba(237, 66, 69, 0.2);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #ed4245;
}

.auth-status.warning {
  background: rgba(250, 166, 26, 0.2);
  border: 1px solid rgba(250, 166, 26, 0.4);
  color: #faa61a;
}

/* User Info */

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.2);
}

.user-info .user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #5865F2;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}

.user-info .user-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  flex: 1;
}

.user-info i {
  color: #5865F2;
  font-size: 1.25rem;
}

.connected-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #6c47a6;
}

.user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.user-status {
  color: #43b581;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.disconnect-btn {
  background: rgba(237, 66, 69, 0.2);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #ed4245;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disconnect-btn:hover {
  background: rgba(237, 66, 69, 0.3);
}

/* Upload Zone and Area */

.upload-zone,
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 250px;
}

.upload-zone:hover,
.upload-zone.dragover,
.upload-area:hover,
.upload-area.dragover {
  border-color: #6c47a6;
  background: rgba(108, 71, 166, 0.1);
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  color: #946fe3;
  margin-bottom: 1rem;
}

.upload-zone i {
  font-size: 3rem;
  color: #946fe3;
  margin-bottom: 1rem;
}

.upload-zone p {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.upload-zone small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

.upload-text {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.upload-subtext {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

/* Preview Container */

#preview-container {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
}

#preview-container img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(237, 66, 69, 0.9);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.25rem;
}

.remove-image:hover {
  background: #ed4245;
  transform: scale(1.1);
}

/* Preview Area */

.preview-area {
  text-align: center;
}

.preview-area img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.preview-info {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.preview-info p {
  color: white;
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

/* Upload Progress */

.upload-progress {
  margin: 1.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c47a6, #946fe3);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(108, 71, 166, 0.5);
}

#progress-text {
  text-align: center;
  color: white;
  font-size: 0.9rem;
  margin: 0;
}

/* Guidelines Step */

.guidelines-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.guidelines-header i {
  font-size: 3rem;
  color: #946fe3;
}

.guidelines-header h3 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
}

.guidelines-content {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.guideline-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guideline-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.guideline-section.moderation {
  background: rgba(255, 193, 7, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.guideline-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.guideline-icon.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.guideline-icon.error {
  background: rgba(244, 67, 54, 0.2);
  color: #F44336;
}

.guideline-icon.info {
  background: rgba(33, 150, 243, 0.2);
  color: #2196F3;
}

.guideline-icon.warning {
  background: rgba(255, 152, 0, 0.2);
  color: #FF9800;
}

.guideline-icon.alert {
  background: rgba(255, 193, 7, 0.2);
  color: #FFC107;
}

.guideline-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
}

.guideline-text strong {
  color: white;
  display: block;
  margin-bottom: 0.5rem;
}

.guideline-text ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.guideline-text li {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.guidelines-acceptance {
  background: rgba(148, 111, 227, 0.1);
  border: 1px solid rgba(148, 111, 227, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  height: 24px;
  width: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-container:hover .checkmark {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #946fe3;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #946fe3;
  border-color: #946fe3;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label {
  color: white;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Upload Result */

.upload-result {
  display: none;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.upload-result.success {
  background: rgba(67, 181, 129, 0.2);
  border: 1px solid rgba(67, 181, 129, 0.4);
  color: #43b581;
}

.upload-result.error {
  background: rgba(237, 66, 69, 0.2);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #ed4245;
}

.upload-result i {
  font-size: 1.2rem;
}

/* Mobile Responsive */

@media (max-width: 768px) {
  .media-modal-content {
    width: 95%;
    padding: 1.5rem;
    max-height: 95vh;
  }
  
  .media-modal-header h2 {
    font-size: 1.5rem;
  }
  
  .upload-area {
    padding: 2rem 1rem;
    min-height: 200px;
  }
  
  .step-icon i {
    font-size: 3rem;
  }
  
  .connected-user {
    flex-direction: column;
    text-align: center;
  }
  
  .disconnect-btn {
    width: 100%;
    justify-content: center;
  }
  
  .form-group label {
    font-size: 0.95rem;
  }
  
  .form-group input[type="text"],
  .form-group textarea {
    font-size: 0.95rem;
    padding: 0.75rem;
  }
  
  .char-counter {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .media-modal-content {
    width: 98%;
    padding: 1rem;
    border-radius: 12px;
  }
  
  .media-modal-header h2 {
    font-size: 1.3rem;
  }
  
  .media-modal-header p {
    font-size: 0.85rem;
  }
  
  .upload-area {
    padding: 1.5rem 0.75rem;
    min-height: 150px;
  }
  
  .upload-area p {
    font-size: 0.9rem;
  }
  
  .step-icon i {
    font-size: 2.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }
  
  .form-group label {
    font-size: 0.9rem;
  }
  
  .form-group input[type="text"],
  .form-group textarea {
    font-size: 0.9rem;
    padding: 0.7rem 0.85rem;
  }
  
  .form-group textarea {
    min-height: 80px;
  }
  
  .char-counter {
    font-size: 0.75rem;
  }
  
  .user-avatar {
    width: 50px;
    height: 50px;
  }
  
  .discord-username {
    font-size: 1rem;
  }
}

/* Smooth scrollbar for modal */

.media-modal-content::-webkit-scrollbar,
.guidelines-content::-webkit-scrollbar {
  width: 8px;
}

.media-modal-content::-webkit-scrollbar-track,
.guidelines-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.media-modal-content::-webkit-scrollbar-thumb,
.guidelines-content::-webkit-scrollbar-thumb {
  background: rgba(114, 137, 218, 0.5);
  border-radius: 4px;
}

.media-modal-content::-webkit-scrollbar-thumb:hover,
.guidelines-content::-webkit-scrollbar-thumb:hover {
  background: rgba(114, 137, 218, 0.7);
}

/* Image Details Form Styling */

#image-details {
  margin-top: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.form-group {
  margin-bottom: 1.75rem;
  position: relative;
}

.form-group label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(148, 111, 227, 0.08);
  border: 2px solid rgba(148, 111, 227, 0.3);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
  line-height: 1.5;
}

.form-group input[type="text"]:hover,
.form-group textarea:hover {
  border-color: rgba(148, 111, 227, 0.5);
  background: rgba(148, 111, 227, 0.12);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #946fe3;
  background: rgba(148, 111, 227, 0.15);
  box-shadow: 0 0 0 3px rgba(148, 111, 227, 0.15);
  transform: translateY(-1px);
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-group textarea {
  min-height: 90px;
}

.char-counter {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  font-weight: 500;
}

.char-counter span {
  color: #946fe3;
  font-weight: 600;
}
