:root {
  --background-color: #f4f6f8;
  --surface-color: #ffffff;
  --primary-color: #007bff;
  --primary-hover-color: #0056b3;
  --featured-color: #9c27b0;
  --featured-hover-color: #7b1fa2;
  --text-color: #212529;
  --text-secondary-color: #6c757d;
  --border-color: #dee2e6;
  --positive-color: #28a745;
  --negative-color: #dc3545;
  --pending-color: #ffc107;
  --pending-bg-color: #fff8e1;
}

body[data-theme="dark"] {
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --text-color: #e0e0e0;
  --text-secondary-color: #b0b0b0;
  --border-color: #333;
  --pending-bg-color: #2f2b16;
}

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

body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: right;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.modal-open {
    overflow: hidden;
}

#app-container {
  width: 100%;
  max-width: 1200px;
}

.app-header {
  position: relative;
  text-align: center;
  margin-bottom: 3rem;
}

.header-controls {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 0.5rem;
}

.icon-button {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  overflow: hidden;
  color: var(--text-secondary-color);
}

.icon-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

#theme-toggle {
  position: relative;
}
#theme-toggle::before {
  content: '☀️';
  font-size: 20px;
  transition: transform 0.3s ease;
  position: absolute;
  transform: translateY(0);
}
#theme-toggle::after {
  content: '🌙';
  font-size: 20px;
  transition: transform 0.3s ease;
  position: absolute;
  transform: translateY(100%);
}

body[data-theme="dark"] #theme-toggle::before {
  transform: translateY(-100%);
}

body[data-theme="dark"] #theme-toggle::after {
  transform: translateY(0);
}

.app-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.app-header p {
  font-size: 1.2rem;
  color: var(--text-secondary-color);
}

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

