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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
}

/* Header */
header {
  background-color: #1a1a1a;
  color: #00d084;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2e2e2e;
}

.logo {
  font-size: 1.8rem;
  font-weight: 600;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: #c7c7c7;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #00d084;
}

/* Main */
main {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #00d084;
}

.subtitle {
  font-size: 1.2rem;
  color: #aaaaaa;
  margin-bottom: 2.5rem;
}

/* Buttons */
button {
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn {
  background-color: #00d084;
  color: #121212;
  margin: 1rem 0.5rem;
}

.primary-btn:hover {
  background-color: #00b974;
}

.secondary-btn {
  background-color: transparent;
  color: #00d084;
  border: 2px solid #00d084;
  margin-left: 0.5rem;
}

.secondary-btn:hover {
  background-color: rgba(0, 208, 132, 0.1);
}

/* Manual Input */
.manual-input {
  margin-top: 2rem;
}

.manual-input input {
  padding: 0.75rem;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #1e1e1e;
  color: #e0e0e0;
  width: 60%;
  max-width: 400px;
  font-size: 1rem;
  margin-right: 0.5rem;
  transition: border-color 0.3s ease;
}

.manual-input input:focus {
  outline: none;
  border-color: #00d084;
}

/* Reader */
#reader {
  margin: 2rem auto;
  width: 300px;
  max-width: 100%;
}

/* Spinner */
.spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.spinner div {
  width: 16px;
  height: 16px;
  margin: 4px;
  background-color: #00d084;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.spinner div:nth-child(2) {
  animation-delay: 0.2s;
}
.spinner div:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  to {
    opacity: 0.3;
    transform: translateY(-1rem);
  }
}

/* Result Card */
#result.card {
  background: rgba(30, 30, 30, 0.9);
  color: #f4f4f4;
  text-align: left;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: fadeIn 0.6s ease-in-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#result.card h2 {
  color: #00d084;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

#result.card p {
  font-size: 1rem;
  color: #c7c7c7;
  margin: 0.6rem 0;
}

#result.card img {
  margin-top: 1.2rem;
  border-radius: 6px;
  max-width: 120px;
}

/* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  background-color: #1a1a1a;
  color: #888;
  margin-top: 4rem;
}

footer a {
  color: #00d084;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .manual-input input {
    width: 90%;
    margin-bottom: 1rem;
  }

  #result.card {
    padding: 1.5rem;
  }
}
