/* ============================================
   GLOBAL STYLES
   ============================================ */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  
  body {
    background: linear-gradient(rgba(241, 245, 249, 1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(241, 245, 249, 1) 1px, transparent 1px),
      linear-gradient(rgba(241, 245, 249, 0.7) 1px, transparent 1px),
      linear-gradient(90deg, rgba(241, 245, 249, 0.7) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
    background-color: #f8fafc;
    min-height: 100vh;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  /* ============================================
     HEADER
     ============================================ */
  .header {
    background: #fff;
    padding: 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .header_block {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .header .logo {
    height: 32px;
  }
  
  .links_block {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  
  .links_block .link {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: color 0.3s;
  }
  
  .links_block .link:hover {
    color: #e11d48;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .contact {
    padding: 10px 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .contact:hover {
    background: #333;
    transform: translateY(-2px);
  }
  
  /* Burger Menu */
  .burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
  }
  
  .burger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #000;
    border-radius: 1px;
    transition: all 0.3s ease;
  }
  
  .burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  
  .burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Mobile Nav */
  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 1000;
    padding: 80px 20px 20px;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .mobile-nav.active {
    display: flex;
    transform: translateX(0);
  }
  
  .mobile-link {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    padding: 8px 0;
    transition: color 0.3s;
  }
  
  .mobile-link:hover {
    color: #e11d48;
  }
  
  .mobile-contact-btn {
    padding: 14px 32px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
  }
  
  /* ============================================
     MAIN SECTION
     ============================================ */
  .main {
    padding: 40px 0 60px;
  }
  
  .main_block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  
  /* Invoice Card */
  .funds-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  }
  
  .funds-title {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
  }
  
  .funds-amount-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  
  .funds-amount {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
  }
  
  .funds-details {
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
  }
  
  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .detail-row:last-child {
    border-bottom: none;
  }
  
  .detail-label {
    font-size: 14px;
    color: #6b7280;
  }
  
  .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
  }
  
  .detail-value.pending {
    color: #f59e0b;
  }
  
  /* Timer & Button Container */
  .button-timer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
  }
  
  .expiration-timer {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .timer-progress-circle {
    flex-shrink: 0;
  }
  
  .timer-content {
    text-align: left;
  }
  
  .timer-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: lowercase;
  }
  
  .timer-display {
    font-size: 18px;
    font-weight: 700;
    color: #e11d48;
    font-family: 'Courier New', monospace;
  }
  
  .help-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    animation: help-pulse 2s infinite;
  }
  
  .help-icon:hover {
    background: #fef2f2;
    transform: scale(1.1);
    animation: none;
  }
  
  .help-icon svg {
    width: 12px;
    height: 12px;
    fill: #e11d48;
  }
  
  @keyframes help-pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
    }
    50% {
      transform: scale(1.05);
      box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
    }
  }
  
  /* Confirm Button */
  .receive-btn {
    padding: 14px 32px;
    background: #e11d48;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.3);
  }
  
  .receive-btn:hover:not(:disabled) {
    background: #be185d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
  }
  
  .receive-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
  }
  
  .receive-btn.connected {
    background: #26a17b;
  }
  
  .receive-btn.loading {
    opacity: 0.7;
  }
  
  /* PDF Section */
  .pdf-receipt-section {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
  }
  
  .pdf-receipt-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.5;
  }
  
  .download-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #e11d48;
    border-radius: 25px;
    color: #e11d48;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .download-pdf-btn:hover {
    background: #e11d48;
    color: #fff;
    transform: translateY(-2px);
  }
  
  /* ============================================
     PROGRESS STEPS
     ============================================ */
  .info-notice {
    max-width: 320px;
    width: 100%;
  }
  
  .progress-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
  }
  
  .progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 24px;
    width: 2px;
    height: 20px;
    background-color: #e0e0e0;
  }
  
  .progress-step.completed::after {
    background-color: #26a17b;
  }
  
  .progress-step.active::after {
    background-color: #ff9500;
  }
  
  .step-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    background-color: #e0e0e0;
  }
  
  .progress-step.completed .step-icon {
    background-color: #26a17b;
    border-color: #26a17b;
  }
  
  .progress-step.active .step-icon {
    background-color: #ff9500;
    border-color: #ff9500;
    position: relative;
    animation: pulse-icon 2s infinite;
  }
  
  .progress-step.active .step-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
  }
  
  @keyframes pulse-icon {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.7);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 0 6px rgba(255, 149, 0, 0);
    }
  }
  
  .step-text {
    font-size: 14px;
    color: #666;
  }
  
  .progress-step.completed .step-text {
    color: #26a17b;
    font-weight: 500;
  }
  
  .progress-step.active .step-text {
    color: #ff9500;
    font-weight: 500;
    animation: pulse-text 2s infinite;
  }
  
  @keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
  }
  
  /* ============================================
     FOOTER
     ============================================ */
  .footer {
    background: #111827;
    padding: 60px 0 40px;
    color: #fff;
  }
  
  .footer-cta {
    text-align: center;
    margin-bottom: 60px;
  }
  
  .footer-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 24px;
  }
  
  .btn-get-app {
    padding: 14px 40px;
    background: #e11d48;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .btn-get-app:hover {
    background: #be185d;
    transform: translateY(-2px);
  }
  
  .links_block_footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
  }
  
  .block_footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .title_fot {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
  }
  
  .link_footer {
    font-size: 13px;
    color: #9ca3af;
    transition: color 0.3s;
  }
  
  .link_footer:hover {
    color: #fff;
  }
  
  .apps {
    height: 36px;
    margin-top: 4px;
  }
  
  .footer-divider {
    border: none;
    border-top: 1px solid #374151;
    margin: 40px 0;
  }
  
  .footer_down {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .logo_foot {
    height: 24px;
  }
  
  .copyright {
    font-size: 12px;
    color: #9ca3af;
  }
  
  .footer-social {
    display: flex;
    gap: 16px;
  }
  
  .ico {
    width: 24px;
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.3s;
  }
  
  .ico:hover {
    opacity: 1;
  }
  
  /* ============================================
     TOOLTIPS & MODALS
     ============================================ */
  .help-tooltip {
    position: fixed;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9999;
    width: 280px;
    max-width: calc(100vw - 40px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .help-tooltip.show {
    opacity: 1;
    visibility: visible;
  }
  
  .tooltip-title {
    font-weight: 700;
    color: #e11d48;
    margin-bottom: 8px;
  }
  
  .tooltip-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
  }
  
  .pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  
  .pdf-modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .pdf-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
  }
  
  .pdf-modal-overlay.active .pdf-modal {
    transform: scale(1);
  }
  
  .pdf-modal-text {
    font-size: 16px;
    color: #374151;
    margin-bottom: 24px;
    line-height: 1.5;
  }
  
  .pdf-modal-btn {
    padding: 12px 40px;
    background: #e11d48;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .pdf-modal-btn:hover {
    background: #be185d;
  }
  
  /* ============================================
     GENERATE LINK PAGE
     ============================================ */
  .generate-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
  }
  
  .generate-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  }
  
  .generate-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
  }
  
  .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
  }
  
  .form-input:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
  }
  
  .form-input.error {
    border-color: #e11d48;
  }
  
  .form-error {
    display: none;
    font-size: 13px;
    color: #e11d48;
    margin-top: 6px;
  }
  
  .form-error.show {
    display: block;
  }
  
  .btn-generate {
    width: 100%;
    padding: 16px;
    background: #e11d48;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.3);
  }
  
  .btn-generate:hover {
    background: #be185d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
  }
  
  .result-box {
    display: none;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid #e11d48;
  }
  
  .result-box.show {
    display: block;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .result-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
  }
  
  .result-input-wrapper {
    display: flex;
    gap: 12px;
  }
  
  .result-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #f9fafb;
  }
  
  .btn-copy {
    padding: 12px 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .btn-copy:hover {
    background: #333;
  }
  
  .btn-copy.copied {
    background: #26a17b;
  }
  
  .link-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: #e11d48;
    font-size: 14px;
    font-weight: 500;
    transition: gap 0.3s;
  }
  
  .link-open:hover {
    gap: 12px;
  }
  
  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.3s;
  }
  
  .back-link:hover {
    color: #e11d48;
    gap: 12px;
  }
  
  /* ============================================
     DEBUG PANEL
     ============================================ */
  .debug-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #00ff88;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
  }
  
  .debug-panel h4 {
    margin-bottom: 8px;
    color: #fff;
  }
  
  .debug-log {
    padding: 2px 0;
    border-bottom: 1px solid #333;
  }
  
  .debug-log.error {
    color: #ff6b6b;
  }
  
  .debug-log.success {
    color: #00ff88;
  }
  
  .debug-log.info {
    color: #74b9ff;
  }
  
  /* ============================================
     RESPONSIVE
     ============================================ */
  @media (max-width: 768px) {
    .desktop-nav,
    .desktop-contact {
      display: none;
    }
  
    .burger-menu {
      display: flex;
    }
  
    .funds-card {
      padding: 24px 16px;
    }
  
    .funds-amount {
      font-size: 28px;
    }
  
    .button-timer-container {
      flex-direction: column;
      gap: 16px;
    }
  
    .expiration-timer {
      width: 100%;
      justify-content: center;
    }
  
    .receive-btn {
      width: 100%;
    }
  
    .footer-title {
      font-size: 20px;
    }
  
    .links_block_footer {
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }
  
    .footer_down {
      flex-direction: column;
      text-align: center;
    }
  
    .generate-card {
      padding: 24px 16px;
    }
  }
  
  @media (max-width: 480px) {
    .links_block_footer {
      grid-template-columns: 1fr;
    }
  }