 @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');
 :root {
     --black: #0A0A0A;
     --white: #F5F5F0;
     --gold: #C9A84C;
     --gold-dim: #7A6025;
     --green: #1A3A2A;
     --green-bright: #2ECC71;
     --red: #3A1A1A;
     --red-bright: #E74C3C;
     --yellow: #3A3000;
     --yellow-bright: #F1C40F;
     --grey: #2A2A2A;
 }
 
 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
 }
 
 body {
     background: var(--black);
     color: var(--white);
     font-family: 'Space Grotesk', sans-serif;
     min-height: 100vh;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 24px 16px;
 }
 /* ── Logo ── */
 
 nav {
     position: fixed;
     top: 17px;
     left: 0;
     right: 0;
     z-index: 100;
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 0 1.5rem;
     height: 56px;
     background: rgba(10, 10, 10, 0.9);
     backdrop-filter: blur(16px);
     border-bottom: 1px solid var(--border);
 }
 
 .logo {
     display: flex;
     align-items: center;
     text-decoration: none;
 }
 
 .logo img {
     height: 112px;
     width: auto;
     display: block;
 }
 
 .hero {
     min-height: 100vh;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 80px 1.25rem 3rem;
     text-align: center;
 }
 /* ── Card ── */
 
 .card {
     width: 100%;
     max-width: 350px;
     margin-top: 7%;
     background: #141414;
     border: 1px solid #2A2A2A;
     border-radius: 16px;
     padding: 32px 28px;
     position: relative;
     overflow: hidden;
 }
 
 .card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 2px;
     background: linear-gradient(90deg, transparent, var(--gold), transparent);
 }
 /* ── States ── */
 
 #state-idle,
 #state-loading,
 #state-result {
     display: none;
 }
 
 #state-idle {
     display: block;
 }
 
 .hero-logo {
     width: 101.5%;
     max-width: 380px;
     height: auto;
     margin-top: -29%;
     margin-bottom: -4.5rem;
     filter: drop-shadow(0 0 24px rgba(57, 255, 20, 0.18));
 }
 /* ── Idle ── */
 
 .headline {
     font-size: 22px;
     font-weight: 700;
     line-height: 1.2;
     margin-bottom: 8px;
 }
 
 .subline {
     font-size: 13px;
     color: #666;
     margin-bottom: 28px;
     line-height: 1.5;
 }
 
 .input-wrap {
     position: relative;
     margin-bottom: 12px;
 }
 
 input[type="text"] {
     width: 100%;
     background: #1E1E1E;
     border: 1px solid #333;
     border-radius: 10px;
     padding: 14px 16px;
     font-family: 'Space Mono', monospace;
     font-size: 16px;
     letter-spacing: 3px;
     color: var(--white);
     text-transform: uppercase;
     text-align: center;
     outline: none;
     transition: border-color 0.2s;
 }
 
 input[type="text"]::placeholder {
     color: #444;
     letter-spacing: 2px;
 }
 
 input[type="text"]:focus {
     border-color: var(--gold);
 }
 
 .hint {
     font-size: 11px;
     color: #555;
     text-align: center;
     margin-bottom: 20px;
 }
 
 .btn {
     width: 100%;
     padding: 14px;
     background: var(--gold);
     color: var(--black);
     font-family: 'Space Grotesk', sans-serif;
     font-size: 14px;
     font-weight: 700;
     letter-spacing: 2px;
     text-transform: uppercase;
     border: none;
     border-radius: 10px;
     cursor: pointer;
     transition: opacity 0.2s, transform 0.1s;
 }
 
 .btn:active {
     transform: scale(0.98);
     opacity: 0.85;
 }
 
 .divider {
     display: flex;
     align-items: center;
     gap: 12px;
     margin: 10px 0;
     color: #444;
     font-size: 11px;
     letter-spacing: 2px;
 }
 
 .divider::before,
 .divider::after {
     content: '';
     flex: 1;
     height: 1px;
     background: #2A2A2A;
 }
 
 .btn-scan {
     width: 100%;
     padding: 13px;
     background: transparent;
     color: var(--gold);
     font-family: 'Space Grotesk', sans-serif;
     font-size: 14px;
     font-weight: 500;
     letter-spacing: 1px;
     border: 1px solid var(--gold-dim);
     border-radius: 10px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     transition: background 0.2s;
 }
 
 .btn-scan:hover {
     background: rgba(201, 168, 76, 0.08);
 }
 /* ── Loading ── */
 
 #state-loading {
     text-align: center;
     padding: 20px 0;
 }
 
 .spinner {
     width: 40px;
     height: 40px;
     border: 2px solid #2A2A2A;
     border-top-color: var(--gold);
     border-radius: 50%;
     margin: 0 auto 16px;
     animation: spin 0.8s linear infinite;
 }
 
 @keyframes spin {
     to {
         transform: rotate(360deg);
     }
 }
 
 .loading-text {
     font-size: 13px;
     color: #555;
     letter-spacing: 1px;
 }
 /* ── Result ── */
 
 #state-result {
     text-align: center;
 }
 
 .result-icon {
     font-size: 52px;
     margin-bottom: 12px;
     display: block;
 }
 
 .result-badge {
     display: inline-block;
     font-family: 'Space Mono', monospace;
     font-size: 10px;
     letter-spacing: 3px;
     text-transform: uppercase;
     padding: 4px 12px;
     border-radius: 20px;
     margin-bottom: 16px;
 }
 
 .result-title {
     font-size: 20px;
     font-weight: 700;
     margin-bottom: 8px;
 }
 
 .result-msg {
     font-size: 13px;
     color: #777;
     line-height: 1.6;
     margin-bottom: 24px;
 }
 
 .result-code {
     font-family: 'Space Mono', monospace;
     font-size: 11px;
     color: #444;
     letter-spacing: 2px;
     margin-bottom: 24px;
 }
 /* Status colors */
 
 .status-genuine .result-icon::after {
     content: '✅';
 }
 
 .status-genuine .result-badge {
     background: rgba(46, 204, 113, 0.1);
     color: var(--green-bright);
     border: 1px solid rgba(46, 204, 113, 0.2);
 }
 
 .status-genuine .result-title {
     color: var(--green-bright);
 }
 
 .status-fake .result-icon::after {
     content: '🚫';
 }
 
 .status-fake .result-badge {
     background: rgba(231, 76, 60, 0.1);
     color: var(--red-bright);
     border: 1px solid rgba(231, 76, 60, 0.2);
 }
 
 .status-fake .result-title {
     color: var(--red-bright);
 }
 
 .status-used .result-icon::after {
     content: '⚠️';
 }
 
 .status-used .result-badge {
     background: rgba(241, 196, 15, 0.1);
     color: var(--yellow-bright);
     border: 1px solid rgba(241, 196, 15, 0.2);
 }
 
 .status-used .result-title {
     color: var(--yellow-bright);
 }
 
 .status-invalid .result-icon::after {
     content: '❌';
 }
 
 .status-invalid .result-badge {
     background: rgba(231, 76, 60, 0.1);
     color: var(--red-bright);
     border: 1px solid rgba(231, 76, 60, 0.2);
 }
 
 .status-invalid .result-title {
     color: var(--red-bright);
 }
 
 .btn-retry {
     width: 100%;
     padding: 13px;
     background: transparent;
     color: #666;
     font-family: 'Space Grotesk', sans-serif;
     font-size: 13px;
     letter-spacing: 1px;
     border: 1px solid #2A2A2A;
     border-radius: 10px;
     cursor: pointer;
     transition: border-color 0.2s, color 0.2s;
 }
 
 .btn-retry:hover {
     border-color: #444;
     color: #999;
 }
 /* ── QR Scanner Modal ── */
 
 #scanner-modal {
     display: none;
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.95);
     z-index: 100;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 24px;
 }
 
 #scanner-modal.open {
     display: flex;
 }
 
 #scanner-video {
     width: 100%;
     max-width: 320px;
     border-radius: 12px;
     border: 2px solid var(--gold);
 }
 
 .scanner-frame {
     position: relative;
     width: 100%;
     max-width: 320px;
     margin-bottom: 24px;
 }
 
 .scanner-corners {
     position: absolute;
     inset: 0;
     pointer-events: none;
 }
 
 .scanner-corners::before,
 .scanner-corners::after {
     content: '';
     position: absolute;
     width: 24px;
     height: 24px;
     border-color: var(--gold);
     border-style: solid;
 }
 
 .scanner-corners::before {
     top: -2px;
     left: -2px;
     border-width: 3px 0 0 3px;
     border-radius: 4px 0 0 0;
 }
 
 .scanner-corners::after {
     bottom: -2px;
     right: -2px;
     border-width: 0 3px 3px 0;
     border-radius: 0 0 4px 0;
 }
 
 .scanner-label {
     font-size: 13px;
     color: #666;
     margin-bottom: 20px;
     text-align: center;
 }
 
 .btn-cancel {
     padding: 12px 32px;
     background: transparent;
     color: #666;
     border: 1px solid #333;
     border-radius: 10px;
     font-family: 'Space Grotesk', sans-serif;
     font-size: 14px;
     cursor: pointer;
 }
 /* ── Footer ── */
 
 .footer {
     margin-top: 32px;
     font-size: 11px;
     color: #fff;
     letter-spacing: 2px;
     text-align: center;
 }