/* WIA Talk - Gesture Catalog Styles */
/* Philosophy: 홍익인간 (弘益人間) - Benefit All Humanity */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5em;
  color: #667eea;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.2em;
  color: #764ba2;
  font-weight: 500;
  margin-bottom: 5px;
}

.description {
  font-size: 1em;
  color: #666;
  font-style: italic;
}

/* Search Section */
.search-section {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  margin: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-bar {
  margin-bottom: 15px;
}

.search-bar input {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.1em;
  border: 2px solid #667eea;
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
}

.search-bar input:focus {
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  font-size: 0.95em;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.filter-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #764ba2;
}

/* Main Container */
.container {
  flex: 1;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Gesture Grid */
.gesture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.gesture-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gesture-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.gesture-emoji {
  font-size: 4em;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.gesture-code {
  font-size: 1.2em;
  font-weight: bold;
  color: #667eea;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
}

.gesture-name-ko {
  font-size: 1.1em;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 5px;
}

.gesture-name-en {
  font-size: 0.95em;
  color: #636e72;
  font-style: italic;
}

.gesture-category {
  margin-top: 10px;
  padding: 5px 12px;
  background: #f1f3f5;
  border-radius: 15px;
  font-size: 0.85em;
  color: #495057;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2em;
  color: white;
  grid-column: 1 / -1;
}

/* Modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
}

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

.close-btn {
  color: #aaa;
  float: right;
  font-size: 2em;
  font-weight: bold;
  cursor: pointer;
  padding: 10px 20px;
  line-height: 1;
}

.close-btn:hover {
  color: #000;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.modal-emoji {
  font-size: 5em;
}

.modal-info {
  flex: 1;
}

.modal-code {
  font-size: 1.8em;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
}

.modal-name-ko {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 5px;
}

.modal-name-en {
  font-size: 1.1em;
  opacity: 0.9;
  font-style: italic;
}

.modal-body {
  padding: 30px;
}

.detail-section {
  margin-bottom: 25px;
}

.detail-section h3 {
  color: #667eea;
  font-size: 1.2em;
  margin-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.component-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.component-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9em;
}

.component-item code {
  background: #667eea;
  color: white;
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
}

.full-component-code {
  padding: 15px;
  background: #2d3436;
  border-radius: 8px;
  text-align: center;
}

.full-component-code span {
  color: #95a5a6;
  font-size: 0.9em;
  margin-right: 10px;
}

.full-component-code code {
  color: #00b894;
  font-weight: bold;
  font-size: 1em;
}

.translation-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.translation-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.translation-lang {
  font-weight: 600;
  color: #495057;
  min-width: 80px;
}

.translation-word {
  font-size: 1.2em;
  color: #2d3436;
  font-weight: 600;
}

.category-badge {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-weight: 600;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e9ecef;
  text-align: right;
}

.btn-close {
  padding: 12px 30px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 0.9em;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
  margin: 5px 0;
}

footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8em;
  }

  .gesture-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.85em;
  }

  .component-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .modal-header {
    flex-direction: column;
    text-align: center;
  }
}
