/* 힐링 명언 웹사이트 스타일 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans KR", "Malgun Gothic", "맑은 고딕",
    "Apple SD Gothic Neo", sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.controls {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.control-group {
  margin-bottom: 15px;
}

.control-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.control-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

input,
select,
button {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

input[type="text"] {
  flex: 1;
  min-width: 200px;
}

button {
  background: #667eea;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #5a6fd8;
}

.category-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.category-btn {
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
}

.category-btn:hover {
  background: #e9ecef;
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

.category-btn.active:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.more-button {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.more-button:hover {
  background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.more-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.quote-item.focused {
  border: 2px solid #667eea;
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
  transform: translateY(-5px) scale(1.02);
  animation: focusPulse 2s ease-in-out;
}

@keyframes focusPulse {
  0% { box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5); }
  100% { box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3); }
}



.results {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.results-content {
  padding: 0;
}

.results-header {
  background: #667eea;
  color: white;
  padding: 15px 20px;
  font-weight: bold;
}

.quote-item {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  margin: 20px;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.quote-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.quote-item::after {
  content: '"';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 4em;
  color: rgba(102, 126, 234, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}

.quote-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.3);
}

.quote-text {
  font-family: "Noto Sans KR", "맑은 고딕", "Malgun Gothic",
    "Apple SD Gothic Neo", sans-serif;
  font-size: 1.2em;
  line-height: 1.9;
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #2c3e50;
  position: relative;
  z-index: 1;
}

.quote-author {
  text-align: right;
  color: #667eea;
  font-weight: 500;
  font-size: 0.95em;
  margin-top: 15px;
  position: relative;
  z-index: 1;
}

.quote-author .author-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  position: relative;
}

.quote-author .author-clickable:hover {
  background-color: rgba(102, 126, 234, 0.1);
  color: #5a6fd8;
  text-decoration: underline;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.quote-author .author-clickable:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(102, 126, 234, 0.3);
}

.quote-category {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  margin-bottom: 15px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  position: relative;
  z-index: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  color: #667eea;
  margin-bottom: 15px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.author-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 5px;
  padding: 8px 5px;
  margin: 2px 0;
}

.author-clickable:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.author-link {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
}

.author-clickable:hover .author-link {
  color: #5a6fd8;
  text-decoration: underline;
}

.category-clickable {
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 5px;
  padding: 8px 5px;
  margin: 2px 0;
}

.category-clickable:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.category-link {
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
}

.category-clickable:hover .category-link {
  color: #5a6fd8;
  text-decoration: underline;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.encouragement-section {
  margin: 30px 20px 20px 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.encouragement-text {
  color: white;
  font-size: 1.1em;
  font-weight: 500;
  line-height: 1.6;
  font-family: "Noto Sans KR", "맑은 고딕", "Malgun Gothic",
    "Apple SD Gothic Neo", sans-serif;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header h1 {
    font-size: 2em;
  }

  .controls {
    padding: 15px;
  }

  .control-row {
    flex-direction: column;
  }

  .category-buttons {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
  }

  .quote-item {
    margin: 10px;
    padding: 20px;
  }

  .quote-text {
    font-size: 1.1em;
    line-height: 1.7;
  }

  .encouragement-section {
    margin: 20px 10px 15px 10px;
    padding: 15px;
  }

  .encouragement-text {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.8em;
  }

  .category-buttons {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .quote-item {
    margin: 8px;
    padding: 15px;
  }

  .quote-text {
    font-size: 1em;
  }

  .quote-item::after {
    font-size: 3em;
    top: 10px;
    right: 15px;
  }
}