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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dark mode */
body.dark {
  background: linear-gradient(135deg, #1f1f1f, #2c2c2c);
  color: #e4e4e4;
}

header {
  padding: 2rem;
  text-align: center;
  position: relative;
}

.animated-header {
  font-size: 2.5rem;
  font-weight: 700;
  color: #6015d1;
}

.animated-header span {
  color: #ef5b25;
}

.tagline {
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: inherit;
}

.container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

body.dark .card {
  background: rgba(40, 40, 40, 0.8);
}

h2 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

textarea {
  width: 100%;
  height: 280px;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 1rem;
  resize: none;
  margin-bottom: 12px;
  background: #f9f9f9;
  border: 2px solid #ccc;
}

body.dark textarea {
  background: #333;
  color: #e4e4e4;
}

.info-bar, .actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-options select {
  padding: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: #ef5b25;
  color: #fff;
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.secondary {
  background: #6015d1;
  color: #fff;
}

.summary-count {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #777;
}

footer {
  background: #00f0c0;
  padding: 15px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-content p {
  font-size: 0.9rem;
}

.socials a {
  margin: 0 10px;
  font-size: 1.2rem;
  color: inherit;
  transition: color 0.3s ease;
}

.socials a:hover {
  color: #ef5b25;
}
/* Loading state */
.btn.primary.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn.primary.loading .submit-button-text {
  visibility: hidden;
  opacity: 0;
}

.btn.primary.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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