/* /Users/Nidhi/Desktop/aakash/photo-finder/public/css/style.css */
/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f1f5f9;
    --text: #1e293b;
    --text-light: #64748b;
    --success: #22c55e;
    --error: #ef4444;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
  }
  
  /* Container */
  .container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
  }
  
  /* Back Button */
  .back-btn {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    padding: 10px 0;
    font-size: 16px;
    opacity: 0.9;
  }
  
  .back-btn:hover {
    opacity: 1;
  }
  
  /* Logo & Title */
  .logo {
    font-size: 64px;
    text-align: center;
    margin: 40px 0 20px;
  }
  
  h1 {
    color: var(--white);
    text-align: center;
    font-size: 32px;
    margin-bottom: 10px;
  }
  
  .subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 40px;
  }
  
  /* Buttons */
  .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
  }
  
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  .btn-primary {
    background: var(--white);
    color: var(--primary);
  }
  
  .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
  }
  
  .btn-icon {
    font-size: 28px;
  }
  
  .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .btn-text strong {
    font-size: 18px;
  }
  
  .btn-text small {
    font-size: 13px;
    opacity: 0.7;
  }
  
  .button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  /* Loading */
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--white);
  }
  
  .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Camera */
  .camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
  }
  
  .camera-container video {
    width: 100%;
    display: block;
    transform: scaleX(-1);
  }
  
  .camera-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  .face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 260px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
  }
  
  /* Preview */
  .preview-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
  }
  
  .preview-container img {
    width: 100%;
    display: block;
  }
  
  /* Status */
  .status {
    text-align: center;
    padding: 10px;
    color: var(--white);
    min-height: 40px;
  }
  
  .status.success {
    color: var(--success);
  }
  
  .status.error {
    color: var(--error);
  }
  
  /* Action Buttons - After Selfie */
  .action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 0 20px;
  }

  /* Primary Button - Find My Photos (BIG) */
  .btn-primary-large {
    width: 100%;
    max-width: 350px;
    padding: 20px 40px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
  }

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

  .btn-primary-large:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
  }

  /* Secondary Link - Retake (small text) */
  .btn-text-link {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 15px;
    cursor: pointer;
    padding: 10px 20px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-text-link:hover {
    color: #374151;
  }

  /* Capture Button - Take Selfie */
  .btn-capture {
    width: 100%;
    max-width: 300px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .btn-capture:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  }
  
  /* Password Section */
  .password-section {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    margin-top: 20px;
  }
  
  .input-group {
    margin-bottom: 20px;
  }
  
  .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
  }
  
  .input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
  }
  
  .input-group input:focus {
    outline: none;
    border-color: var(--primary);
  }
  
  .error-message {
    color: var(--error);
    text-align: center;
    margin-top: 15px;
  }
  
  /* Upload Section */
  .upload-section {
    margin-top: 20px;
  }
  
  .drop-zone {
    background: var(--white);
    border: 3px dashed #cbd5e1;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
  }
  
  .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
  }
  
  .drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
  }
  
  .drop-zone p {
    color: var(--text-light);
    margin-bottom: 5px;
  }
  
  .drop-zone .small {
    font-size: 14px;
  }
  
  .file-label {
    display: inline-block;
    margin-top: 15px;
    cursor: pointer;
  }
  
  .file-label input {
    display: none;
  }
  
  /* Files Preview */
  .files-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
  }
  
  .file-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
  }
  
  .file-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .file-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
  }
  
  .file-item .face-count {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
  }
  
  /* Progress */
  .progress-section {
    margin: 20px 0;
  }
  
  .progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
  }
  
  .progress-fill {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.3s;
  }
  
  .progress-text {
    text-align: center;
    margin-top: 10px;
    color: var(--white);
  }
  
  /* Upload Results */
  .upload-results {
    margin-top: 20px;
  }
  
  .upload-result-item {
    background: var(--white);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .upload-result-item.success {
    border-left: 4px solid var(--success);
  }
  
  .upload-result-item.error {
    border-left: 4px solid var(--error);
  }
  
  .upload-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
  }
  
  /* Results Grid */
  .results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
  }
  
  .result-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .result-card:hover {
    transform: scale(1.02);
  }
  
  .result-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
  
  .result-card-info {
    padding: 12px;
  }
  
  .match-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .match-badge.high {
    background: var(--success);
  }
  
  /* No Results */
  .no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--white);
  }
  
  .no-results-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
  }
  
  .no-results h2 {
    margin-bottom: 10px;
  }
  
  .no-results p {
    opacity: 0.8;
    margin-bottom: 30px;
  }
  
  /* Scan Again */
  .scan-again {
    margin-top: 30px;
    text-align: center;
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  
  .modal.show {
    display: flex;
  }
  
  .modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
  }
  
  .modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
  }
  
  .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
  }
  
  .modal-actions {
    text-align: center;
    margin-top: 20px;
  }
  
  /* Footer */
  footer {
    text-align: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
  }
  
  /* Responsive */
  @media (max-width: 400px) {
    .container {
      padding: 15px;
    }
    
    h1 {
      font-size: 26px;
    }
    
    .btn {
      padding: 15px 20px;
    }
    
    .files-preview {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Status message colors */
.status.success {
  color: #22c55e;
}

.status.warning {
  color: #f59e0b;
}

.status.error {
  color: #ef4444;
}

/* Quality score bar animation */
@keyframes scoreReveal {
  from {
    width: 0%;
  }
}

.score-bar {
  animation: scoreReveal 0.5s ease-out;
}

