:root {
      --primary-color: #5B21B6;
      --primary-light: #7C3AED;
      --success-color: #10B981;
      --danger-color: #EF4444;
      --warning-color: #F59E0B;
      --dark: #1F2937;
      --gray: #6B7280;
      --light-gray: #F3F4F6;
      --card-radius: 24px;
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
      background: #0F172A;
      min-height: 100vh;
      color: #F8FAFC;
      position: relative;
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(34, 211, 238, 0.3) 0%, transparent 50%);
      z-index: -1;
    }

    .container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 20px 40px;
    }

    header {
      text-align: center;
      margin-bottom: 60px;
      padding-top: 40px;
    }

    .logo-container {
      display: inline-block;
      position: relative;
      margin-bottom: 20px;
    }

    .logo-wrapper {
      display: flex;
      align-items: center;
      gap: 20px;
      justify-content: center;
    }

    .logo-icon {
      position: relative;
      animation: float 3s ease-in-out infinite;
    }

    .logo-text {
      font-size: 3.5rem;
      font-weight: 700;
      background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #22D3EE 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      letter-spacing: -3px;
      animation: glow 3s ease-in-out infinite;
    }

    @keyframes float {
      0%, 100% { 
        transform: translateY(0px) rotate(0deg);
      }
      33% { 
        transform: translateY(-5px) rotate(1deg);
      }
      66% { 
        transform: translateY(3px) rotate(-1deg);
      }
    }

    @keyframes glow {
      0%, 100% { filter: brightness(1); }
      50% { filter: brightness(1.2); }
    }

    .subtitle {
      font-size: 1.25rem;
      color: #94A3B8;
      font-weight: 400;
      letter-spacing: 0.5px;
      margin-bottom: 10px;
    }

    .tech-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(139, 92, 246, 0.1);
      border: 1px solid rgba(139, 92, 246, 0.3);
      padding: 8px 16px;
      border-radius: 100px;
      font-size: 0.875rem;
      color: #A78BFA;
      font-family: 'JetBrains Mono', monospace;
    }

    .search-container {
      max-width: 600px;
      margin: 0 auto 50px;
      position: relative;
    }

    .search-input {
      width: 100%;
      padding: 18px 24px 18px 56px;
      font-size: 1rem;
      font-family: 'Space Grotesk', sans-serif;
      border: 2px solid rgba(139, 92, 246, 0.2);
      border-radius: 16px;
      background: rgba(30, 41, 59, 0.5);
      backdrop-filter: blur(12px);
      color: white;
      transition: all 0.3s ease;
    }

    .search-icon {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      color: #64748B;
    }

    .search-input:focus {
      outline: none;
      border-color: #8B5CF6;
      box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    }

    .search-input::placeholder {
      color: #64748B;
    }

    .category-section {
      margin-bottom: 60px;
      padding: 0 20px;
    }

    .category-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 30px;
    }

    .category-icon {
      font-size: 2rem;
    }

    .category-title {
      font-size: 2rem;
      font-weight: 600;
      background: linear-gradient(135deg, #F8FAFC 0%, #CBD5E1 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 24px;
      padding: 0 20px;
    }

    .card {
      background: rgba(30, 41, 59, 0.5);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(148, 163, 184, 0.1);
      border-radius: var(--card-radius);
      padding: 28px;
      position: relative;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      overflow: hidden;
      z-index: 1;
    }

    .card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--brand-color) 0%, var(--brand-color-light) 100%);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.4s ease;
    }

    .card:hover::before {
      transform: scaleX(1);
    }

    .card:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: var(--shadow-xl);
      border-color: rgba(139, 92, 246, 0.3);
      z-index: 10;
    }

    .card-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 16px;
    }

    .card-logo-wrapper {
      width: 64px;
      height: 64px;
      background: white;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow-md);
      padding: 8px;
    }

    .card h3 {
      font-size: 1.5rem;
      font-weight: 600;
      color: #F8FAFC;
      letter-spacing: -0.5px;
    }

    .card-description {
      color: #94A3B8;
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 16px;
    }

    .card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 20px;
    }

    .card-type {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(139, 92, 246, 0.1);
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 0.75rem;
      color: #A78BFA;
      font-family: 'JetBrains Mono', monospace;
      font-weight: 600;
    }

    .card-arrow {
      color: #64748B;
      transition: all 0.3s ease;
    }

    .card:hover .card-arrow {
      transform: translateX(4px);
      color: #A78BFA;
    }

    /* Brand colors */
    .card.tesco { --brand-color: #00539f; --brand-color-light: #0080ff; }
    .card.billa { --brand-color: #ffcc00; --brand-color-light: #ffd633; }
    .card.kaufland { --brand-color: #e11e2d; --brand-color-light: #ff4757; }
    .card.lidl { --brand-color: #0050AA; --brand-color-light: #2196F3; }
    .card.coop { --brand-color: #EE3124; --brand-color-light: #ff4757; }
    .card.fresh { --brand-color: #10B981; --brand-color-light: #34D399; }
    .card.dm { --brand-color: #e30613; --brand-color-light: #ff1744; }
    .card.fann { --brand-color: #E91E63; --brand-color-light: #F06292; }
    .card.drmax { --brand-color: #00a85f; --brand-color-light: #00d68f; }
    .card.benu { --brand-color: #6a1b9a; --brand-color-light: #9c27b0; }
    .card.dracik { --brand-color: #ED7203; --brand-color-light: #ff8a50; }
    .card.sportisimo { --brand-color: #004B93; --brand-color-light: #0066cc; }
    .card.cba { --brand-color: #E30613; --brand-color-light: #ff1744; }
    .card.exisport { --brand-color: #FF0000; --brand-color-light: #ff3333; }
    .card.kik { --brand-color: #E74C3C; --brand-color-light: #ff6b6b; }
    .card.najlepsia { --brand-color: #E91E63; --brand-color-light: #F06292; }
    .card.shell { --brand-color: #FCD900; --brand-color-light: #ffe033; }
    .card.slovnaft { --brand-color: #00A0E3; --brand-color-light: #33b5ff; }

    .overlay {
      display: none;
      position: fixed;
      inset: 0;
      background-color: rgba(15, 23, 42, 0.95);
      backdrop-filter: blur(20px);
      justify-content: center;
      align-items: center;
      z-index: 999;
      padding: 20px;
    }

    .overlay.active {
      display: flex;
      animation: fadeIn 0.3s ease-out;
    }

    .overlay-card {
      background: rgba(30, 41, 59, 0.9);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(148, 163, 184, 0.2);
      border-radius: 32px;
      padding: 40px;
      width: 100%;
      max-width: 500px;
      text-align: center;
      position: relative;
      animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .close-btn {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: rgba(148, 163, 184, 0.1);
      border: 1px solid rgba(148, 163, 184, 0.2);
      font-size: 24px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      color: #94A3B8;
    }

    .close-btn:hover {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
      color: #EF4444;
      transform: rotate(90deg);
    }

    .overlay-logo {
      width: 80px;
      height: 80px;
      background: white;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
      box-shadow: var(--shadow-lg);
      padding: 12px;
    }

    .overlay-title {
      font-size: 2rem;
      font-weight: 600;
      color: #F8FAFC;
      margin-bottom: 8px;
      letter-spacing: -0.5px;
    }

    .overlay-subtitle {
      color: #94A3B8;
      font-size: 1rem;
      margin-bottom: 30px;
    }

    #barcodeContainer {
      background: #fff;
      border: 1px solid #d1d5db;
      border-radius: 20px;
      padding: 30px;
      margin: 20px 0;
      min-height: 180px;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    #barcodeContainer canvas {
      border-radius: 8px;
    }

    .barcode-number {
      margin-top: 20px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.25rem;
      font-weight: 600;
      color: #F8FAFC;
      background: rgba(139, 92, 246, 0.1);
      padding: 12px 24px;
      border-radius: 12px;
      border: 1px solid rgba(139, 92, 246, 0.3);
      letter-spacing: 1px;
    }

    .action-buttons {
      display: flex;
      gap: 16px;
      margin-top: 30px;
      justify-content: center;
    }

    .btn {
      padding: 14px 28px;
      border: none;
      border-radius: 12px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: 'Space Grotesk', sans-serif;
      letter-spacing: -0.25px;
    }

    .btn-primary {
      background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
      color: white;
      box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.35);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px 0 rgba(139, 92, 246, 0.45);
    }

    .btn-secondary {
      background: rgba(148, 163, 184, 0.1);
      color: #CBD5E1;
      border: 1px solid rgba(148, 163, 184, 0.2);
    }

    .btn-secondary:hover {
      background: rgba(148, 163, 184, 0.2);
      border-color: rgba(148, 163, 184, 0.3);
    }

    .stats-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      margin: 60px 0;
      padding: 40px;
      background: rgba(30, 41, 59, 0.3);
      backdrop-filter: blur(12px);
      border-radius: 24px;
      border: 1px solid rgba(148, 163, 184, 0.1);
    }

    .stat-item {
      text-align: center;
    }

    .stat-number {
      font-size: 2.5rem;
      font-weight: 700;
      background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      font-family: 'JetBrains Mono', monospace;
    }

    .stat-label {
      color: #94A3B8;
      font-size: 0.95rem;
      margin-top: 4px;
    }

    footer {
      text-align: center;
      padding: 80px 20px 40px;
      margin-top: 100px;
      border-top: 1px solid rgba(148, 163, 184, 0.1);
    }

    .footer-logo {
      font-size: 2rem;
      font-weight: 700;
      background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 20px;
      display: inline-block;
    }

    .footer-links {
      display: flex;
      gap: 40px;
      justify-content: center;
      margin-top: 30px;
      flex-wrap: wrap;
    }

    .footer-links a {
      color: #94A3B8;
      text-decoration: none;
      font-size: 0.95rem;
      transition: color 0.3s ease;
      font-weight: 500;
    }

    .footer-links a:hover {
      color: #A78BFA;
    }

    .footer-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
    }

    .footer-add-btn {
      background: linear-gradient(135deg, #10B981 0%, #059669 100%);
      border: none;
      padding: 12px 24px;
      border-radius: 12px;
      color: white;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 1rem;
      transition: all 0.3s ease;
      box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
    }

    .footer-add-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
      background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .footer-pwa-btn {
      background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
      border: none;
      padding: 12px;
      border-radius: 12px;
      color: white;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39);
      opacity: 0;
      transform: scale(0.8);
      pointer-events: none;
    }

    .footer-pwa-btn.show {
      opacity: 1;
      transform: scale(1);
      pointer-events: auto;
    }

    .footer-pwa-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px 0 rgba(139, 92, 246, 0.5);
      background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    }

    /* Modal styles for new features */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: rgba(30, 41, 59, 0.95);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(148, 163, 184, 0.2);
      border-radius: 20px;
      padding: 32px;
      max-width: 500px;
      width: 90%;
      max-height: 80vh;
      overflow-y: auto;
      position: relative;
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .modal-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: #F8FAFC;
    }

    .modal-close {
      background: none;
      border: none;
      color: #64748B;
      font-size: 1.5rem;
      cursor: pointer;
      padding: 8px;
      border-radius: 8px;
      transition: all 0.2s ease;
    }

    .modal-close:hover {
      background: rgba(148, 163, 184, 0.1);
      color: #F8FAFC;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      margin-bottom: 8px;
      color: #E2E8F0;
      font-weight: 500;
    }

    .form-input, .form-textarea, .form-select {
      width: 100%;
      padding: 12px 16px;
      border: 2px solid rgba(148, 163, 184, 0.2);
      border-radius: 12px;
      background: rgba(15, 23, 42, 0.5);
      color: #F8FAFC;
      font-family: 'Space Grotesk', sans-serif;
      transition: all 0.3s ease;
    }

    .form-textarea {
      resize: vertical;
      min-height: 80px;
    }

    .form-input:focus, .form-textarea:focus, .form-select:focus {
      outline: none;
      border-color: #8B5CF6;
      box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    }

    .btn-group {
      display: flex;
      gap: 12px;
      margin-top: 24px;
    }

    .btn-cancel {
      background: rgba(148, 163, 184, 0.1);
      color: #94A3B8;
      border: 1px solid rgba(148, 163, 184, 0.2);
    }

    .btn-cancel:hover {
      background: rgba(148, 163, 184, 0.2);
      color: #F8FAFC;
    }



    /* Cards grid layout */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 24px;
      padding: 0 20px;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* PWA Install Banner */
    .pwa-install-banner {
      position: fixed;
      bottom: 20px;
      left: 20px;
      right: 20px;
      background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
      color: white;
      padding: 16px 20px;
      border-radius: 16px;
      box-shadow: var(--shadow-xl);
      display: none;
      align-items: center;
      gap: 16px;
      z-index: 999;
      animation: slideUpBanner 0.5s ease-out;
      max-width: 400px;
      margin: 0 auto;
    }

    .pwa-install-banner.show {
      display: flex;
    }

    .pwa-banner-icon {
      width: 48px;
      height: 48px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .pwa-banner-content {
      flex: 1;
    }

    .pwa-banner-title {
      font-weight: 600;
      font-size: 1rem;
      margin-bottom: 4px;
    }

    .pwa-banner-text {
      font-size: 0.875rem;
      opacity: 0.9;
      line-height: 1.4;
    }

    .pwa-banner-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }

    .pwa-banner-btn {
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: white;
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }

    .pwa-banner-btn:hover {
      background: rgba(255, 255, 255, 0.3);
    }

    .pwa-banner-btn.primary {
      background: rgba(255, 255, 255, 0.9);
      color: #8B5CF6;
      border-color: transparent;
    }

    .pwa-banner-btn.primary:hover {
      background: white;
    }

    .pwa-banner-close {
      background: none;
      border: none;
      color: white;
      font-size: 1.25rem;
      cursor: pointer;
      padding: 4px;
      opacity: 0.7;
      transition: opacity 0.2s ease;
    }

    .pwa-banner-close:hover {
      opacity: 1;
    }

    /* PWA Status Indicator */
    .pwa-status {
      position: fixed;
      top: 20px;
      right: 20px;
      background: rgba(16, 185, 129, 0.9);
      color: white;
      padding: 8px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      display: none;
      align-items: center;
      gap: 6px;
      z-index: 998;
      backdrop-filter: blur(12px);
    }

    .pwa-status.show {
      display: flex;
    }

    .pwa-status.offline {
      background: rgba(239, 68, 68, 0.9);
    }

    /* Installation success message */
    .install-success {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(16, 185, 129, 0.95);
      color: white;
      padding: 20px 24px;
      border-radius: 16px;
      box-shadow: var(--shadow-xl);
      text-align: center;
      z-index: 1001;
      display: none;
      backdrop-filter: blur(12px);
    }

    .install-success.show {
      display: block;
      animation: fadeInScale 0.5s ease-out;
    }

    @keyframes slideUpBanner {
      from {
        transform: translateY(100%);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    @keyframes fadeInScale {
      from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
      }
      to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
      }
    }



    @media (max-width: 768px) {
      .logo-wrapper {
        flex-direction: column;
        gap: 16px;
      }
      
      .logo-text {
        font-size: 2.5rem;
      }
      
      .logo-icon svg {
        width: 50px;
        height: 50px;
      }
      
      .card-grid, .cards-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
      }
      
      .category-section {
        padding: 0 10px;
      }
      
      .stats-container {
        grid-template-columns: 1fr;
        gap: 30px;
      }
      

      
      .modal-content {
        padding: 24px;
        margin: 16px;
      }
      
      .btn-group {
        flex-direction: column;
      }

      .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
      }

      .pwa-banner-actions {
        width: 100%;
        justify-content: center;
      }

      .pwa-status {
        top: 10px;
        right: 10px;
        font-size: 0.7rem;
      }

      .container {
        padding: 20px 20px;
      }
    }

#barcodeNumber {
  display: none !important;
}