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

:root {
  --primary-blue: #4f46e5;
  /* Indigo 600 - 新主色 */
  --primary-light: #6366f1;
  /* Indigo 500 */
  --primary-lighter: #818cf8;
  /* Indigo 400 */
  --primary-dark: #312e81;
  /* Indigo 900 */
  --accent-cyan: #0ea5e9;
  /* Sky 500 */
  --accent-purple: #d946ef;
  /* Fuchsia 500 */
  --accent-green: #10b981;
  /* Emerald 500 */
  --accent-orange: #f97316;

  --accent-red: #ef4444;    
  --accent-red-dark: #dc2626; 

  /* Orange 500 */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  /* Slate 50 */
  --bg-dark: #0f172a;
  /* Slate 900 */
  --text-dark: #1e293b;
  /* Slate 800 */
  --text-gray: #64748b;
  /* Slate 500 */
  --text-light: #cbd5e1;
  /* Slate 300 */
  --border-color: #e2e8f0;
  /* Slate 200 */
  --border-subtle: #f1f5f9;
  /* Slate 100 */
  --blur-sm: 8px;
  --blur-md: 12px;
  --blur-lg: 16px;
  --border-radius: 16px;

  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

* {
  box-sizing: border-box
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 32px 32px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-dark);
  /* 标题使用新的主色渐变 */
  background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: .875rem
}

h4 {
  font-size: 1.25rem;
  margin-bottom: .75rem
}

h5 {
  font-size: 1.125rem;
  margin-bottom: .625rem
}

h6 {
  font-size: 1rem;
  margin-bottom: .5rem
}

p {
  margin: 0 0 1rem;
  color: var(--text-gray);
  line-height: 1.7
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative
}

a:hover {
  color: var(--primary-dark)
}

a:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 4px
}

header {
  background: linear-gradient(135deg, var(--primary-dark) 0, var(--primary-blue) 100%);
  color: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--blur-md));
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 70px
}

.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
  text-decoration: none
}

.logo svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .1));
  transition: transform var(--transition-fast)
}

.logo:hover svg {
  transform: scale(1.1) rotate(5deg)
}

.logo h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--bg-white);
  background: 0 0;
  -webkit-text-fill-color: unset;
  font-weight: 700;
  letter-spacing: -1px
}

.logo a {
  color: var(--bg-white)
}

.logo a:hover {
  color: var(--primary-lighter)
}

#mainNav {
  flex: 1;
  display: flex;
  justify-content: center
}

#mainNav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .5rem
}

#mainNav li {
  position: relative
}

#mainNav a {
  display: inline-block;
  color: rgba(255, 255, 255, .9);
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem 1.25rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  position: relative
}

#mainNav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-lighter);
  transition: width var(--transition-fast);
  border-radius: 2px
}

#mainNav a:hover {
  background-color: rgba(255, 255, 255, .1);
  color: var(--bg-white)
}

#mainNav a.active {
  background-color: rgba(255, 255, 255, .2);
  color: var(--bg-white)
}

#mainNav a.active::after {
  width: 100%
}

.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: var(--bg-white);
  cursor: pointer;
  padding: .5rem;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all var(--transition-fast)
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, .25)
}

.lang-selector {
  position: relative;
  flex-shrink: 0
}

.lang-btn {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--bg-white);
  padding: .5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
  font-size: .9rem;
  transition: all var(--transition-fast);
  backdrop-filter: blur(var(--blur-sm))
}

.lang-btn:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-2px)
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  min-width: 320px;
  max-width: 400px;
  z-index: 1000;
  overflow: hidden;
  animation: slideDown .2s ease
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.lang-dropdown.active,
.lang-dropdown.show {
  display: flex;
  flex-wrap: wrap
}

.lang-item {
  padding: .75rem 1rem;
  color: var(--text-dark);
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  flex: 0 0 50%;
  box-sizing: border-box
}

.lang-item:nth-child(odd) {
  border-right: 1px solid var(--border-subtle)
}

.lang-item:hover {
  background: var(--bg-light);
  color: var(--primary-blue);
  padding-left: 1.25rem
}

.lang-item.active {
  background: linear-gradient(135deg, var(--primary-light) 0, var(--accent-cyan) 100%);
  color: var(--bg-white)
}

