/* Mint Motors QR Scanner - Modern Mobile Styles */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #2c3e50);
  color: #fff;
  min-height: 100vh;
  padding: 20px;
  margin: 0;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 40px);
}

header {
  text-align: center;
  margin-bottom: 35px;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 12px;
  background: linear-gradient(45deg, #fff, #a0d2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.5px;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.logo-placeholder {
  text-align: center;
  margin-bottom: 15px;
}

.header-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

main {
  flex: 1;
}

/* Content Wrapper for two-column layout */
.content-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.main-content {
  flex: 1;
}

.video-section {
  width: 300px;
  flex-shrink: 0;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 9:16 aspect ratio */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #000;
}

.promo-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mute-toggle {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mute-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

footer {
  margin-top: auto;
}

/* Scanner Section */
.scanner-section {
  text-align: center;
}

.scanner-section h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #fff;
}

/* Scan Options */
.scan-options {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
}

.scan-btn {
  padding: 20px;
  border: none;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.scan-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

.scan-btn:hover::before {
  opacity: 1;
}

.scan-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

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

.scan-btn.primary {
  background: linear-gradient(45deg, #00b09b, #96c93d);
  color: white;
}

.scan-btn.secondary {
  background: linear-gradient(45deg, #2193b0, #6dd5ed);
  color: white;
}

.btn-icon {
  font-size: 1.5rem;
}

/* Camera Container */
.camera-container {
  position: relative;
  width: 100%;
  margin: 25px 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.camera-container video {
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  background: #000;
  display: block;
}

.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-frame {
  width: 220px;
  height: 220px;
  border: 4px solid #00b09b;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 176, 155, 0.6);
}

.scan-frame::before, .scan-frame::after {
  content: '';
  position: absolute;
  background: #00b09b;
}

/* Scanning animation */
.scan-frame::before {
  width: 100%;
  height: 4px;
  top: 0;
  left: 0;
  animation: scan 2s infinite linear;
  box-shadow: 0 0 10px rgba(0, 176, 155, 0.8);
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.scan-overlay p {
  margin-top: 25px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 18px;
  border-radius: 24px;
  font-weight: 500;
  font-size: 1.1rem;
  backdrop-filter: blur(5px);
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* Authentication Result */
.auth-result {
  text-align: center;
  padding: 35px;
  border-radius: 22px;
  margin: 25px 0;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.5s forwards;
}

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

.result-icon {
  font-size: 4.5rem;
  margin-bottom: 25px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.auth-result h3 {
  font-size: 2.2rem;
  margin-bottom: 18px;
  font-weight: 700;
}

.auth-result p {
  font-size: 1.25rem;
  margin-bottom: 25px;
  line-height: 1.6;
  font-weight: 300;
}

.auth-result.success {
  background: rgba(46, 204, 113, 0.25);
  border-color: rgba(46, 204, 113, 0.4);
}

.auth-result.success .result-icon {
  color: #2ecc71;
}

.auth-result.error {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.4);
}

.auth-result.error .result-icon {
  color: #e74c3c;
}

/* Car Details */
.car-details {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 25px;
  margin: 25px 0;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.car-details h4 {
  margin-bottom: 20px;
  color: #a0d2eb;
  font-size: 1.4rem;
  font-weight: 600;
}

.car-details p {
  margin: 10px 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.car-details strong {
  color: #fff;
  font-weight: 500;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 45px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  margin: 25px 0;
}

.spinner {
  width: 55px;
  height: 55px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 6px solid #00b09b;
  animation: spin 1s linear infinite;
  margin: 0 auto 25px;
  box-shadow: 0 0 15px rgba(0, 176, 155, 0.4);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-size: 1.3rem;
  font-weight: 300;
}

/* Info Section */
.info-section {
  margin-top: 45px;
  text-align: center;
}

.info-section h2 {
  font-size: 1.7rem;
  margin-bottom: 30px;
  color: #a0d2eb;
  font-weight: 700;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 35px;
}

.step {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 18px;
  text-align: left;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.step:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(5px);
}

.step-number {
  background: linear-gradient(45deg, #00b09b, #96c93d);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 176, 155, 0.3);
}

.step p {
  font-size: 1.05rem;
  line-height: 1.5;
}

.security-info {
  background: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 18px;
  border-left: 5px solid #00b09b;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.security-info h3 {
  margin-bottom: 15px;
  color: #00b09b;
  font-size: 1.4rem;
  font-weight: 600;
}

.security-info p {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 300;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 45px;
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  padding: 15px 0;
  max-width: 100%;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px 15px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: fit-content;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 25px;
    margin: 12px;
    border-radius: 20px;
    min-height: calc(100vh - 24px);
  }
  
  header h1 {
    font-size: 2.3rem;
  }
  
  header p {
    font-size: 1.1rem;
  }
  
  .scanner-section h2 {
    font-size: 1.7rem;
  }
  
  .scan-btn {
    padding: 18px;
    font-size: 1.1rem;
  }
  
  .scan-frame {
    width: 190px;
    height: 190px;
  }
  
  .auth-result {
    padding: 25px;
  }
  
  .auth-result h3 {
    font-size: 1.8rem;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .footer-links {
    gap: 8px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .footer-links a {
    font-size: 0.85rem;
    padding: 8px 12px;
    flex: 1 1 auto;
    min-width: calc(50% - 10px);
  }
  
  /* Adjust two-column layout for tablets */
  .content-wrapper {
    flex-direction: column;
  }
  
  .video-section {
    width: 100%;
    order: -1; /* Put video section first on mobile */
    margin-bottom: 30px;
  }
  
  .video-container {
    padding-top: 56.25%; /* 16:9 aspect ratio for mobile */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px;
    margin: 8px;
    min-height: calc(100vh - 16px);
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .scanner-section h2 {
    font-size: 1.5rem;
  }
  
  .scan-btn {
    padding: 16px;
    font-size: 1rem;
    width: 100%;
  }
  
  .scan-frame {
    width: 160px;
    height: 160px;
  }
  
  .auth-result {
    padding: 20px;
  }
  
  .auth-result h3 {
    font-size: 1.6rem;
  }
  
  .footer-links {
    gap: 6px;
    flex-wrap: wrap;
  }
  
  .footer-links a {
    font-size: 0.8rem;
    padding: 6px 10px;
    flex: 1 1 calc(50% - 10px);
    margin: 3px;
    text-align: center;
  }
  
  .step {
    padding: 15px;
  }
  
  .security-info {
    padding: 20px;
  }
  
  .header-logo {
    width: 80px;
    height: 80px;
  }
  
  .status-card {
    padding: 15px;
  }
  
  .test-result {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .legal-content {
    padding: 20px;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 15px;
    margin: 5px;
    border-radius: 18px;
    min-height: calc(100vh - 10px);
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  header p {
    font-size: 0.95rem;
  }
  
  .scanner-section h2 {
    font-size: 1.3rem;
  }
  
  .scan-btn {
    padding: 14px;
    font-size: 0.95rem;
  }
  
  .scan-frame {
    width: 140px;
    height: 140px;
  }
  
  .auth-result {
    padding: 18px;
  }
  
  .auth-result h3 {
    font-size: 1.4rem;
  }
  
  .footer-links {
    gap: 5px;
  }
  
  .footer-links a {
    font-size: 0.75rem;
    padding: 5px 8px;
    flex: 1 1 calc(50% - 8px);
  }
  
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  
  .step p {
    font-size: 0.95rem;
  }
  
  .header-logo {
    width: 70px;
    height: 70px;
  }
  
  .status-card {
    padding: 12px;
  }
  
  .test-result {
    padding: 8px;
    font-size: 0.8rem;
  }
  
  .legal-content {
    padding: 15px;
  }
  
  .legal-content h2 {
    font-size: 1.4rem;
  }
  
  .legal-content h3 {
    font-size: 1.2rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Status Page Styles */
.status-card {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid #2ecc71;
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 18px 18px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.status-card.error {
  border-left-color: #e74c3c;
}

.status-card.warning {
  border-left-color: #f1c40f;
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
}

.status-ok {
  background-color: #2ecc71;
}

.status-error {
  background-color: #e74c3c;
}

.test-result {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 12px;
  margin: 15px 0;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  color: #a0d2eb;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content {
  background: rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content h2 {
  color: #a0d2eb;
  margin-top: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content h3 {
  color: #fff;
  margin-top: 20px;
}

.legal-content ul {
  padding-left: 20px;
  margin: 15px 0;
}

.legal-content li {
  margin: 10px 0;
  line-height: 1.6;
}

.legal-content p {
  line-height: 1.6;
  margin: 15px 0;
}
