* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #ffffff;
  padding: 20px;
  animation: backgroundShift 10s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
  0% { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); }
  100% { background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%); }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
  background-size: 400% 400%;
  animation: gradientMove 3s ease-in-out infinite;
}

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

.header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 12px;
  font-weight: 500;
}

.form-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.api-input {
  width: 100%;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.api-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.api-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.dropzone {
  border: 3px dashed rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.dropzone::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);
  transition: all 0.6s;
  opacity: 0;
}

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

.dropzone:hover::before {
  animation: shimmer 1.5s infinite;
}

.dropzone:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.upload-icon {
  font-size: 60px;
  opacity: 0.8;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.upload-text {
  font-size: 1.3rem;
  font-weight: 600;
}

.upload-hint {
  font-size: 1rem;
  opacity: 0.8;
}

.preview {
  margin-top: 24px;
  text-align: center;
}

.preview img,
.preview video {
  max-width: 100%;
  max-height: 350px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.caption-input {
  width: 100%;
  min-height: 130px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  resize: vertical;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.caption-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.caption-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

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

.platform-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.platform-card:hover::before {
  left: 100%;
}

.platform-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Platform-specific colors */
.platform-card.selected.facebook { border-color: #1877f2; background: rgba(24, 119, 242, 0.3); }
.platform-card.selected.instagram { border-color: #E4405F; background: rgba(228, 64, 95, 0.3); }
.platform-card.selected.twitter { border-color: #1DA1F2; background: rgba(29, 161, 242, 0.3); }
.platform-card.selected.linkedin { border-color: #0077B5; background: rgba(0, 119, 181, 0.3); }
.platform-card.selected.youtube { border-color: #FF0000; background: rgba(255, 0, 0, 0.3); }
.platform-card.selected.tiktok { border-color: #000000; background: rgba(0, 0, 0, 0.4); }
.platform-card.selected.pinterest { border-color: #BD081C; background: rgba(189, 8, 28, 0.3); }
.platform-card.selected.snapchat { border-color: #FFFC00; background: rgba(255, 252, 0, 0.3); }
.platform-card.selected.reddit { border-color: #FF4500; background: rgba(255, 69, 0, 0.3); }
.platform-card.selected.telegram { border-color: #0088cc; background: rgba(0, 136, 204, 0.3); }
.platform-card.selected.threads { border-color: #000000; background: rgba(0, 0, 0, 0.4); }
.platform-card.selected.bluesky { border-color: #00A8E8; background: rgba(0, 168, 232, 0.3); }
.platform-card.selected.google { border-color: #4285F4; background: rgba(66, 133, 244, 0.3); }

.platform-checkbox {
  display: none;
}

.platform-icon {
  font-size: 32px;
  width: 40px;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.platform-name {
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.post-button {
  width: 100%;
  padding: 22px;
  background: linear-gradient(135deg, #4ade80, #22c55e, #16a34a);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
}

.post-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.post-button:hover:not(:disabled)::before {
  left: 100%;
}

.post-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #22c55e, #16a34a, #15803d);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(74, 222, 128, 0.6);
}

.post-button:disabled {
  background: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 16px;
  font-weight: 600;
  display: none;
  white-space: pre-wrap;
  line-height: 1.6;
  backdrop-filter: blur(10px);
  border: 1px solid transparent;
}

.status.success {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.status.error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.status.info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.9;
  font-size: 1.1rem;
  font-weight: 500;
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
}

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

.stats {
  display: flex;
  justify-content: space-around;
  margin: 30px 0;
  padding: 25px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  background: linear-gradient(135deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 4px;
  font-weight: 500;
}

.file-info {
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: none;
  backdrop-filter: blur(10px);
}

.file-info.show {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin-top: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* AI Button */
.ai-button {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 14px 20px;
  margin: 10px 0;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.ai-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.ai-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .platforms-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }
  
  .platform-card {
    padding: 16px;
  }
  
  h1 {
    font-size: 2.2rem;
  }

  .stats {
    flex-direction: column;
    gap: 20px;
  }

  .logo {
    flex-direction: column;
    gap: 12px;
  }
}
