/* AI Social Media App Custom Styles */

:root {
  --ai-primary: #007cba;
  --ai-secondary: #6c757d;
  --ai-success: #28a745;
  --ai-danger: #dc3545;
  --ai-warning: #ffc107;
  --ai-info: #17a2b8;
  --ai-light: #f8f9fa;
  --ai-dark: #343a40;
  --ai-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Main App Container */
#ai-social-media-app {
  min-height: 100vh;
  background: var(--ai-light);
}

/* Navigation Enhancements */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Sidebar Styling */
.sidebar {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 20px;
}

.sidebar .list-group-item {
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0;
}

.sidebar .list-group-item:hover {
  background-color: var(--ai-light);
  color: var(--ai-primary);
}

.sidebar .list-group-item.active {
  background: var(--ai-gradient);
  border-color: transparent;
  color: white;
}

/* Card Enhancements */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  border-radius: 1rem 1rem 0 0 !important;
}

/* Post Card Specific Styles */
.post-card {
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.post-card .card-body {
  padding: 1.5rem;
}

.post-card .post-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.post-card .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Button Enhancements */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--ai-gradient);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline-primary {
  border-color: var(--ai-primary);
  color: var(--ai-primary);
}

.btn-outline-primary:hover {
  background: var(--ai-primary);
  border-color: var(--ai-primary);
}

/* Form Enhancements */
.form-control, .form-select {
  border-radius: 0.5rem;
  border: 2px solid #e9ecef;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--ai-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
}

.form-floating {
  margin-bottom: 1rem;
}

/* Badge Styling */
.badge {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.ai-coins-badge {
  background: var(--ai-gradient);
  color: white;
  font-weight: 600;
}

/* Modal Enhancements */
.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  border-radius: 1rem 1rem 0 0;
}

.modal-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
  border-radius: 0 0 1rem 1rem;
}

/* Activity Feed */
.activity-feed {
  max-height: 600px;
  overflow-y: auto;
}

.activity-feed::-webkit-scrollbar {
  width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: var(--ai-primary);
  border-radius: 10px;
}

/* User Profile Card */
.profile-card {
  background: var(--ai-gradient);
  color: white;
  text-align: center;
}

.profile-card .profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
}

/* Stats Cards */
.stats-card {
  background: white;
  border-left: 4px solid var(--ai-primary);
}

.stats-card .stats-icon {
  font-size: 2rem;
  color: var(--ai-primary);
}

/* Subscription Plans */
.plan-card {
  position: relative;
  transition: all 0.3s ease;
}

.plan-card:hover {
  transform: scale(1.05);
  z-index: 2;
}

.plan-card.featured {
  border: 2px solid var(--ai-primary);
  transform: scale(1.05);
}

.plan-card .plan-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ai-primary);
}

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

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .sidebar {
    position: static;
    margin-bottom: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .post-card .post-image {
    height: 200px;
  }
}

/* Admin Panel Specific Styles */
.admin-panel {
  background: #f8f9fa;
  min-height: 100vh;
}

.admin-nav {
  background: white;
  border-bottom: 1px solid #dee2e6;
}

.admin-card {
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.settings-section h5 {
  color: var(--ai-primary);
  border-bottom: 2px solid var(--ai-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-gradient {
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--ai-gradient);
}

.shadow-lg {
  box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
}

.rounded-xl {
  border-radius: 1rem !important;
}

.border-gradient {
  border: 2px solid;
  border-image: var(--ai-gradient) 1;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Social Media Icons */
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.social-icon.like { background: #e74c3c; }
.social-icon.comment { background: #3498db; }
.social-icon.share { background: #2ecc71; }

/* AI Generation Interface */
.ai-generator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 1rem;
  padding: 2rem;
}

.ai-generator .form-control {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}

.ai-generator .form-control::placeholder {
  color: rgba(255,255,255,0.7);
}

.ai-generator .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --ai-light: #2c3e50;
    --ai-dark: #ecf0f1;
  }
  
  .card {
    background: #34495e;
    color: #ecf0f1;
  }
  
  .navbar {
    background: #2c3e50 !important;
  }
}