main {
  flex: 1
}

.container {
  max-width: 1400px;
  margin: .2rem auto;
  padding: 0 1.5rem;
  width: 100%
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal)
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  transform: translateY(-2px)
}

.card h3 {
  margin-top: 0;
  margin-bottom: 1rem
}

.btn,
button,
input[type=submit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .75rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: 0;
  user-select: none;
  position: relative;
  overflow: hidden
}

.btn::before,
button::before,
input[type=submit]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transform: translate(-50%, -50%);
  transition: width .6s, height .6s
}

.btn:active::before,
button:active::before,
input[type=submit]:active::before {
  width: 300px;
  height: 300px
}

.btn:focus-visible,
button:focus-visible,
input[type=submit]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0, var(--primary-light) 100%);
  color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(30, 64, 175, .3)
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(30, 64, 175, .4);
  transform: translateY(-2px)
}

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

.btn-purple {
  background: linear-gradient(135deg, #7c3aed 0, #c084fc 100%);
  color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(124, 58, 237, .3)
}

.btn-purple:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, .4);
  transform: translateY(-2px)
}

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

.btn-success {
  background: linear-gradient(135deg, var(--accent-green) 0, #34d399 100%);
  color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(16, 185, 129, .3)
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, .4);
  transform: translateY(-2px)
}
.btn-danger {
  background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-dark) 100%);
  color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(239, 68, 68, .3);
  transition: all .2s ease;
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, .4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color)
}

.btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--primary-light);
  color: var(--primary-blue)
}

.form-group {
  margin-bottom: 1.5rem
}

label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: .95rem
}

input[type=email],
input[type=number],
input[type=text],
select,
textarea {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: all var(--transition-fast)
}

input[type=email]::placeholder,
input[type=number]::placeholder,
input[type=text]::placeholder,
textarea::placeholder {
  color: var(--text-light)
}

input[type=email]:focus,
input[type=number]:focus,
input[type=text]:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .1);
  background: var(--bg-white)
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: Menlo, Monaco, 'Courier New', monospace
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.5rem;
  appearance: none
}

.form-hint {
  font-size: .85rem;
  color: var(--text-gray);
  margin-top: .375rem;
  line-height: 1.5
}

.home-hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem 0
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark) 0, var(--primary-blue) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal)
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px)
}

.feature-card:hover::before {
  transform: scaleX(1)
}

.card-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  transition: transform var(--transition-normal)
}

.feature-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg)
}

.card-icon svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .1))
}

.feature-card h3 {
  margin-bottom: .75rem;
  font-size: 1.375rem
}

.feature-card p {
  font-size: .95rem;
  margin-bottom: 1.5rem;
  color: var(--text-gray)
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left
}

.feature-list li {
  padding: .5rem 0;
  color: var(--text-gray);
  position: relative;
  padding-left: 1.75rem;
  font-size: .95rem
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1.1rem
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative
}

.faq-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  transform: translateY(-2px)
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-light) 0, var(--border-subtle) 100%);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative
}

.faq-item:hover .faq-question {
  background: linear-gradient(135deg, var(--border-subtle) 0, var(--bg-light) 100%)
}

.faq-question svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--primary-blue);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center
}

.faq-item.active .faq-question svg {
  color: var(--primary-light);
  transform: rotate(180deg) scale(1.1)
}

.faq-question h3 {
  margin: 0;
  font-size: 1.05rem;
  background: 0 0;
  -webkit-text-fill-color: unset;
  text-align: left;
  color: var(--text-dark);
  font-weight: 600;
  transition: color var(--transition-fast)
}

.faq-item:hover .faq-question h3 {
  color: var(--primary-blue)
}

.faq-answer {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--bg-white);
  border-top: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  opacity: 0
}

.faq-item.active .faq-answer {
  padding: 1.5rem;
  max-height: 1000px;
  opacity: 1;
  border-top: 1px solid var(--border-color)
}

.faq-answer p {
  margin: 0;
  color: var(--text-gray);
  line-height: 1.8;
  font-size: .95rem
}

.faq-answer p+p {
  margin-top: 1rem
}

