:root {
  --primary: #10B981;
  --primary-hover: #059669;
  --bg-gradient-start: #111827;
  --bg-gradient-end: #1F2937;
  --card-bg: rgba(31, 41, 55, 0.7);
  --input-bg: rgba(55, 65, 81, 0.5);
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --border-color: rgba(255, 255, 255, 0.1);
  --glow: 0 0 20px rgba(16, 185, 129, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-family: 'Inter', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: #0f172a;
  background-image: 
    radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Efeitos de fundo */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.effect-blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: float 10s infinite ease-in-out;
}

.e1 {
  width: 400px;
  height: 400px;
  background: #10B981;
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.e2 {
  width: 300px;
  height: 300px;
  background: #3B82F6;
  bottom: -5%;
  left: -5%;
  animation-delay: 5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 40px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

.app-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

/* Header */
.header {
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-size: 1.1rem;
}

.icon-brand svg {
  stroke: var(--primary);
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #cecece);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Input Section */
.search-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-container {
  position: relative;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  transition: var(--transition);
  padding: 4px;
}

.input-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.prefix-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-right: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

.flag {
  font-size: 1.2rem;
}

input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 14px 12px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-family);
  outline: none;
}

input::placeholder {
  color: #6B7280;
}

.primary-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  background: #374151;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading Spinner */
.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading .btn-text {
  display: none;
}

.loading .btn-loader {
  display: block;
  margin: 0;
}

/* Result Section */
.result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideUp 0.4s ease-out;
}

.hidden {
  display: none !important;
}

.profile-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.profile-image-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.profile-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: var(--glow);
}

.badge-success {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: var(--primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #1F2937;
  color: #fff;
}

.profile-info .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

.profile-info h3 {
  font-size: 1.4rem;
  color: var(--text-main);
  font-weight: 600;
}

.secondary-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1); /* Cor primária com transparência */
  transition: var(--transition);
  margin-top: 0.5rem;
}


.secondary-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.05);
}

/* Toast Notification */
.toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #EF4444;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
  font-weight: 500;
  animation: shake 0.4s ease-in-out;
  white-space: nowrap;
  max-width: 90%;
  z-index: 100;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  25% { transform: translateX(calc(-50% - 5px)); }
  75% { transform: translateX(calc(-50% + 5px)); }
}

/* =========================================
   Cyberpunk / Modern Effects
   ========================================= */

/* Grid Overlay Background */
.grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* Card Glow Active State */
.glow-active {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15), inset 0 0 20px rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { border-color: rgba(16, 185, 129, 0.3); }
    50% { border-color: rgba(16, 185, 129, 0.6); }
    100% { border-color: rgba(16, 185, 129, 0.3); }
}

/* Image Wrapper Effects */
.profile-image-wrapper {
    position: relative;
    width: 180px; /* Increased size */
    height: 180px;
    margin: 20px auto;
    border-radius: 12px; /* Square with rounded corners looks more modern/tech */
    padding: 5px;
    background: rgba(16, 185, 129, 0.1);
    overflow: hidden;
}

.profile-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    filter: contrast(1.1) saturate(1.1);
    position: relative;
    z-index: 1;
}

/* Scan Line Effect */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #10B981;
    box-shadow: 0 0 10px #10B981;
    z-index: 10;
    opacity: 0.6;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* Corner Accents */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #10B981;
    z-index: 5;
    transition: all 0.3s ease;
}

.t-l { top: 0; left: 0; border-right: none; border-bottom: none; }
.t-r { top: 0; right: 0; border-left: none; border-bottom: none; }
.b-l { bottom: 0; left: 0; border-right: none; border-top: none; }
.b-r { bottom: 0; right: 0; border-left: none; border-top: none; }

.profile-card:hover .corner {
    width: 30px;
    height: 30px;
    border-color: #34D399;
}

/* Cyber Button */
.cyber-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 15px 40px;
    font-size: 0.9rem;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 1rem;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cyber-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.btn-glitch {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.cyber-btn:hover .btn-glitch {
    left: 100%;
    transition: 0.5s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

@media (max-width: 480px) {
  .app-container {
    padding: 1.5rem;
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    border: none;
    box-shadow: none;
    justify-content: center;
  }
}
