/* استایل‌های هشدار ظرفیت */
.storage-full-alert {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
  border: 2px solid #e74c3c;
  animation: slideInDown 0.5s ease-out;
}

.storage-warning-alert {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
  border: 2px solid #f39c12;
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.alert-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.alert-text {
  flex: 1;
}

.alert-text h3 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
}

.alert-text p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.6;
}

/* استایل‌های جدید برای صفحه آپلود */
.upload-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* هدر و پروفایل */
.header-section {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  color: white;
  box-shadow: 0 8px 25px var(--shadow-color);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.header-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.avatar-container {
  position: relative;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  background: var(--secondary-color);
}

.admin-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-info h1 {
  font-size: 2rem;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-info p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* آمار */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--shadow-color);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-light)
  );
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.stat-card h3 {
  margin: 10px 0;
  color: var(--primary-color);
  font-size: 1.8rem;
}

.stat-card p {
  margin: 0;
  color: var(--text-light);
  font-weight: 500;
}

.progress-section {
  grid-column: span 2;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--border-color);
  border-radius: 10px;
  margin: 15px 0;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary-color);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress.critical {
  background: var(--danger-color);
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.progress-section small {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* فلش راهنما */
.scroll-indicator {
  text-align: center;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: 12px;
  margin-bottom: 30px;
  animation: bounce 2s infinite;
  transition: opacity 0.3s ease;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* بخش‌های آپلود */
.url-upload-section,
.upload-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 20px var(--shadow-color);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s ease-out;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-color);
  font-size: 1.4rem;
}

.section-badge {
  background: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* فرم آپلود URL */
.url-upload-form {
  margin-bottom: 20px;
}

.url-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.url-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.url-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.url-submit {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.url-submit:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.url-submit:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none !important;
}

/* منطقه درگ و دراپ */
.drop-area {
  border: 3px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--secondary-color);
  margin-bottom: 20px;
  position: relative;
}

.drop-area:hover:not([style*="cursor: not-allowed"]) {
  border-color: var(--primary-color);
  background: rgba(255, 107, 43, 0.05);
}

.drop-area.hover {
  border-color: var(--primary-color);
  background: rgba(255, 107, 43, 0.1);
  transform: scale(1.02);
}

.drop-area input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-area p {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.subtext {
  margin: 5px 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* پیش‌نمایش فایل‌ها */
.preview {
  margin: 20px 0;
}

.file-preview {
  display: flex;
  align-items: center;
  padding: 12px;
  margin: 8px 0;
  background: var(--secondary-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: background 0.3s ease;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.file-preview:hover {
  background: rgba(255, 107, 43, 0.05);
}

.file-icon {
  font-size: 1.5rem;
  margin-left: 12px;
  color: var(--primary-color);
}

.file-details {
  flex: 1;
}

.file-name {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color);
  word-break: break-word;
}

.file-size {
  font-size: 0.85rem;
  color: var(--text-light);
}

.total-size-info {
  text-align: center;
  padding: 12px;
  margin-top: 15px;
  background: var(--primary-light);
  border-radius: 8px;
  color: var(--primary-dark);
  font-weight: 600;
  animation: fadeInUp 0.3s ease-out;
}

/* نوار پیشرفت */
.upload-progress {
  margin: 25px 0;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.3s ease-out;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* فرمت‌های مجاز */
.allowed-formats {
  margin: 25px 0;
}

.allowed-formats h4 {
  margin-bottom: 12px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.formats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.format-badge:hover {
  transform: scale(1.05);
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 5px;
}

.btn.primary {
  background: var(--primary-color);
  color: white;
}

.btn.primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 43, 0.3);
}

.btn.secondary {
  background: var(--secondary-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn.secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn.danger {
  background: var(--danger-color);
  color: white;
}

.btn.danger:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.btn.large {
  padding: 15px 30px;
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn.full-width {
  width: 100%;
  justify-content: center;
}

/* آلرت‌ها */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.alert.success {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #27ae60;
}

.alert.error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.alert.warning {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #f39c12;
}

/* منو پایین */
.menu-bar {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drop-area-highlight {
  animation: pulse 2s infinite;
  border-color: var(--primary-color) !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 43, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0);
  }
}

/* رسپانسیو */
@media (max-width: 768px) {
  .upload-container {
    padding: 15px;
  }

  .profile-main {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .progress-section {
    grid-column: span 1;
  }

  .url-input-group {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .menu-bar {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .alert-content {
    flex-direction: column;
    text-align: center;
  }

  .header-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .url-upload-section,
  .upload-section {
    padding: 20px 15px;
  }

  .drop-area {
    padding: 30px 15px;
  }

  .formats-list {
    justify-content: center;
  }

  .header-section {
    padding: 20px;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  .stat-card {
    padding: 20px 15px;
  }
}