@media (max-width:768px) {
  .faq-container {
    gap: 1rem
  }

  .faq-question {
    padding: 1.25rem
  }

  .faq-question h3 {
    font-size: 1rem
  }

  .faq-answer {
    padding: 1.25rem
  }

  .faq-item.active .faq-answer {
    padding: 1.25rem
  }
}

@media (max-width:480px) {
  .faq-container {
    gap: .75rem
  }

  .faq-item {
    border-radius: 8px
  }

  .faq-question {
    padding: 1rem;
    gap: .75rem
  }

  .faq-question svg {
    width: 20px;
    height: 20px
  }

  .faq-question h3 {
    font-size: .95rem
  }

  .faq-answer {
    padding: 1rem
  }

  .faq-item.active .faq-answer {
    padding: 1rem
  }

  .faq-answer p {
    font-size: .9rem;
    line-height: 1.6
  }
}

@keyframes expandAnswer {
  from {
    opacity: 0;
    transform: translateY(-10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.faq-item.active .faq-answer {
  animation: expandAnswer .3s ease forwards
}

.faq-question::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-blue) 0, var(--accent-cyan) 100%);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-normal)
}

.faq-item:hover .faq-question::before {
  transform: scaleY(1)
}

.page-title {
  text-align: center;
  margin: 2.5rem 0;
  font-size: clamp(2rem, 5vw, 2.5rem)
}

.analyzer-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem
}

.input-card,
.results-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md)
}

.text-input {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: Menlo, Monaco, 'Courier New', monospace;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
  resize: vertical;
  transition: all var(--transition-fast)
}

.text-input:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .1)
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem
}

.stat-item {
  background: linear-gradient(135deg, var(--bg-light) 0, var(--border-subtle) 100%);
  border-radius: 10px;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  cursor: default
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light)
}

.stat-item h4 {
  margin: 0 0 .75rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: 0 0;
  -webkit-text-fill-color: unset
}

.value {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--primary-blue) 0, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.word-frequency {
  margin-top: 2rem
}

.word-frequency h4 {
  margin-bottom: 1rem;
  background: 0 0;
  -webkit-text-fill-color: unset
}

.word-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-light);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .05);
  margin-top: 10px;
}

.word-item {
  display: flex;
  justify-content: space-between;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  transition: all var(--transition-fast)
}

.word-item:hover {
  background: var(--bg-white);
  padding-left: 1.25rem
}

.word-item:last-child {
  border-bottom: none
}

.word {
  font-weight: 600;
  color: var(--primary-blue);
  word-break: break-word;
  flex: 1
}

.frequency {
  color: var(--text-gray);
  font-size: .85rem;
  white-space: nowrap;
  margin-left: 1rem;
  background: var(--bg-white);
  padding: .25rem .75rem;
  border-radius: 6px;
  font-weight: 500
}

.info-section {
  margin-top: 4rem;
  padding-top: 3rem;
  padding-bottom: 3rem
}

.info-section h2 {
  text-align: center;
  margin-bottom: 3rem
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem
}

.info-item {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden
}

.info-item::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, .1) 0, transparent 70%);
  transition: all var(--transition-normal);
  z-index: 0
}

.info-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px)
}

.info-item:hover::before {
  transform: translate(-20%, -20%)
}

.info-item>* {
  position: relative;
  z-index: 1
}

.info-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem
}

.info-icon svg {
  width: 48px;
  height: 48px;
  transition: transform var(--transition-normal)
}

.info-item:hover .info-icon svg {
  transform: scale(1.1)
}

.info-item h3 {
  margin-bottom: .75rem
}

.info-item p {
  margin: 0;
  color: var(--text-gray);
  font-size: .95rem
}

footer {
  background: linear-gradient(135deg, var(--primary-dark) 0, var(--primary-blue) 100%);
  color: var(--bg-white);
  padding: 1rem 0 2rem
}

footer .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem
}

.footer-info p {
  color: rgba(255, 255, 255, .9);
  margin: .5rem 0;
  font-size: .95rem;
  text-align: center
}

.footer-designer {
  font-size: .85rem;
  opacity: .8;
  margin-top: 1rem
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
  flex-wrap: wrap
}

.form-calculator {
  background: linear-gradient(135deg, var(--bg-light) 0, var(--border-subtle) 100%);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color)
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem
}

