* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 1px solid #333;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo i {
  font-size: 2.5rem;
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.logo h1 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.2rem;
  color: #999;
  font-weight: 300;
}

.main-content {
  display: grid;
  gap: 3rem;
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header i {
  font-size: 1.5rem;
  color: #00d4ff;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

.input-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.description {
  color: #ccc;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.input-container {
  position: relative;
  margin-bottom: 1.5rem;
}

#recoveryPhrase {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
  color: #e0e0e0;
  font-size: 1.1rem;
  font-family: "Courier New", monospace;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#recoveryPhrase:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#recoveryPhrase::placeholder {
  color: #666;
}

.word-counter {
  position: absolute;
  bottom: 0.8rem;
  right: 1.2rem;
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.validation-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  background: rgba(0, 123, 255, 0.1);
  border: 1px solid rgba(0, 123, 255, 0.2);
  color: #0099cc;
}

.validation-info.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.validation-info.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover:before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  border: 1px solid #333;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00d4ff;
}

.btn-outline {
  background: transparent;
  color: #ccc;
  border: 2px solid #333;
}

.btn-outline:hover {
  border-color: #666;
  color: #e0e0e0;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.preview-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.preview-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #444;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  min-height: 300px;
}

.phrase-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.word-item {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #555;
  border-radius: 8px;
  padding: 1rem;
  font-family: "Courier New", monospace;
  transition: border-color 0.3s ease;
}

.word-item:hover {
  border-color: #00d4ff;
}

.word-number {
  background: #00d4ff;
  color: #000;
  font-weight: 600;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 0.9rem;
}

.word-text {
  font-size: 1.1rem;
  color: #e0e0e0;
}

.security-notice {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.notice-header i {
  color: #ef4444;
  font-size: 1.3rem;
}

.notice-header h3 {
  color: #ef4444;
  font-size: 1.3rem;
}

.security-notice ul {
  list-style: none;
  padding-left: 0;
}

.security-notice li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  color: #ccc;
}

.security-notice li:before {
  content: "•";
  color: #ef4444;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.security-notice strong {
  color: #ef4444;
}

.footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #333;
  color: #666;
}

.disclaimer {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}

.author-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

.author-info p {
  font-size: 0.9rem;
  color: #888;
}

.author-info strong {
  color: #00d4ff;
}

.author-info a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.author-info a:hover {
  color: #00d4ff;
}

.author-info a strong {
  color: #00d4ff;
  transition: color 0.3s ease;
}

.author-info a:hover strong {
  color: #ffffff;
}

.author-info i {
  margin-right: 0.3rem;
  margin-left: 0.5rem;
}

.print-only {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  .print-only,
  .print-only * {
    visibility: visible;
  }

  .print-only {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block;
    background: white;
    color: black;
    padding: 20px;
    font-family: "Courier New", monospace;
  }

  .print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }

  .print-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #000;
  }

  .print-date {
    font-size: 12px;
    color: #666;
  }

  .phrase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
  }

  .print-word-item {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
  }

  .print-word-number {
    background: #000;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 12px;
    font-weight: bold;
  }

  .print-word-text {
    font-size: 14px;
    font-weight: bold;
  }

  .print-instructions {
    margin-bottom: 20px;
  }

  .print-instructions h3 {
    margin-bottom: 15px;
    font-size: 16px;
  }

  .print-instructions ol {
    padding-left: 20px;
  }

  .print-instructions li {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .print-warning {
    background: #f0f0f0;
    border: 2px solid #000;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 2rem;
  }

  .input-section,
  .preview-section {
    padding: 1.5rem;
  }

  .phrase-preview {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .word-counter {
    position: static;
    margin-top: 1rem;
    display: inline-block;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .word-item {
    padding: 0.8rem;
  }

  .word-number {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
}
