/* Base Styles */
:root {
  --primary-color: #6a3093;
  --primary-gradient: linear-gradient(135deg, #a044ff 0%, #6a3093 100%);
  --secondary-color: #f5f5f5;
  --text-color: #333;
  --text-light: #f5f5f5;
  --accent-color: #ff9a44;
  --dark-bg: #1a1a2e;
  --card-bg: #16213e;
  --error-color: #ff4757;
  --success-color: #2ed573;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background: var(--primary-gradient);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 1.8rem;
  margin-left: 10px;
  background: linear-gradient(45deg, #fff, #a044ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo i {
  font-size: 2rem;
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
}

.user-info {
  display: none; /* Hidden initially, shown when logged in */
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--primary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.user-info:hover .user-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 154, 68, 0.3);
}

.user-info > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-info p {
  margin: 0;
  line-height: 1.2;
}

.user-info #userName {
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-info .credits {
  font-size: 12px;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-info .credits::before {
  content: '⭐';
  font-size: 10px;
  color: #ffd700;
}

/* Subscription Info */
.subscription-info {
  font-size: 11px;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.subscription-info i {
  font-size: 10px;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

/* Mobile responsive for user info */
@media (max-width: 768px) {
  .user-info {
    padding: 6px 12px;
    gap: 8px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .user-info #userName {
    font-size: 13px;
  }

  .user-info .credits {
    font-size: 11px;
  }

  .subscription-info {
    font-size: 10px;
  }

  /* Mobile navigation adjustments */
  .header-content {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .nav-links li {
    margin: 0 1rem;
  }
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 5px 15px rgba(106, 48, 147, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
}

.btn-accent:hover {
  box-shadow: 0 5px 15px rgba(255, 154, 68, 0.4);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: url('https://images.unsplash.com/photo-1518655048521-f130df041f66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80')
    no-repeat center center/cover;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.85);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #ddd;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Generator Section */
.generator-section {
  padding: 3rem 0;
}

.generator-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.generator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.generator-header h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.generator-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .generator-form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  border: 1px solid #444;
  background-color: #222;
  color: white;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(106, 48, 147, 0.2);
}

/* Center the generate button below form spanning three columns */
/* Make the generation button centered across three columns at the bottom of the form */
.generator-form .generator-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
}

.generator-actions .generator-button {
  min-width: 200px;
}

/* Story Output */
.story-output {
  display: none;
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #444;
}

.story-title h3 {
  font-size: 1.8rem;
  color: white;
}

.story-actions {
  display: flex;
  gap: 1rem;
}

.story-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  line-height: 1.8;
}

.story-content::-webkit-scrollbar {
  width: 8px;
}

.story-content::-webkit-scrollbar-track {
  background: #333;
  border-radius: 10px;
}

.story-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  backdrop-filter: blur(5px);
  overflow-y: auto;
  padding: 20px;
}

#authModal.modal-overlay {
  z-index: 1010;
}

#forgotPasswordModal.modal-overlay {
  z-index: 1010;
}

#paymentFailureModal.modal-overlay {
  z-index: 1015;
}

/* Terms and Privacy Policy modals should have higher z-index than auth modal */
#privacyPolicyModal.modal-overlay,
#termsOfServiceModal.modal-overlay {
  z-index: 1020;
}