.form-group {
  display: flex;
  flex-direction: column
}

.form-group label {
  margin-bottom: .5rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-dark)
}

.controls-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: 10px;
  border: 1px solid var(--border-color)
}

.control-group {
  display: flex;
  flex-direction: column
}

.control-group label {
  margin-bottom: .5rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-dark)
}

.control-group input,
.control-group select {
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: .95rem;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: all var(--transition-fast)
}

.control-group input:focus,
.control-group select:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .1)
}

.format-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: 10px;
  border: 1px solid var(--border-color)
}

.format-group {
  display: flex;
  flex-direction: column
}

.format-group label {
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-dark)
}

.format-group input {
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: .95rem;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: all var(--transition-fast)
}

.format-group input:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .1)
}

.margins-group {
  display: flex;
  flex-direction: column
}

.margins-group label {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-dark)
}

.margin-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem
}

.margin-input {
  display: flex;
  flex-direction: column
}

.margin-label {
  margin-bottom: .5rem;
  font-weight: 500;
  font-size: .85rem;
  color: var(--text-gray)
}

.input-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden
}

.input-group input {
  flex: 1;
  padding: .7rem;
  border: none;
  border-radius: 0;
  font-size: .95rem;
  background: var(--bg-white);
  color: var(--text-dark)
}

.input-group input:focus {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--primary-blue);
  background: var(--bg-white)
}

.input-group-addon {
  padding: .75rem 1rem;
  background: var(--bg-light);
  color: var(--text-gray);
  font-size: .9rem;
  font-weight: 500;
  border-left: 1px solid var(--border-color);
  white-space: nowrap
}

.text-input-group {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: 10px;
  border: 1px solid var(--border-color)
}

.text-input-group label {
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-dark);
  display: block
}

.text-input-group textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: Menlo, Monaco, 'Courier New', monospace;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
  resize: vertical;
  transition: all var(--transition-fast)
}

.text-input-group textarea:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, .1)
}

.text-input-group textarea::placeholder {
  color: var(--text-light)
}

.hidden-textarea {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none
}

.print_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, var(--primary-blue) 0, var(--primary-light) 100%);
  color: var(--bg-white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(30, 64, 175, .3)
}

.print_button:hover {
  box-shadow: 0 6px 20px rgba(30, 64, 175, .4);
  transform: translateY(-2px)
}

.print_button:active {
  transform: translateY(0)
}

.print-icon {
  width: 16px;
  height: 16px
}

@media (max-width:768px) {
  .format-row {
    grid-template-columns: 1fr;
    gap: 1.5rem
  }

  .controls-row {
    grid-template-columns: 1fr;
    gap: 1rem
  }

  .margin-inputs {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:480px) {
  .format-row {
    grid-template-columns: 1fr;
    padding: 1rem
  }

  .controls-row {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem
  }

  .margin-inputs {
    grid-template-columns: 1fr
  }

  .text-input-group {
    padding: 1rem
  }

  .text-input-group textarea {
    min-height: 150px;
    font-size: .85rem
  }

  .form-row {
    gap: 1rem
  }
}

.ad-container {
  margin: 3rem 0;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color)
}

.links-section {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 2px solid var(--border-color)
}

.links-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: clamp(1.5rem, 4vw, 2.5rem)
}

.links-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-light) 0, var(--border-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--primary-blue);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden
}

.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  transition: left var(--transition-normal)
}

.link-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  background: linear-gradient(135deg, var(--primary-light) 0, var(--accent-cyan) 100%);
  color: var(--bg-white);
  transform: translateY(-4px)
}

.link-item:hover::before {
  left: 100%
}

.link-item:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px
}

@media (max-width:768px) {
  .links-section {
    margin-top: 3rem;
    padding: 2rem 0
  }

  .links-section h2 {
    margin-bottom: 2rem;
    font-size: 1.75rem
  }

  .links-container {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem
  }

  .link-item {
    padding: 1.25rem 1rem;
    font-size: .9rem
  }
}

@media (max-width:480px) {
  .links-section {
    margin-top: 2rem;
    padding: 1.5rem 0
  }

  .links-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem
  }

  .links-container {
    grid-template-columns: 1fr;
    gap: 1rem
  }

  .link-item {
    padding: 1rem;
    font-size: .85rem
  }
}

