/* landingchatsearch.css - استایل‌های صفحه لندینگ چت و جستجو */

:root {
  --primary-blue: #2563eb;
  --light-blue: #eff6ff;
  --dark-blue: #1e40af;
  --accent-blue: #3b82f6;
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  --gradient-secondary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-accent: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-bg-strong: rgba(255, 255, 255, 0.25);
  --glass-blur: blur(10px);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.15);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-light: #6b7280;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition: all 0.2s ease;
}

/* Reset and Base Styles */
.landing-container {
  min-height: 100vh;
  background: var(--gradient-primary);
  position: relative;
  overflow-x: hidden;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Background Elements - Islamic Geometric Pattern */
.background-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
    linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.05) 49%, rgba(255, 255, 255, 0.05) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.05) 49%, rgba(255, 255, 255, 0.05) 51%, transparent 52%),
    linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
  background-size: 60px 60px, 40px 40px, 80px 80px, 80px 80px, 80px 80px, 100% 100%;
}

/* Floating Islamic Elements */
.floating-element {
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.5rem;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.element-1 {
  top: 15%;
  left: 15%;
  animation-delay: 0s;
}

.element-2 {
  top: 25%;
  right: 15%;
  animation-delay: 2s;
}

.element-3 {
  top: 60%;
  left: 20%;
  animation-delay: 4s;
}

.element-4 {
  top: 70%;
  right: 20%;
  animation-delay: 6s;
}

.element-5 {
  top: 40%;
  left: 10%;
  animation-delay: 1s;
}

.element-6 {
  top: 50%;
  right: 10%;
  animation-delay: 3s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.6;
  }
}

/* Header Section */
.landing-header {
  position: relative;
  z-index: 10;
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

.brand-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.logo-container {
  width: 80px;
  height: 80px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.logo-icon {
  font-size: 2.5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-text {
  text-align: center;
}

.brand-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.025em;
}

.brand-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0.5rem 0 0 0;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Search Section */
.main-search-section {
  position: relative;
  z-index: 10;
  padding: 0.5rem 0 4rem 0;
  display: flex;
  align-items: center;
  min-height: 50vh;
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

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

.search-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #01a1ff;
  margin: 0 0 1rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
}

.search-input-container {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-form {
  margin-bottom: 2rem;
}

.input-group {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  font-size: 1.1rem;
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text-primary);
  resize: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
  background: white;
}

.search-input::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.btn-search {
  background: var(--primary-blue);
  border: none;
  border-radius: var(--border-radius);
  padding: 1.5rem 2rem;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  min-width: 140px;
  justify-content: center;
}

.btn-search:hover {
  background: var(--dark-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-search:active {
  transform: translateY(0);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.mode-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 1rem 2rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  box-shadow: var(--shadow-soft);
}

.mode-btn:hover {
  background: white;
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.mode-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-medium);
}

/* Results Section */
.results-section {
  position: relative;
  z-index: 10;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  min-height: 50vh;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.results-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-back {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-soft);
}

.btn-back:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.results-container {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 300px;
}

/* Chat Section */
.chat-section {
  position: relative;
  z-index: 10;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  min-height: 60vh;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.chat-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chat-container {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-input-container {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-form .input-group {
  margin: 0;
}

.chat-input {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  padding: 1rem;
  font-size: 1rem;
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text-primary);
  resize: none;
  transition: var(--transition);
}

.chat-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  background: white;
}

.btn-send {
  background: var(--primary-blue);
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  box-shadow: var(--shadow-soft);
}

.btn-send:hover {
  background: var(--dark-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

/* Message Styles */
.message {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  max-width: 80%;
  word-wrap: break-word;
  animation: fadeInUp 0.3s ease-out;
}

.message.user {
  background: var(--primary-blue);
  color: white;
  align-self: flex-end;
  margin-right: 0;
  margin-left: auto;
  box-shadow: var(--shadow-soft);
}

.message.assistant {
  background: white;
  color: var(--text-primary);
  align-self: flex-start;
  margin-left: 0;
  margin-right: auto;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .brand-title {
    font-size: 2rem;
  }

  .brand-subtitle {
    font-size: 1rem;
  }

  .search-title {
    font-size: 1.5rem;
  }

  .search-description {
    font-size: 1rem;
  }

  .search-input-container {
    padding: 1.5rem;
  }

  .input-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
  }

  .mode-toggle {
    flex-direction: column;
    gap: 0.5rem;
  }

  .mode-btn {
    width: 100%;
    justify-content: center;
  }

  .results-header,
  .chat-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .btn-back {
    align-self: center;
  }

  .chat-container {
    height: 400px;
  }

  .floating-shape {
    display: none;
  }
}

@media (max-width: 480px) {
  .landing-header {
    padding: 1rem 0;
  }

  .main-search-section {
    padding: 1rem 0 2rem 0;
  }

  .search-input-container {
    padding: 1rem;
  }

  .search-input {
    padding: 1rem;
    font-size: 1rem;
  }

  .btn-search {
    padding: 1rem;
    font-size: 1rem;
  }

  .brand-title {
    font-size: 1.8rem;
  }

  .logo-container {
    width: 60px;
    height: 60px;
  }

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

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

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

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}