/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #212121;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fafafa;
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Header */
.header {
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 2.5rem;
  color: #fff;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-weight: 500;
  color: #666;
  flex: 1 1 auto;
  min-width: 120px;
  justify-content: center;
  text-align: center;
}

.tab:hover {
  background: #f5f5f5;
  color: #1976d2;
}

.tab.active {
  color: #1976d2;
  border-bottom-color: #1976d2;
  background: #e3f2fd;
}

.tab .material-icons {
  font-size: 1.2rem;
}

/* Content */
.content {
  padding: 2rem;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-bottom: 1px solid #e0e0e0;
}

.card-header .material-icons {
  color: #1976d2;
  font-size: 1.5rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #333;
}

.card-content {
  padding: 2rem;
}

/* Highlight Box */
.highlight-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
  border-left: 4px solid #4caf50;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.highlight-box .material-icons {
  color: #4caf50;
  font-size: 1.5rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.feature-item .material-icons {
  font-size: 2.5rem;
  color: #1976d2;
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
}

.feature-item p {
  color: #666;
  font-size: 0.9rem;
}

/* Steps */
.steps {
  margin-top: 1.5rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.step-content p {
  margin-bottom: 1rem;
  color: #555;
}

.image-container {
  margin: 1rem 0;
}

.step-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Note Boxes */
.note {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.note .material-icons {
  color: #2196f3;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.warning-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.warning-box .material-icons {
  color: #ff9800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.success-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
  border-left: 4px solid #4caf50;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.success-box .material-icons {
  color: #4caf50;
  font-size: 1.5rem;
}

/* Code Block */
.code-block {
  background: #263238;
  border-radius: 8px;
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #37474f;
  color: white;
  font-size: 0.9rem;
}

.code-header span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1976d2;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.3s ease;
}

.copy-btn:hover {
  background: #1565c0;
}

.code-block pre {
  padding: 1.5rem;
  overflow-x: auto;
  color: #eceff1;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.code-block code {
  color: #eceff1;
}

/* JSON Details */
.json-details {
  margin-top: 2rem;
}

.json-details h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin: 2rem 0 1rem 0;
  color: #333;
}

.json-details h3 .material-icons {
  color: #1976d2;
}

.table-container {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.details-table th {
  background: #f5f5f5;
  padding: 1rem;
  text-align: left;
  font-weight: 500;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
}

.details-table td {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.details-table td code {
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #d32f2f;
}

.details-table tr:hover {
  background: #f9f9f9;
}

/* Links */
.link {
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.link:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* Support Section */
.support-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.support-text {
  flex: 1;
}

.support-buttons {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.support-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.support-btn.primary {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
}

.support-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.support-btn.secondary {
  background: linear-gradient(135deg, #333 0%, #555 100%);
  color: white;
}

.support-btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 51, 51, 0.3);
}

/* Coffee Animation */
.coffee-animation {
  flex-shrink: 0;
}

.coffee-cup {
  position: relative;
  width: 80px;
  height: 80px;
  background: #8d6e63;
  border-radius: 8px 8px 16px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
}

.coffee-cup::before {
  content: "";
  position: absolute;
  right: -20px;
  top: 20px;
  width: 16px;
  height: 30px;
  border: 3px solid #8d6e63;
  border-left: none;
  border-radius: 0 8px 8px 0;
}

.coffee {
  width: 100%;
  height: 70%;
  background: linear-gradient(135deg, #5d4037 0%, #3e2723 100%);
  border-radius: 4px;
  animation: coffeeWave 2s ease-in-out infinite;
}

.steam {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 15px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  animation: steam 2s ease-in-out infinite;
}

.steam::before,
.steam::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 15px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  animation: steam 2s ease-in-out infinite;
}

.steam::before {
  left: -8px;
  animation-delay: 0.3s;
}

.steam::after {
  right: -8px;
  animation-delay: 0.6s;
}

@keyframes coffeeWave {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.95);
  }
}

@keyframes steam {
  0% {
    opacity: 0.6;
    transform: translateY(0) translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.3;
    transform: translateY(-5px) translateX(-50%) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) translateX(-50%) scale(0.8);
  }
}

/* Thanks Section */
.thanks-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.thanks-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #333;
}

.thanks-section h3 .material-icons {
  color: #ff9800;
}

/* Footer */
.footer {
  background: #37474f;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

.footer-content p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer .material-icons {
  color: #e91e63;
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 0;
  }

  .header h1 {
    font-size: 2rem;
  }

  .content {
    padding: 1rem;
  }

  .card-content {
    padding: 1.5rem;
  }

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

  .step {
    flex-direction: column;
    gap: 1rem;
  }

  .step-number {
    align-self: flex-start;
  }

  .support-content {
    flex-direction: column;
    text-align: center;
  }

  .support-buttons {
    justify-content: center;
  }

  .nav-tabs {
    flex-wrap: wrap;
  }

  .tab {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .tab {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .support-buttons {
    flex-direction: column;
    width: 100%;
  }

  .support-btn {
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .nav-tabs,
  .footer {
    display: none;
  }

  .section {
    display: block !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .code-block {
    background: #f5f5f5 !important;
    color: #333 !important;
  }
}
