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

    body {
      font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
      background: #0a0a0a;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 15px;
      color: white;
      position: relative;
      overflow: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: 
        radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
      pointer-events: none;
      z-index: 0;
    }

    #container {
      max-width: 850px;
      width: 100%;
      background: rgba(15, 15, 15, 0.95);
      backdrop-filter: blur(20px);
      border-radius: 20px;
      padding: 30px 35px;
      box-shadow: 
        0 0 60px rgba(16, 185, 129, 0.25),
        0 15px 50px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(16, 185, 129, 0.1);
      border: 2px solid rgba(16, 185, 129, 0.3);
      position: relative;
      z-index: 1;
    }

    h1 {
      font-size: clamp(28px, 5vw, 42px);
      font-weight: 900;
      text-align: center;
      margin-bottom: 8px;
      background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: -1px;
      line-height: 1.1;
      text-transform: uppercase;
    }

    .subtitle {
      text-align: center;
      font-size: 13px;
      opacity: 0.7;
      margin-bottom: 20px;
      font-weight: 400;
      color: #10b981;
      letter-spacing: 1.5px;
      text-transform: uppercase;
    }

    #status {
      text-align: center;
      padding: 16px 24px;
      border-radius: 12px;
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 20px;
      background: rgba(16, 185, 129, 0.08);
      backdrop-filter: blur(10px);
      border: 2px solid rgba(16, 185, 129, 0.3);
      box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(16, 185, 129, 0.1),
        0 0 25px rgba(16, 185, 129, 0.1);
      color: #34d399;
      letter-spacing: 0.3px;
      position: relative;
      overflow: hidden;
    }

    #top-section {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 25px;
      width: 100%;
      max-width: 1000px;
      margin: 0 auto 20px;
    }

    #webcam-container {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    #webcam-container canvas {
      max-width: 100%;
      height: auto;
      border-radius: 12px;
      box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 0 15px rgba(16, 185, 129, 0.05);
      border: 2px solid rgba(16, 185, 129, 0.4);
      background: #000;
    }

    #detected-note {
      flex: 1;
      background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
      padding: 35px 30px;
      border-radius: 16px;
      text-align: center;
      box-shadow: 
        0 25px 70px rgba(16, 185, 129, 0.4),
        0 0 80px rgba(16, 185, 129, 0.2),
        inset 0 2px 0 rgba(16, 185, 129, 0.3);
      display: none;
      position: relative;
      overflow: hidden;
      border: 2px solid #10b981;
    }

    #detected-note.show {
      display: block;
      animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    #detected-note h2 {
      font-size: 13px;
      margin-bottom: 12px;
      opacity: 0.85;
      font-weight: 700;
      position: relative;
      z-index: 1;
      text-transform: uppercase;
      letter-spacing: 3px;
      color: #6ee7b7;
    }

    #detected-note-name {
      font-size: clamp(28px, 6vw, 42px);
      font-weight: 900;
      margin: 20px 0;
      text-shadow: 
        0 0 35px rgba(16, 185, 129, 0.8),
        0 8px 25px rgba(0, 0, 0, 0.5);
      position: relative;
      z-index: 1;
      letter-spacing: -1px;
      color: #ffffff;
      text-transform: uppercase;
      font-style: italic;
    }

    #detected-confidence {
      font-size: 16px;
      opacity: 0.9;
      font-weight: 700;
      position: relative;
      z-index: 1;
      margin-top: 12px;
      color: #6ee7b7;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }

    .money-icon {
      font-size: 54px;
      display: block;
      margin-bottom: 12px;
      filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.8));
      position: relative;
      z-index: 1;
    }

    .money-icon::before {
      content: "💵";
    }

    .loading-spinner {
      width: 50px;
      height: 50px;
      border: 4px solid rgba(16, 185, 129, 0.2);
      border-top: 4px solid #10b981;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 20px auto;
      box-shadow: 
        0 0 18px rgba(16, 185, 129, 0.4),
        inset 0 0 8px rgba(16, 185, 129, 0.2);
    }

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

    .pulse-effect {
      animation: pulseScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes pulseScale {
      0%, 100% { 
        transform: scale(1); 
      }
      50% { 
        transform: scale(1.02); 
      }
    }

    #label-container {
      display: none;
    }

    /* Indicador de envio ao Firebase */
    .firebase-indicator {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(16, 185, 129, 0.2);
      border: 2px solid #10b981;
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 12px;
      font-weight: 700;
      color: #6ee7b7;
      display: none;
      animation: fadeIn 0.3s ease;
    }

    .firebase-indicator.sending {
      display: block;
      background: rgba(16, 185, 129, 0.3);
    }

    .firebase-indicator.success {
      display: block;
      background: rgba(16, 185, 129, 0.4);
    }

    .firebase-indicator.error {
      display: block;
      background: rgba(239, 68, 68, 0.3);
      border-color: #ef4444;
      color: #fca5a5;
    }

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

    /* RESPONSIVO */
    @media (max-width: 950px) {
      #top-section {
        flex-direction: column;
        gap: 15px;
      }

      #detected-note,
      #webcam-container {
        width: 100%;
      }
    }

    @media (max-width: 768px) {
      #container {
        padding: 25px 25px;
      }

      h1 {
        font-size: 32px;
      }

      .subtitle {
        font-size: 12px;
      }

      #detected-note {
        padding: 30px 25px;
      }

      #status {
        padding: 14px 20px;
        font-size: 14px;
      }
    }

    @media (max-height: 700px) {
      #container {
        padding: 20px 30px;
      }
      
      h1 {
        font-size: 32px;
        margin-bottom: 5px;
      }
      
      .subtitle {
        margin-bottom: 15px;
      }
      
      #status {
        padding: 12px 20px;
        margin-bottom: 15px;
      }
      
      #webcam-container {
        margin-bottom: 15px;
      }
      
      #detected-note {
        padding: 25px 25px;
      }
    }