:root {
            --primary: #8A2BE2; /* Purple */
            --secondary: #FF69B4; /* Pink */
            --dark-blue: #191970; /* Dark Blue */
            --light: #F8F9FA;
            --dark: #212529;
            --accent: #E6E6FA; /* Lavender */
            --success: #28a745;
            --danger: #dc3545;
}
        
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--secondary);
}
  .nav-menu {
      display: flex;
      list-style: none;
  }

  .nav-menu li {
      margin-left: 30px;
  }

  .nav-menu a:not(.auth-button) {
      text-decoration: none;
      color: var(--dark);
      font-weight: 500;
      transition: color 0.3s ease;
  }

  .nav-menu a:not(.auth-button):hover {
      color: var(--primary);
  }

  .auth-button {
      background-color: var(--dark-blue);
      color: white !important;
      padding: 10px 20px;
      border-radius: 30px;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      border: none;
      cursor: pointer;
  }

  .auth-button:hover {
      background-color: var(--primary);
      transform: translateY(-2px);
  }

.beta-auth-button {
    background-color: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 18px;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
}

.beta-auth-button:hover {
    background-color: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-primary {
    background-color: white;
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.section-title p {
    color: #777;
    max-width: 700px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background-color: var(--accent);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    margin-bottom: 20px;
    font-size: 50px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.feature-card p {
    color: #555;
}

/* Products Section */
.products {
    padding: 80px 0;
    background-color: var(--light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Products Section - Fix for consistency */
.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-blue);
    position: relative;
    z-index: 2;
}

.product-info p {
    color: #777;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.product-button {
    display: block;
    background-color: var(--secondary);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.product-button:hover {
    background-color: var(--primary);
}

/* Authentication Section */
.authentication {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
}

.authentication h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.authentication p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
}

.auth-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    color: var(--dark);
}

.verification-steps {
    margin-bottom: 30px;
}

.verification-step {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    display: none;
}

.verification-step.active {
    display: block;
    border-left: 4px solid var(--primary);
}

.verification-step h3 {
    color: var(--dark-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
  /* Fix for reference image display */
  #reference-image {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      display: block;
      margin: 0 auto;
  }

  .camera-container {
      width: 100%;
      position: relative;
      overflow: hidden;
      background-color: #000;
      border-radius: 8px;
      margin: 10px 0;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .camera-container video {
      width: 100%;
      height: auto;
      display: block;
      object-fit: contain;
  }

  .camera-container canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
  }
.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
}

.camera-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

canvas {
    width: 100%;
    height: 100%;
}

.preview-container {
    width: 100%;
    height: 100%;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.camera-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.camera-button:hover {
    background-color: var(--dark-blue);
}

.retake-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retake-button:hover {
    background-color: #5a6268;
}

.submit-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.submit-button:hover:not(:disabled) {
    background-color: var(--dark-blue);
}

.submit-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.verification-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #aaa;
}

.progress-step.completed {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.progress-line {
    width: 80px;
    height: 2px;
    background-color: #ddd;
}

.progress-line.completed {
    background-color: var(--primary);
}

.auth-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: 500;
    display: none;
}

.auth-success {
    background-color: #d4edda;
    color: #155724;
}

.auth-failure {
    background-color: #f8d7da;
    color: #721c24;
}

/* Additional styles for the verification process */
.manual-input-section {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

#manual-input-form {
    margin-top: 15px;
    transition: all 0.3s ease;
}

#manual-input-form.hidden {
    display: none;
}

#barcode-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 16px;
}

.upload-section {
    margin-top: 15px;
}

#scan-region {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.corner-tl, .corner-tr, .corner-bl, .corner-br {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    border-width: 3px;
}

.corner-tl {
    top: -3px;
    left: -3px;
    border-top-style: solid;
    border-left-style: solid;
    border-top-left-radius: 5px;
}

.corner-tr {
    top: -3px;
    right: -3px;
    border-top-style: solid;
    border-right-style: solid;
    border-top-right-radius: 5px;
}

.corner-bl {
    bottom: -3px;
    left: -3px;
    border-bottom-style: solid;
    border-left-style: solid;
    border-bottom-left-radius: 5px;
}

.corner-br {
    bottom: -3px;
    right: -3px;
    border-bottom-style: solid;
    border-right-style: solid;
    border-bottom-right-radius: 5px;
}

.scanner-instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    margin: 0 auto;
    width: 80%;
    max-width: 300px;
}

.camera-instructions {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    font-size: 12px;
    margin: 0 auto;
    width: 80%;
    max-width: 300px;
    border-radius: 15px;
}

#reference-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#overlay-image {
    max-width: 150%;
    max-height: 150%;
    opacity: 0.3;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(138, 43, 226, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#result-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.success-icon {
    color: var(--success);
}

.error-icon {
    color: var(--danger);
}

.warning-icon {
    color: #ffc107;
}

.error-title {
    color: var(--danger);
}

#result-content {
    text-align: center;
    margin-bottom: 30px;
}

#result-reference {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--accent);
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    height: 400px;
    background-color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
}

.about-text h2 {
    font-size: 36px;
    color: var(--dark-blue);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
}

/* Footer */
footer {
    background-color: var(--dark-blue);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.social-link:hover {
    background-color: var(--secondary);
}

/* Modal for authentication result */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: black;
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.success-icon {
    color: #28a745;
}

.failure-icon {
    color: #dc3545;
}

/* Responsive styles */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .nav-menu {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 10px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 80%;
        margin-bottom: 10px;
    }
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Force video to be visible on mobile */
    #camera-video {
        background-color: #000 !important;
        min-height: 200px !important;
        width: 100% !important;
    }
    
    /* Make sure camera container has proper dimensions */
    .camera-container {
        min-height: 200px !important;
        background-color: #000 !important;
    }
    
    /* Adjust zoom controls for better visibility on mobile */
    .zoom-controls {
        right: 10px;
        background-color: rgba(0, 0, 0, 0.7);
        padding: 6px 4px;
    }
    
    .zoom-button {
        font-size: 14px;
        width: 26px;
        height: 26px;
    }
    
    /* Make instruction text more visible */
    .camera-instructions {
        background-color: rgba(0, 0, 0, 0.7);
        font-weight: bold;
    }
}

/* Fix for iOS Safari */
html.ios .camera-container video {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

/* Ensure consistent zoom behavior */
.camera-container {
    overflow: hidden;
    position: relative;
}

#camera-video {
    transform-origin: center;
    transition: transform 0.2s ease-out;
}

/* Fix for captured image display */
#captured-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#captured-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Update zoom controls to be vertical on the right */
.zoom-controls {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 6px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.zoom-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    padding: 5px;
    margin: 3px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-button:hover {
    transform: scale(1.1);
}

#zoom-level {
    color: white;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 0;
    text-align: center;
}

/* Style for zoomed video */
#camera-video {
    object-fit: cover;
    transform-origin: center;
    transition: transform 0.2s ease-out;
}