/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(to right, #74ebd5, #acb6e5);
  height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", sans-serif;
}

.jp-flag {
  width: 40px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: float 1.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4f46e5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px; /* Prevents notch from being cut off */
}


/* Phone Frame */
.phone-frame {
  width: 360px;
  height: 700px;
  background: #fefefe;
  border-radius: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* Phone Notch */
.phone-notch {
  width: 140px;
  height: 30px;
  background-color: #333;
  border-radius: 0 0 20px 20px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Phone Screen */
.screen {
  padding: 60px 20px 20px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  background: linear-gradient(to bottom right, #ffffff, #f4f4f4);
}

/* Header */
h1 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #333;
}
/* Input Field */
form input[type="text"] {
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  background-color: #f0f4ff;
  color: #1f2937;
  transition: all 0.3s ease;
}

form input[type="text"]:focus {
  background-color: #e0e7ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
form input[type="text"],
form button {
  max-width: 300px;
  align-self: center;
}

/* Make form elements stack nicely */
form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}


/* Generate Button */
form button {
  background-color: #4f46e5;
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

form button:hover {
  background-color: #3730a3;
  box-shadow: 0 6px 20px rgba(55, 48, 163, 0.6);
}

/* Sentence Output Cards */
.card {
  background: rgba(240, 240, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 14px;
  margin-top: 10px;
  border-radius: 18px;
  font-size: 1.1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease-in-out;
}

.jp {
  font-size: 1.4rem;
  font-weight: bold;
  color: #1f2937;
}

.romaji {
  font-style: italic;
  color: #4b5563;
}

.en {
  color: #065f46;
}

/* Footer inside phone screen */
footer {
  font-size: 0.75rem;
  color: #4b5563;
  text-align: center;
  padding: 10px 10px 0;
  line-height: 1.4;
}

footer a {
  color: #4f46e5;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

