/* ✨ AI Photo Magic - Colorful & Fun Interface ✨ */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', 'Trebuchet MS', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  color: #333;
  overflow-x: hidden;
}

/* Animated Background */
.magic-app {
  position: relative;
  min-height: 100vh;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.floating-star {
  position: absolute;
  font-size: 2rem;
  animation: float 6s ease-in-out infinite;
}

.star-1 { top: 10%; left: 10%; animation-delay: -1s; }
.star-2 { top: 20%; right: 15%; animation-delay: -2s; }
.star-3 { top: 60%; left: 5%; animation-delay: -3s; }
.star-4 { bottom: 20%; right: 10%; animation-delay: -4s; }
.star-5 { bottom: 10%; left: 20%; animation-delay: -5s; }

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 8s ease-in-out infinite;
}

.circle-1 { 
  width: 100px; 
  height: 100px; 
  top: 30%; 
  right: 20%; 
  animation-delay: -2s;
  background: linear-gradient(45deg, rgba(255, 192, 203, 0.3), rgba(255, 255, 0, 0.3));
}

.circle-2 { 
  width: 150px; 
  height: 150px; 
  bottom: 30%; 
  left: 10%; 
  animation-delay: -4s;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.3), rgba(0, 255, 0, 0.3));
}

.circle-3 { 
  width: 80px; 
  height: 80px; 
  top: 50%; 
  left: 50%; 
  animation-delay: -6s;
  background: linear-gradient(45deg, rgba(255, 165, 0, 0.3), rgba(255, 20, 147, 0.3));
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Header */
.magic-header {
  text-align: center;
  padding: 20px 0 40px 0;
}

.app-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo-icon {
  font-size: 3rem;
  animation: bounce 2s infinite;
}

.magic-header h1 {
  color: white;
  font-size: 3.5rem;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  background: linear-gradient(45deg, #FFD700, #FF69B4, #00CED1, #FF4500);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
}

.subtitle {
  color: white;
  font-size: 1.3rem;
  opacity: 0.9;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Container */
.magic-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Magic Cards */
.magic-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
  border-radius: 25px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
  animation: cardEntrance 0.6s ease-out;
}

.magic-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.card-icon {
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.card-header h2, .card-header h3 {
  color: #333;
  font-weight: bold;
  font-size: 1.8rem;
}

/* Main Action Card */
.main-action-card {
  background: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1);
  color: white;
}

.main-action-card .card-header h2 {
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.upload-restore-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

/* Upload Area */
.upload-area {
  text-align: center;
}

.upload-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD93D, #FF6B6B);
  color: white;
  padding: 40px 30px;
  border-radius: 20px;
  border: 3px dashed rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 150px;
}

.upload-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.file-input-hidden {
  display: none;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Restore Controls */
.restore-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.magic-restore-btn {
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  color: white;
  border: none;
  padding: 20px 30px;
  border-radius: 15px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70px;
}

.magic-restore-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(196, 69, 105, 0.4);
}

.magic-restore-btn:disabled {
  background: linear-gradient(135deg, #ccc, #999);
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 1.5rem;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.photo-name-input input {
  width: 100%;
  padding: 15px 20px;
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 15px;
  font-size: 1rem;
  background: rgba(255,255,255,0.9);
  color: #333;
}

/* Options Card */
.options-card {
  background: linear-gradient(135deg, #A8E6CF, #DCEDC8);
}

.magic-select {
  width: 100%;
  padding: 15px 20px;
  border: 3px solid #81C784;
  border-radius: 15px;
  font-size: 1.1rem;
  background: white;
  color: #333;
  cursor: pointer;
}

.magic-select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Settings Card */
.settings-card {
  background: linear-gradient(135deg, #FFB74D, #FFA726);
}

.magic-slider-container {
  margin-top: 15px;
}

.magic-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #FFE082, #FF7043, #D32F2F);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.magic-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

/* Loading Animation */
.magic-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-content {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 40px;
  border-radius: 25px;
  text-align: center;
  animation: loadingPulse 2s infinite;
}

@keyframes loadingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.magic-spinner {
  font-size: 4rem;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-dots span {
  font-size: 2rem;
  animation: dot 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dot {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* Results */
.magic-result .restored-photo-container {
  background: linear-gradient(135deg, #E1BEE7, #F8BBD9);
  border-radius: 25px;
  padding: 30px;
  text-align: center;
  animation: resultEntrance 0.8s ease-out;
}

@keyframes resultEntrance {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.restored-photo-display h4 {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
}

.restored-image-main {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.restored-image-main:hover {
  transform: scale(1.02);
}

/* Gallery */
.magic-gallery {
  margin-top: 40px;
}

.gallery-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gallery-icon {
  font-size: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Upload Preview */
.upload-preview {
  margin-top: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 15px;
  padding: 15px;
}

.preview-image {
  max-width: 100%;
  border-radius: 10px;
}

/* Result Links */
.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.result-links a {
  background: linear-gradient(135deg, #4ECDC4, #44A08D);
  color: white;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.result-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .magic-header h1 {
    font-size: 2.5rem;
  }
  
  .upload-restore-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .magic-container {
    padding: 0 15px;
  }
  
  .magic-card {
    padding: 20px;
  }
}

/* Form Elements */
label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
  font-size: 1.1rem;
}

.result-info {
  background: rgba(255,255,255,0.9);
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
  color: #333;
}

.result-info p {
  margin-bottom: 10px;
}

/* 🎨✨ About Modal Styles ✨🎨 */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
  border-radius: 25px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.4s ease-out;
}

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

@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: translate(-50%, -60%) scale(0.8); 
  }
  to { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
  }
}

/* Modal Header */
.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px 30px;
  border-radius: 25px 25px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  font-size: 2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0;
}

.modal-icon {
  font-size: 2.5rem;
  animation: float 3s ease-in-out infinite;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.8rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Modal Content */
.modal-content {
  padding: 30px;
  line-height: 1.6;
}

.section-title {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid transparent;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-section {
  margin-bottom: 35px;
}

.story-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 20px;
  text-align: justify;
}

/* Magic Stats */
.magic-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 25px 0;
}

.stat-item {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(248, 187, 217, 0.1));
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border-left: 4px solid #667eea;
}

.stat-icon {
  font-size: 2rem;
  min-width: 50px;
}

.stat-content strong {
  color: #333;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 5px;
}

.stat-content p {
  color: #666;
  margin: 0;
}

/* Features Section */
.features-section {
  margin-bottom: 35px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.feature-item h4 {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 10px;
}

.feature-item p {
  color: #666;
  font-size: 1rem;
}

/* Creator Section */
.creator-section {
  margin-bottom: 35px;
}

.creator-profile {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(248, 187, 217, 0.05));
  border-radius: 20px;
  padding: 30px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.creator-avatar {
  flex-shrink: 0;
}

.avatar-icon {
  font-size: 4rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 4s ease-in-out infinite;
}

.creator-info {
  flex: 1;
}

.creator-name {
  font-size: 1.8rem;
  color: #333;
  margin-bottom: 5px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.creator-title {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 20px;
  font-style: italic;
}

.creator-story {
  color: #555;
  margin-bottom: 15px;
  text-align: justify;
}

.creator-tech {
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
}

.creator-tech h5 {
  color: #333;
  margin-bottom: 8px;
}

.creator-tech p {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.creator-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.creator-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  color: white;
}

.creator-link.linkedin {
  background: linear-gradient(135deg, #0077B5, #005885);
}

.creator-link.portfolio {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.creator-link.twitter {
  background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
}

.creator-link.email {
  background: linear-gradient(135deg, #EA4335, #c23321);
}

.creator-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.link-icon {
  font-size: 1.2rem;
}

.creator-cta {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(248, 187, 217, 0.1));
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  border-left: 4px solid #667eea;
}

.creator-cta p {
  margin-bottom: 10px;
  color: #555;
}

.creator-cta p:last-child {
  margin-bottom: 0;
}

/* Tech Section */
.tech-section {
  margin-bottom: 35px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tech-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.5));
  border-radius: 15px;
  padding: 20px;
  border-left: 4px solid #667eea;
}

.tech-item h4 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.tech-item p {
  color: #666;
  margin: 0;
}

/* Footer Section */
.footer-section {
  border-top: 2px solid rgba(102, 126, 234, 0.2);
  padding-top: 25px;
  text-align: center;
}

.app-appreciation h4 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.app-appreciation p {
  color: #666;
  font-style: italic;
  margin-bottom: 20px;
}

.version-text {
  color: #999;
  font-size: 0.9rem;
  margin: 0;
}

/* Restore Header Layout */
.restore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

/* About Button in Restore Section */
.about-button {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 2px solid rgba(102, 126, 234, 0.3);
  color: #667eea;
  padding: 12px 18px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.about-button:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
  color: #5a67d8;
}

.magic-restore-btn {
  flex: 1;
  min-width: 200px;
}

.about-icon {
  font-size: 1.2rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    margin: 20px;
    max-height: 85vh;
  }
  
  .modal-header {
    padding: 20px;
  }
  
  .modal-title {
    font-size: 1.6rem;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .creator-profile {
    flex-direction: column;
    text-align: center;
  }
  
  .creator-links {
    grid-template-columns: 1fr;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-grid {
    grid-template-columns: 1fr;
  }
  
  .magic-stats .stat-item {
    flex-direction: column;
    text-align: center;
  }
  
  /* Responsive Restore Header */
  .restore-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .about-button {
    width: 100%;
    justify-content: center;
  }
  
  .magic-restore-btn {
    width: 100%;
    min-width: auto;
  }
}

/* 🚫 Usage Tracking & Rate Limiting Styles 🚫 */

/* Usage Notification */
.usage-notification {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(248, 187, 217, 0.1));
  border-radius: 15px;
  padding: 15px;
  margin-top: 15px;
  border-left: 4px solid #667eea;
  animation: slideIn 0.5s ease-out;
}

.usage-notification.last-chance {
  border-left-color: #f39c12;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(230, 126, 34, 0.1));
}

.usage-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usage-icon {
  font-size: 1.2rem;
}

.usage-text {
  color: #555;
  font-size: 0.95rem;
}

.usage-text .remaining {
  color: #667eea;
  font-weight: bold;
}

.last-chance-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(243, 156, 18, 0.2);
  border-radius: 10px;
}

.warning-icon {
  font-size: 1.1rem;
}

.warning-text {
  color: #d35400;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Limit Reached Container */
.limit-reached-container {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.1));
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  margin-top: 20px;
  border: 2px solid rgba(231, 76, 60, 0.2);
  animation: limitReached 0.8s ease-out;
}

@keyframes limitReached {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.limit-message h3 {
  color: #e74c3c;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.limit-message p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.limit-suggestions {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
}

.limit-suggestions p {
  margin: 0;
  color: #666;
  font-style: italic;
}

/* Rate Limit Error Styling */
.error.rate-limit {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
  border-left: 4px solid #e74c3c;
  color: #c0392b;
}

/* Disabled State for Rate Limited Users */
.restore-controls.rate-limited .magic-restore-btn {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #bdc3c7, #95a5a6);
}

.restore-controls.rate-limited .magic-restore-btn:hover {
  transform: none;
  box-shadow: none;
}

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

/* 🚨 Enhanced Error Message Styles 🚨 */

/* API Warning Notifications */
.api-warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
  border-left: 4px solid #ffc107;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  animation: slideIn 0.4s ease-out;
}

.warning-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.warning-icon {
  font-size: 1.3rem;
}

.warning-text {
  color: #856404;
  font-weight: 500;
}

/* Enhanced Error Card */
.error-card {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(192, 57, 43, 0.1));
  border: 2px solid rgba(220, 53, 69, 0.2);
  animation: errorSlideIn 0.5s ease-out;
}

@keyframes errorSlideIn {
  from { 
    opacity: 0; 
    transform: translateY(-20px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.error-content {
  padding: 20px;
}

.error-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.error-icon {
  font-size: 2rem;
}

.error-title {
  color: #dc3545;
  font-size: 1.5rem;
  margin: 0;
}

.error-message p {
  color: #721c24;
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.error-help {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 10px;
  margin-top: 15px;
}

.error-help small {
  color: #6c757d;
  font-style: italic;
}

/* Rate Limit Specific Styling */
.error-content.rate-limit {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
  border-radius: 15px;
  border-left: 5px solid #ffc107;
}

.rate-limit .error-title {
  color: #e67e22;
}

.rate-limit .error-message p {
  color: #8a5a00;
}

/* Success Message Enhancement */
.success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(34, 139, 34, 0.1));
  border-left: 4px solid #28a745;
  border-radius: 10px;
  padding: 12px 15px;
  color: #155724;
  font-weight: 500;
  animation: slideIn 0.4s ease-out;
  transition: all 0.3s ease;
}

.success p {
  margin: 0;
}

.success-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-icon {
  font-size: 1.1rem;
}

.success-text {
  flex: 1;
}

/* Enhanced Error States for Form Elements */
.restore-controls.error-state {
  background: rgba(220, 53, 69, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 2px dashed rgba(220, 53, 69, 0.2);
}

/* Result area show state */
.magic-result.show {
  display: block;
  animation: resultEntrance 0.6s ease-out;
}

/* 📄 SEO Content Styles 📄 */

/* Hide SEO content visually but keep accessible to search engines */
.seo-content {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Alternative: Use CSS to show SEO content at bottom for users who want to read it */
.seo-content.visible {
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  overflow: visible;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  margin: 40px auto;
  max-width: 800px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.seo-section {
  margin-bottom: 30px;
}

.seo-section h2 {
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 15px;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.seo-section h3 {
  color: #667eea;
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.seo-section h4 {
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: bold;
}

.seo-section p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.seo-section ul, .seo-section ol {
  color: #555;
  line-height: 1.6;
  margin-left: 20px;
  margin-bottom: 15px;
}

.seo-section li {
  margin-bottom: 8px;
}

.seo-section a {
  color: #667eea;
  text-decoration: none;
  font-weight: bold;
}

.seo-section a:hover {
  text-decoration: underline;
}

.faq-item {
  background: rgba(102, 126, 234, 0.05);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
}