:root {
  --primary: #4361ee;
  --primary-light: #4895ef;
  --secondary: #3a0ca3;
  --accent: #f72585;
  --success: #4cc9f0;
  --warning: #f7b801;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --border-radius: 12px;
  --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  background: linear-gradient(135deg, #f5f7fb 0%, #e5e9f0 100%);
  color: var(--dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

header h1 {
  font-size: 2.8rem;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 15px;
}

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

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.option-cards {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.option-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  width: 300px;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.option-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.option-card i {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.option-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--secondary);
}

.option-card p {
  color: var(--gray);
  margin-bottom: 20px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

.input-section,
.results-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.back-button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition);
}

.back-button:hover {
  background: #f0f5ff;
}

.section-title {
  font-size: 1.5rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 300px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 25px;
  transition: var(--transition);
  line-height: 1.6;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

button {
  padding: 14px 78px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.analyze-btn {
  background: var(--primary);
  color: white;
}

.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

.clear-btn {
  background-color: var(--light);
  color: var(--gray);
}

.clear-btn:hover {
  background-color: #e9ecef;
}

.result-content {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.meaningfulness-score {
  text-align: center;
  margin-bottom: 30px;
}

.score-value {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin: 15px 10px;
}

.score-label {
  font-size: 1.2rem;
  color: var(--gray);
}

.score-bar {
  height: 14px;
  width: 100%;
  background-color: #e9ecef;
  border-radius: 7px;
  margin: 20px 0;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  width: 0%;
  transition: width 1s ease;
}

.meaningfulness-label {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 15px 0;
  padding: 12px 20px;
  border-radius: 30px;
}

.meaningful {
  background-color: rgba(76, 201, 240, 0.15);
  color: #4cc9f0;
}

.not-meaningful {
  background-color: rgba(247, 37, 133, 0.15);
  color: #f72585;
}

.analysis-details {
  margin-top: 30px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-value {
  font-weight: 600;
}

.loading {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e9ecef;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.placeholder {
  text-align: center;
  color: var(--gray);
  padding: 60px 0;
}

.placeholder i {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #adb5bd;
}

footer {
  text-align: center;
  padding: 25px 0;
  color: var(--gray);
  font-size: 0.9rem;
  flex-shrink: 0;
  background-color: transparent;
  border-top: 1px solid #e9ecef;
  width: 100%;
  margin-top: 40px;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.suggestion-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  margin-top: 30px;
}

.suggestion-content {
  margin-top: 20px;
}

.suggestion-text {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  line-height: 1.6;
}

.suggestion-text p {
  margin: 0;
  color: var(--dark);
}

.suggestion-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.copy-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background-color: var(--primary);
  color: white;
}

.copy-btn:hover {
  background-color: var(--secondary);
}
