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

.hidden {
  display: none !important;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: #f9fafb;
  color: #333;
}

.site-header {
  padding: 1rem 2rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  object-fit: contain;
}

.container {
  max-width: 960px;
  margin: 180px auto 2rem;
  padding: 0 1rem;
}

h1 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.input-group {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

#url-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.btn-check {
  padding: 0.75rem 1.5rem;
  background: #4ade80;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity .2s, transform .1s;
}

.btn-check:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-check:not(:disabled):hover {
  opacity: .9;
}

.btn-check:not(:disabled):active {
  transform: scale(.98);
}

.global-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #4ade80;
  margin-top: 1rem;
  gap: 0.5rem;
}

.spinner-circle {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4ade80;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.grid-result {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1rem;
  margin-top: 2rem;
}

@media(max-width:900px) {
  .grid-result { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:600px) {
  .grid-result { grid-template-columns: 1fr; }
}

.column {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

.column h4 {
  text-transform: uppercase;
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: .5rem;
  font-weight: 600;
}

.column ul {
  list-style: none;
  padding: 0;
  flex: 1;
  overflow: auto;
  margin-bottom: 2.5rem;
}

.column li {
  display: flex;
  align-items: center;
  padding: .4rem 0;
  font-size: 0.95rem;
}

.column li span.emoji {
  width: 20px;
  text-align: center;
  margin-right: .5rem;
  transition: transform 0.3s ease;
}

.column li .emoji:empty {
  transform: scale(1);
}

.column li .emoji:not(:empty) {
  transform: scale(1.2);
}

.column li .value {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: #555;
}

.section-pct {
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  padding-top: .5rem;
  border-top: 1px solid #eee;
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  transition: color 0.3s ease;
}

.section-pct.red {
  color: #dc2626;
}

.section-pct.orange {
  color: #f97316;
}

.section-pct.green {
  color: #16a34a;
}

.overall {
  border-top: 2px solid #ddd;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.overall.red { color: #dc2626; }
.overall.orange { color: #f97316; }
.overall.green { color: #16a34a; }

.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: .875rem;
  color: #777;
}

.error {
  color: red;
  text-align: center;
  margin-top: 1rem;
}

/* Прогресс-бар */
.progress-bar {
  height: 4px;
  background: #4ade80;
  width: 0%;
  transition: width 0.3s ease;
  position: fixed;
  top: 60px;
  left: 0;
  z-index: 99;
}

.loader-inline {
  box-sizing: border-box; /* Решаем главную проблему */
  width: 16px;
  height: 16px;
  border: 3px solid #ddd;
  border-top: 3px solid #4ade80;
  border-radius: 50%;
  margin-right: .5rem;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
  display: block;
}


/* Анимация появления */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s forwards;
}

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

/* История URL */
.history {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.history-btn {
  background: #4ade80;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  margin: 0.3rem;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-block;
  transition: background 0.2s ease;
}

.history-btn:hover {
  background: #3fd66f; /* чуть темнее при hover */
}