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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 50px 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 40px rgba(0, 0, 0, 0.06);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 48px;
  font-weight: 300;
  margin-bottom: 8px;
  color: #000;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 16px;
  color: #666;
  font-weight: 400;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.form-group {
  margin-bottom: 24px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

textarea {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  background: #ffffff;
}

textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #ffffff;
}

input[type="password"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  padding: 12px 24px;
  background: #f5f5f5;
  color: #333;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #ebebeb;
  border-color: #d0d0d0;
}

.result {
  margin-top: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #f0fff4 0%, #e6f7ed 100%);
  border-radius: 12px;
  border: 1.5px solid #86efac;
  animation: slideIn 0.4s ease-out;
  text-align: center;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.success-text {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: #065f46;
}

.warning-text {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
}

.link-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.link-container input {
  flex: 1;
  background: #fff;
  text-align: center;
  font-weight: 500;
}

.hidden {
  display: none;
}

.error {
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 10px;
  border: 1.5px solid #f87171;
  color: #991b1b;
  font-size: 15px;
  font-weight: 500;
  animation: shake 0.4s;
  text-align: center;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.memo-content {
  margin-top: 30px;
  animation: fadeIn 0.4s ease-out;
}

.memo-header {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.memo-content pre {
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1.5px solid #e0e0e0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
  color: #1a1a1a;
}

.password-form {
  margin-top: 40px;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.lock-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
  font-weight: 500;
}

.footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1.5px solid #f0f0f0;
  text-align: center;
}

.footer a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #4a90e2;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.terms-container {
  max-width: 800px;
}

.terms-content {
  margin-top: 30px;
}

.terms-content section {
  margin-bottom: 32px;
}

.terms-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #000;
}

.terms-content p {
  margin-bottom: 12px;
  color: #333;
  line-height: 1.7;
}

.terms-content ul {
  margin-left: 24px;
  margin-top: 8px;
}

.terms-content li {
  margin-bottom: 8px;
  color: #333;
  line-height: 1.7;
}

.back-link {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1.5px solid #f0f0f0;
  text-align: center;
}

.back-link a {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.back-link a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

@media (max-width: 640px) {
  .container {
    padding: 40px 24px;
  }

  h1 {
    font-size: 36px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }
}