.modal {
  position: relative;
  margin: 30px auto;
  background-color: var(--card-bg);
  border-radius: 10px;
  width: 90%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  top: 0;
  left: 0;
  transform: none;
  display: flex;
  flex-direction: column;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Hide scrollbar for Privacy Policy and Terms of Service */
/* Hide scrollbar for Privacy Policy and Terms of Service */
#privacyPolicyModal .modal-body,
#termsOfServiceModal .modal-body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

#privacyPolicyModal .modal-body::-webkit-scrollbar,
#termsOfServiceModal .modal-body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Set specific width for login/register modal */
/* Set specific width for login/register modal */
#authModal .modal,
#forgotPasswordModal .modal {
  max-width: 520px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Fixed table header style */
/* Fixed header style */
.sticky-header {
  position: sticky;
  top: 0;
  background-color: var(--card-bg);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
  font-size: 1.5rem;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 1002;
}

.modal-close:hover {
  color: var(--error-color);
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #444;
  text-align: right;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password-link {
  text-align: right;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.forgot-password-link a {
  color: var(--accent-color);
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.social-login {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.social-btn:hover {
  transform: scale(1.1);
}

.facebook {
  background-color: #3b5998;
}

.google {
  background-color: #db4437;
}

.twitter {
  background-color: #1da1f2;
}

/* User Dashboard */
.dashboard {
  display: none; /* Hidden initially, shown after login */
}

.dashboard-section {
  margin-bottom: 3rem;
}

.dashboard-header {
  margin-bottom: 1.5rem;
}

.dashboard-header h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: white;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.history-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
  cursor: pointer;
}

.history-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.history-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.history-meta {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.history-preview {
  color: #ddd;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pricing Plans */
.pricing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.pricing-card.popular {
  border-color: var(--accent-color);
  position: relative;
  overflow: hidden;
}

.popular-tag {
  position: absolute;
  top: 10px;
  right: -30px;
  background-color: var(--accent-color);
  color: white;
  padding: 5px 30px;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: bold;
}

.price {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 1rem 0;
  color: white;
}

.price-period {
  font-size: 0.9rem;
  color: #888;
  display: block;
  margin-top: -0.5rem;
}

.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-features li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success-color);
  position: absolute;
  left: 0;
}

.pricing-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.pricing-card-button {
  margin-top: auto;
  padding-top: 1rem;
}

.pricing-card h4 {
  margin-bottom: 1rem;
}

.pricing-card .btn {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
}

/* Responsive Design Optimization */
@media (max-width: 768px) {
  .pricing-plans {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pricing-card {
    min-height: 280px;
    padding: 1.2rem;
  }

  .pricing-card h4 {
    font-size: 1.2rem;
  }

  .price {
    font-size: 2rem;
  }

  .pricing-features {
    font-size: 0.9rem;
  }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

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

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loading-text {
  margin-top: 1rem;
  color: white;
  font-size: 1.2rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  min-width: 250px;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease forwards;
}

.toast.success {
  background-color: var(--success-color);
  color: white;
  border: 2px solid #16a34a; /* deep green border */
  box-shadow: 0 0 10px #21c52180;
}

.toast.error {
  background-color: var(--error-color);
  color: white;
}

.toast i {
  margin-right: 10px;
  font-size: 1.2rem;
}

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

/* Footer */
footer {
  background-color: var(--card-bg);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 1rem 0;
}

.footer-links li {
  margin: 0 1rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.copyright {
  color: #666;
  font-size: 0.9rem;
}

/* Policy Content Styles */
.policy-content {
  color: var(--text-light);
  line-height: 1.6;
}

.policy-content h4 {
  color: var(--accent-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.policy-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
}

.policy-date {
  margin-top: 2rem;
  font-style: italic;
  color: #888;
  text-align: right;
}

/* About Section Styles */
.about-section {
  padding: 3rem 0;
  padding-top: 6rem; /* Increase top padding to ensure title is not covered */
  background-color: var(--dark-bg);
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-header p {
  font-size: 1.2rem;
  color: #ddd;
  max-width: 800px;
  margin: 0 auto;
}

.about-intro {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
}

@media (max-width: 768px) {
  .about-intro {
    flex-direction: column;
  }
}

.about-image {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.about-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-features {
  margin-bottom: 3rem;
}

.about-features h3,
.about-team h3,
.contact-section h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--accent-color);
}

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

.feature-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.feature-card p {
  color: #ddd;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.team-member {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-member img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.team-member h4 {
  padding: 1rem 1rem 0.5rem;
  font-size: 1.2rem;
  color: white;
}

.team-member p {
  padding: 0 1rem;
  color: #ddd;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.team-member p:last-child {
  padding-bottom: 1rem;
  font-style: italic;
  color: #aaa;
}

.contact-container {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-item i {
  font-size: 1.8rem;
  color: var(--accent-color);
  width: 35px;
  text-align: center;
  margin-right: 15px;
  margin-top: 3px;
  display: flex;
  justify-content: center;
}

/* Special handling for building icon */
/* Special handling for building icon */
.contact-item .fa-building {
  font-size: 1.7rem;
}

/* Company name style */
/* Company name style */
.company-name {
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.5px;
  line-height: 1.4;
  text-shadow: 0 0 10px rgba(106, 48, 147, 0.5);
}

.company-name:first-child {
  margin-bottom: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.social-link:hover {
  transform: scale(1.1);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.contact-form .btn {
  width: 100%;
}

/* Verification code style */
/* Verification code style */
.verification-code {
  margin-bottom: 1.5rem;
}

.verification-flex {
  display: flex;
  gap: 10px;
}

.verification-flex .form-control {
  flex: 1;
}

.verification-flex .btn {
  white-space: nowrap;
  padding: 8px 12px;
}

/* History List Style - New Version */
.history-list-container {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.history-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-list-header h3 {
  font-size: 1.5rem;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.history-list-count {
  font-size: 0.9rem;
  color: #aaa;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table thead th {
  text-align: left;
  padding: 1rem 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--accent-color);
  font-weight: 500;
}

.history-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.history-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.history-table tr:last-child {
  border-bottom: none;
}

.history-table td {
  padding: 1rem 0.5rem;
  vertical-align: middle;
}

.history-table .history-title {
  font-weight: 500;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-table .history-meta {
  color: #aaa;
  font-size: 0.85rem;
}

.history-table .history-preview {
  color: #ddd;
  font-size: 0.9rem;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-table .history-actions {
  text-align: right;
  width: 100px;
  white-space: nowrap;
}

.delete-story-btn,
.view-story-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem;
  opacity: 0.7;
  transition: all 0.2s ease;
  margin-left: 5px;
}

.delete-story-btn {
  color: var(--error-color);
}

.delete-story-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.view-story-btn {
  color: var(--accent-color);
}

.view-story-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-info {
  font-size: 0.9rem;
  color: #aaa;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

.pagination-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ddd;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.1);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Confirm Delete Modal */
.confirm-modal {
  max-width: 500px;
  width: 90%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background-color: var(--card-bg);
}

.confirm-modal .modal-header {
  padding: 20px 25px;
  background: var(--primary-gradient);
  border-bottom: none;
}

.confirm-modal .modal-header h3 {
  font-size: 1.5rem;
  margin: 0;
}

.confirm-modal .modal-content {
  padding: 30px;
  text-align: center;
}

.confirm-modal p {
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #f5f5f5;
}

.confirm-modal .btn-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.confirm-modal .btn {
  min-width: 130px;
  padding: 12px 25px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.confirm-modal .cancel-btn {
  background-color: transparent;
  border: 1px solid #aaa;
  color: #ddd;
}

.confirm-modal .cancel-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.confirm-modal .delete-btn {
  background-color: var(--error-color);
  font-weight: 500;
}

.confirm-modal .delete-btn:hover {
  background-color: #ff3545;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
}

/* Contact Modal Styles */
.contact-modal-content {
  padding: 1rem 0;
}

.company-info {
  text-align: center;
  margin-bottom: 2rem;
}

.company-info h4 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(106, 48, 147, 0.5);
}

.company-info p {
  font-size: 1.1rem;
  color: #aaa;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-icon {
  flex: 0 0 50px;
  height: 50px;
  background-color: rgba(106, 48, 147, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  box-shadow: 0 0 15px rgba(255, 154, 68, 0.3);
  border: 1px solid rgba(255, 154, 68, 0.4);
}

.contact-icon i {
  color: var(--accent-color);
  font-size: 1.8rem;
}

.contact-details h5 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-details p {
  color: #ccc;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* New style - Company name style */
/* New style - company name style */
.contact-details h5 + p {
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.contact-details h5 + p + p {
  color: #fff;
  font-weight: bold;
  margin-top: -0.3rem;
  letter-spacing: 0.5px;
}

.contact-map {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.map-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.social-links {
  text-align: center;
}

.social-links h5 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--accent-color);
  color: #fff;
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

#contactModal .modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-height: 90vh;
  overflow-y: auto;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
}

.tab {
  padding: 1rem 1.5rem;
  cursor: pointer;
  color: #aaa;
  position: relative;
  transition: all 0.3s ease;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  color: var(--accent-color);
  font-weight: 500;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Footer Contact Styles */
.footer-contact {
  margin: 1.5rem 0;
  text-align: left;
}

.footer-contact h3 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin: 0 auto;
  max-width: 500px;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  transition: transform 0.3s;
}

.contact-item:hover {
  transform: translateY(-3px);
}

.contact-item i {
  font-size: 1.4rem;
  color: var(--accent-color);
  margin-right: 12px;
  width: 25px;
  display: flex;
  justify-content: center;
}

.contact-item p {
  color: #ddd;
  font-size: 0.9rem;
  margin: 0;
}

.contact-item .company-name {
  color: #fff;
  font-weight: bold;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    max-width: 100%;
  }
}

/* Order Status Styles */
.order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-completed {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-failed {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-unknown {
  background-color: rgba(108, 117, 125, 0.2);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.3);
}

/* Pagination Ellipsis */
.pagination-ellipsis {
  padding: 8px 12px;
  color: #999;
  font-weight: 500;
  user-select: none;
}

/* Enhanced Table Styles for Purchase History */
.history-table td:last-child {
  text-align: center;
}

.history-table th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

/* Enhanced Button Loading State */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Responsive Pagination */
@media (max-width: 768px) {
  .pagination-container {
    flex-direction: column;
    gap: 1rem;
  }

  .pagination-info {
    text-align: center;
  }

  .pagination-controls {
    justify-content: center;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

/* Enhanced Toast Messages */
.toast.info {
  background: linear-gradient(135deg, #17a2b8, #138496);
  border-left: 4px solid #0c5460;
}

.toast.warning {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  border-left: 4px solid #b69500;
  color: #212529;
}

/* Enhanced Modal Styles */
.modal-overlay {
  backdrop-filter: blur(5px);
}

/* Improved Loading States */
.loading-text {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #ddd;
}

/* Enhanced Purchase History Table */
#purchaseHistoryTable {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#purchaseHistoryTable thead {
  background: rgba(106, 48, 147, 0.2);
}

#purchaseHistoryTable tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

#purchaseHistoryTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: none; /* Override existing transform */
}

/* Improved Form Controls */
.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Enhanced User Credits Display */
.credits {
  background: rgba(255, 154, 68, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 154, 68, 0.3);
}

/* Improved Generator Actions */
.generator-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.generator-button {
  min-width: 200px;
  padding: 12px 24px;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.generator-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.5s;
}

.generator-button:hover::before {
  left: 100%;
}

/* Enhanced Purchase Card Styles */
.pricing-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(255, 154, 68, 0.2);
}

.pricing-card.popular {
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(106, 48, 147, 0.3);
}

/* Enhanced Story Output */
.story-output {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.story-header {
  background: rgba(106, 48, 147, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth Animations */
* {
  transition: all 0.3s ease;
}

button,
.btn {
  transition: all 0.2s ease;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.pagination-btn:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .modal-overlay,
  .loading-overlay,
  .toast-container {
    display: none !important;
  }
}
