/* Main Styles for Video Downloader Application */

/* Custom Font Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* Modern Color Palette */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #4cc9f0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
}

/* Progress Bar Styles */
.progress-container {
  width: 100%;
  height: 8px;
  background: #f1f1f1;
  border-radius: 4px;
  margin: 15px 0;
  overflow: hidden;
  display: none;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #ff7675, #d63031);
  width: 0%;
  transition: width 0.3s ease;
}

/* Logo Styles */
.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.logo-icon {
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #ff7675, #d63031);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
  box-shadow: 0 6px 12px rgba(214, 48, 49, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(214, 48, 49, 0.4);
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 70%);
}

.logo-icon i {
  color: white;
  font-size: 26px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.logo-text {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff7675, #d63031);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

/* Base Styles */
body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
  background-image: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
  color: var(--dark-color);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin-top: 50px;
  margin-bottom: 50px;
}

/* Card Styling */
.card {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: none;
  transition: all 0.3s ease;
  background: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 15px 15px 0 0 !important;
  padding: 25px 20px;
  border: none;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.card-header h1 {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 2rem;
}

.card-body {
  padding: 30px;
}

/* Form Elements */
.form-control {
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #ddd;
  transition: all 0.3s;
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.2);
  border-color: #ff7675;
}

.input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #ff7675, #d63031);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(214, 48, 49, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d63031, #c0392b);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(214, 48, 49, 0.3);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* Video Info Section */
.video-info {
  display: none;
  margin-top: 30px;
  animation: fadeIn 0.5s ease;
}

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

.thumbnail {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.02);
}

#video-title {
  font-weight: 700;
  color: #333;
  line-height: 1.4;
}

/* Format Items */
.format-item {
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 10px;
  background-color: #f8f8f8;
  transition: all 0.3s;
  border-left: 4px solid #ff7675;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.format-item:hover {
  background-color: #fff5f5;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(214, 48, 49, 0.1);
}

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  margin: 30px 0;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  color: #ff7675;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    margin-top: 20px;
  }
  
  .card-header {
    padding: 20px 15px;
  }
  
  .card-header h1 {
    font-size: 1.5rem;
  }
  
  .card-body {
    padding: 20px;
  }
}

/* Radio Buttons */
.form-check-input:checked {
  background-color: #ff7675;
  border-color: #ff7675;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
}

/* Error Messages */
.alert {
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-danger {
  background-color: #ffe0e3;
  color: #d63031;
}