@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --primary: #111;
  --secondary: #666;
  --accent: #8141b6;
  --bg: #fafafa;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: .5rem;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

main {
  width: 100%;
  max-width: 480px;
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-selector {
  font-size: 1.5rem;
  cursor: pointer;
}

h1 {
  font-size: 1.5rem;
  margin: 0;
}

.emoji-cards {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  flex-wrap: wrap;
}

.emoji-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-size: 2.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  transition: transform 0.2s;
}

.emoji-card:hover {
  transform: scale(1.1);
}


.hints p {
  background: #f9f9f9;
  padding: 0.75rem 1rem;
  border-left: 4px solid #ffd700;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hints p::before {
  content: "💡";
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  padding: 0.9rem;
  padding-right: 2.5rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
}

.input-wrapper .icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #aaa;
}

input:focus {
  border-color: var(--accent);
  outline: none;
}

button {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: bold;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(129, 65, 182, 0.2);
}
button:hover {
  background: #5c2c90;
}

#feedback {
  text-align: center;
  font-weight: bold;
  margin-top: 0.5rem;
}

#countdown {
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary);
}

.about {
  margin-top: 2rem;
  max-width: 480px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--secondary);
}

.about h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--secondary);
}
footer a {
  color: var(--accent);
  text-decoration: none;
}

#winPopup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.popup-content {
  background: white;
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#closePopupBtn {
  background: var(--accent);
  width: 48px;
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

#posterImg {
  display: block;
  max-width: 100%;
  max-height: 450px;
  margin: 1rem auto;
  border-radius: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lang-dropdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.lang-dropdown label {
  font-size: 1.2rem;
}

.lang-dropdown select {
  font-family: 'Poppins', sans-serif;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  border-radius: var(--radius);
  border: 1px solid #ccc;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  transition: border 0.2s ease;
}

.lang-dropdown select:hover {
  border-color: var(--accent);
}