.slider-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.slider-wrapper {
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.slide img {
  width: 100%;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.slider-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slider-container:hover .slider-button {
  opacity: 1;
}

.slider-button.prev {
  left: 1rem;
}

.slider-button.next {
  right: 1rem;
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.slider-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.dot.active {
  background-color: white;
  transform: scale(1.1);
}

.description-container {
  text-align: center;
  margin: 0 auto 3rem auto;
  max-width: 800px;
}

.description-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.description-container p {
  font-size: 1.1rem;
  color: var(--text-secondary-color);
  line-height: 1.8;
}

.demo-button {
  display: inline-block;
  margin-top: 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  font-family: 'Vazirmatn', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.demo-button:hover {
  background-color: var(--primary-hover-color);
}

.pricing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-items: center;
  margin-bottom: 4rem;
}

.pricing-plan {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  width: 100%;
  max-width: 350px;
}

.pricing-plan:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .pricing-plan:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.plan-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.price-period {
  font-size: 1rem;
  color: var(--text-secondary-color);
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  margin-bottom: 1rem;
  padding-right: 2rem;
  position: relative;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--positive-color);
  font-weight: bold;
}

.buy-button {
  display: block;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  font-family: 'Vazirmatn', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: auto;
  text-decoration: none;
  text-align: center;
}

.buy-button:hover {
  background-color: var(--primary-hover-color);
}

/* Featured Plan Styles */
.pricing-plan.featured {
  border-color: var(--featured-color);
  transform: scale(1.05);
  position: relative;
  overflow: hidden;
}

.pricing-plan.featured .plan-title {
    color: var(--featured-color);
}

.featured-badge {
  position: absolute;
  top: 15px;
  left: -35px;
  transform: rotate(-45deg);
  background-color: var(--featured-color);
  color: white;
  padding: 5px 40px;
  font-size: 0.9rem;
  text-align: center;
}


.pricing-plan.featured .buy-button {
  background-color: var(--featured-color);
}

.pricing-plan.featured .buy-button:hover {
  background-color: var(--featured-hover-color);
}

/* Crypto Ticker Section */
.crypto-ticker-section {
    text-align: center;
    margin-bottom: 4rem;
}

.crypto-ticker-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.crypto-ticker-container {
    width: 100%;
}

.crypto-ticker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.crypto-coin {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.crypto-coin img {
    width: 32px;
    height: 32px;
    margin-left: 1rem;
}

.coin-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.coin-name {
    font-weight: bold;
}

.coin-symbol {
    font-size: 0.9rem;
    color: var(--text-secondary-color);
}

.coin-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
}

.coin-price {
    font-weight: bold;
    font-size: 1.1rem;
    direction: ltr;
}

.coin-change {
    font-size: 0.9rem;
    direction: ltr;
}

.coin-change.positive {
    color: var(--positive-color);
}

.coin-change.negative {
    color: var(--negative-color);
}


/* Video Section */
.video-section {
  text-align: center;
  margin: 4rem auto;
}

.video-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.video-embed-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.app-footer {
  text-align: center;
  margin-top: 4rem;
  color: var(--text-secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.social-media-links {
  display: flex;
  gap: 2rem;
}

.social-media-links a {
  color: var(--text-secondary-color);
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.social-media-links a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.social-media-links svg {
  width: 28px;
  height: 28px;
}


/* --- Modal Styles --- */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.5s;
}

/* Payment & Tracking Modal Content Box */
.modal-content.payment-content,
.modal-content.tracking-content {
    width: 90%;
    max-width: 420px;
    height: auto;
    max-height: 95vh;
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow-y: auto;
    padding: 0;
}

.payment-modal-body,
.tracking-modal-body {
    padding: 1.5rem 2rem 2rem 2rem;
    text-align: center;
}

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

.payment-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.payment-header p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
}

.payment-instruction {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.payment-timer-wrapper {
  margin-bottom: 1rem;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.payment-timer-wrapper span {
  color: var(--text-secondary-color);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

#payment-timer {
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  direction: ltr;
  transition: color 0.3s ease;
}

#payment-timer.expired {
  color: var(--negative-color);
}

.payment-qr-code {
    margin-bottom: 1rem;
}

.payment-qr-code img {
    border-radius: 8px;
    border: 4px solid var(--surface-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body[data-theme="dark"] .payment-qr-code img {
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.payment-address-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
}

.address-info {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-grow: 1;
    margin-left: 1rem; /* Space for copy button in RTL */
}

.network-badge {
    background-color: #f3ba2f;
    color: #1e1e1e;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.75rem; /* Space between badge and address in RTL */
    flex-shrink: 0;
}

.wallet-address {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr; /* Ensure LTR for wallet address */
    flex-grow: 1;
    text-align: left;
}

.copy-address-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
}

.copy-address-btn:hover {
    background-color: var(--primary-hover-color);
}

.copy-address-btn.copied {
    background-color: var(--positive-color);
}

.copy-address-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--text-secondary-color);
}

.payment-order-id-wrapper {
    background-color: var(--background-color);
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-order-id-wrapper span {
    color: var(--text-secondary-color);
}

.payment-order-id-wrapper strong {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
    direction: ltr;
}

.payment-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

.payment-receipt-section h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-color);
}

.required-star {
    color: var(--negative-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    direction: ltr;
    text-align: left;
}

.form-input::placeholder {
    color: var(--text-secondary-color);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-input:invalid {
    border-color: var(--negative-color);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
    margin-top: 0.35rem;
}

.bot-start-hint {
    font-size: 0.85rem;
    margin-top: 0.75rem !important;
    background-color: var(--pending-bg-color);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-right: 3px solid var(--pending-color);
    color: var(--text-color);
}

.bot-start-hint a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.bot-start-hint a:hover {
    text-decoration: underline;
}

.file-input-wrapper {
    margin: 1.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding-left: 0.5rem;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.file-input-label:hover {
    background-color: var(--primary-hover-color);
}

.file-name-display {
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    flex-grow: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submit-receipt-btn,
.submit-tracking-btn {
    background-color: var(--featured-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    width: 100%;
}

.submit-receipt-btn:hover,
.submit-tracking-btn:hover {
    background-color: var(--featured-hover-color);
}

.submit-receipt-btn:disabled,
.submit-tracking-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-status-message {
    min-height: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 1rem;
}

.form-status-message.success {
    color: var(--positive-color);
}

.form-status-message.error {
    color: var(--negative-color);
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

.close-button {
  position: absolute;
  top: 15px;
  right: 25px;
  color: var(--negative-color);
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

.close-button:hover,
.close-button:focus {
  color: #ff5252;
  text-decoration: none;
}

/* --- Tracking Modal Specific Styles --- */
.tracking-modal-body h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tracking-instruction {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.tracking-icon-wrapper {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.magnifying-glass {
    width: 60px;
    height: 60px;
    border: 5px solid var(--primary-color);
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.magnifying-glass::after {
    content: '';
    position: absolute;
    bottom: -18px;
    right: -10px;
    width: 25px;
    height: 5px;
    background: var(--primary-color);
    transform: rotate(45deg);
    border-radius: 3px;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}


@media (max-width: 992px) {
  .pricing-plan.featured {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  .app-header h1 {
    font-size: 2rem;
  }
  .pricing-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .header-controls {
    top: -5px;
  }
  .payment-modal-body,
  .tracking-modal-body {
    padding: 1.5rem;
  }
}