:root {
    --bg: #0a0a0c;
    --card-bg: #15151a;
    --neon-green: #00ff66;
    --neon-red: #ff003c;
    --neon-blue: #00e5ff;
    --text: #ffffff;
    --gray: #888888;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }

body { background-color: var(--bg); color: var(--text); display: flex; justify-content: center; min-height: 100vh; overflow-x: hidden; }

.container { width: 100%; max-width: 480px; padding: 20px; display: flex; flex-direction: column; gap: 20px; }

header { text-align: center; margin-top: 10px; }
h1 { font-size: 2rem; font-weight: 900; letter-spacing: -1px; }
.neon-text { color: var(--neon-blue); text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
header p { color: var(--gray); font-size: 0.85rem; margin-top: 5px; }

/* Ads Placeholders */
.ad-slot { background: #1a1a24; border: 1px dashed #333; color: #555; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 0.8rem; }
.top-ad { height: 50px; }
.middle-ad { height: 250px; margin: 20px 0; }

/* Screens */
main { display: none; flex-direction: column; gap: 15px; }
main.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Upload Box */
.upload-box { border: 2px dashed #333; border-radius: 12px; background: var(--card-bg); transition: 0.2s; cursor: pointer; }
.upload-box:hover { border-color: var(--neon-blue); }
input[type="file"] { display: none; }
.upload-btn { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; cursor: pointer; }
.upload-btn .icon { font-size: 3rem; margin-bottom: 10px; }
.upload-btn .text { font-weight: 600; color: #ccc; }

.legal-check { display: flex; gap: 10px; font-size: 0.75rem; color: var(--gray); margin-top: 5px; }
.legal-check a { color: var(--neon-blue); }
.error-msg { color: var(--neon-red); text-align: center; font-size: 0.9rem; font-weight: bold; min-height: 20px; }

/* Loading Scanner */
.scanner-container { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid #333; }
#preview-image { width: 100%; display: block; opacity: 0.5; filter: grayscale(100%); }
.scan-line { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--neon-blue); box-shadow: 0 0 15px var(--neon-blue); animation: scan 2s infinite linear; }
@keyframes scan { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }
.loading-text { text-align: center; font-family: monospace; color: var(--neon-blue); margin-top: 10px; }

/* Shareable Card */
.result-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; border: 1px solid #222; box-shadow: 0 10px 30px rgba(0,0,0,0.8); position: relative; }
.card-image-wrapper { position: relative; width: 100%; line-height: 0; }
#output-canvas { width: 100%; display: block; }
.tier-badge {
    position: absolute;
    top: 15px;
    left: 50%; /* Move para o centro */
    transform: translateX(-50%); /* Centraliza perfeitamente */
    
    background: rgba(0, 0, 0, 0.85);
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
    
    /* O segredo da proporção está aqui no padding e no white-space */
    padding: 8px 24px; 
    white-space: nowrap; 
    
    border-radius: 30px;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    
    text-shadow: 0 0 8px var(--neon-green);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Sombra na pílula */
    backdrop-filter: blur(5px);
    z-index: 10;
}

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #222; border-bottom: 1px solid #222; }
.stat-box { background: var(--card-bg); padding: 12px 5px; text-align: center; display: flex; flex-direction: column; gap: 5px; }
.stat-box span { font-size: 0.65rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.stat-box strong { font-size: 0.9rem; color: var(--text); }

.roast-box { padding: 20px; text-align: center; font-style: italic; color: #ddd; font-size: 0.95rem; line-height: 1.4; }
.card-footer { text-align: center; padding: 10px; font-size: 0.7rem; color: #555; font-family: monospace; border-top: 1px solid #222; }

/* Buttons */
.action-buttons { display: flex; gap: 10px; margin-top: 10px; }
button { flex: 1; padding: 15px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.primary-btn { background: var(--neon-blue); color: #000; }
.primary-btn:hover { background: #00b3cc; }
.secondary-btn { background: #222; color: #fff; border: 1px solid #444; }
.secondary-btn:hover { background: #333; }

/* Monetization */
.monetization-section { background: #111115; border: 1px solid #222; padding: 20px; border-radius: 12px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.monetization-section h3 { font-size: 1rem; color: #aaa; margin-bottom: 5px; }
.upsell-btn, .tip-btn { display: block; padding: 12px; border-radius: 8px; text-decoration: none; font-weight: bold; font-size: 0.9rem; }
.upsell-btn { background: linear-gradient(45deg, #ff003c, #cc0030); color: white; }
.tip-btn { background: #ffdd00; color: #000; }