.ad-container {
  margin: 3rem 0;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-white);
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color)
}

.fade-in {
  animation: fadeIn .6s ease forwards
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.text-center {
  text-align: center
}

.text-left {
  text-align: left
}

.text-right {
  text-align: right
}

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-gray)
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: .5
}

.features-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color)
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.features-list li {
  padding: .75rem 0;
  color: var(--text-gray);
  position: relative;
  padding-left: 1.75rem;
  font-size: .95rem
}

.features-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 700
}

@media (max-width:768px) {
  :root {
    font-size: 15px
  }

  .header-content {
    height: auto;
    padding: .75rem 1rem;
    gap: .75rem
  }

  .logo h1 {
    font-size: 1.25rem
  }

  #mainNav {
    order: 3;
    width: 100%;
    display: none
  }

  #mainNav.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0, var(--primary-blue) 100%);
    padding: .75rem 0;
    z-index: 99;
    box-shadow: var(--shadow-lg)
  }

  #mainNav ul {
    flex-direction: column;
    gap: 0;
    width: 100%
  }

  #mainNav li {
    width: 100%
  }

  #mainNav a {
    display: block;
    padding: .75rem 1rem;
    border-radius: 0;
    color: rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(255, 255, 255, .1)
  }

  #mainNav li:last-child a {
    border-bottom: none
  }

  .mobile-menu-toggle {
    display: flex
  }

  .container {
    padding: 0 1rem;
    margin: 1.5rem auto
  }

  .analyzer-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem
  }

  .features-grid {
    grid-template-columns: 1fr
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem
  }

  .footer-links {
    justify-content: flex-start
  }

  .info-grid {
    grid-template-columns: 1fr
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .hero-title {
    font-size: 2rem
  }

  h2 {
    font-size: 1.5rem
  }
}

@media (max-width:480px) {
  .header-content {
    padding: .75rem;
    gap: .5rem
  }

  .logo {
    gap: .5rem
  }

  .logo svg {
    width: 28px;
    height: 28px
  }

  .logo h1 {
    font-size: 1.125rem
  }

  .container {
    padding: 0 .75rem;
    margin: 1rem auto
  }

  .card {
    padding: 1.5rem 1rem
  }

  .btn,
  button,
  input[type=submit] {
    padding: .625rem 1rem;
    font-size: .9rem
  }

  .stat-item {
    padding: 1rem
  }

  .value {
    font-size: 1.875rem
  }

  .word-list {
    max-height: 300px
  }

  .hero-title {
    font-size: 1.5rem
  }

  h2 {
    font-size: 1.25rem
  }

  .feature-card {
    padding: 1.5rem 1rem
  }

  .footer-content {
    grid-template-columns: 1fr
  }

  .info-grid {
    grid-template-columns: 1fr
  }
}

@media print {

  .ad-container,
  .lang-selector,
  .mobile-menu-toggle,
  footer,
  header {
    display: none
  }

  body {
    background: var(--bg-white)
  }

  .container {
    max-width: 100%;
    box-shadow: none;
    margin: 0;
    padding: 0
  }

  .card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--border-color)
  }

  .btn,
  button {
    display: none
  }
}

/* Random Word Generator Styles */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--primary-dark), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

.tool-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 1.5rem;
}

.control-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-end;
}

.control-panel .control-group {
  flex: 1;
  min-width: 200px;
}

.input-field {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: all var(--transition-fast);
}

.input-field:focus {
  outline: 0;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.output-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.output-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.output-area {
  min-height: 200px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
  white-space: pre-wrap;
  word-break: break-word;
  transition: all var(--transition-fast);
}

.output-area:hover {
  border-color: var(--primary-lighter);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.placeholder-text {
  color: var(--text-gray);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 150px;
  font-style: italic;
  margin: 0;
}

.stats-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}

.stats-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.stats-grid .stat-item {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast);
}

.stats-grid .stat-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.stats-grid .stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stats-grid .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

@media (max-width: 768px) {
  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .control-panel .btn {
    width: 100%;
    margin-top: 1rem;
  }

  .tool-container {
    padding: 0 1rem;
  }
}