/* ========== コンポーネント ========== */

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ターミナル */
.terminal {
  background: var(--secondary-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.terminal-header {
  background: var(--accent-bg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.terminal-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-red, .btn-yellow, .btn-green {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.btn-red { background: #ff5f56; }
  .btn-yellow { background: #ffbd2e; }
    .btn-green { background: #27ca3f; }

      .terminal-title {
        color: var(--text-secondary);
        font-family: var(--font-mono);
        font-size: 0.9rem;
      }

      .terminal-body {
        padding: 1.5rem;
        font-family: var(--font-mono);
        font-size: 0.9rem;
        line-height: 1.8;
      }

      .code-line {
        margin-bottom: 0.5rem;
        opacity: 0;
        animation: typeWriter 0.5s ease-out forwards;
      }

      .code-line:nth-child(1) { animation-delay: 0.5s; }
        .code-line:nth-child(2) { animation-delay: 1s; }
          .code-line:nth-child(3) { animation-delay: 1.5s; }
            .code-line:nth-child(4) { animation-delay: 2s; }
              .code-line:nth-child(5) { animation-delay: 2.5s; }
                .code-line:nth-child(6) { animation-delay: 3s; }
                  .code-line:nth-child(7) { animation-delay: 3.5s; }
                    .code-line:nth-child(8) { animation-delay: 4s; }
                      .code-line:nth-child(9) { animation-delay: 4.5s; }

                        .keyword { color: #ff79c6; }
                          .class-name { color: #50fa7b; }
                            .function { color: #8be9fd; }

                              /* カード */
                              .skill-card {
                                background: var(--secondary-bg);
                                border-radius: 20px;
                                padding: 1.5rem;
                                text-align: center;
                                transition: all 0.3s ease;
                                border: 1px solid var(--border-color);
                                position: relative;
                                overflow: hidden;
                                flex: 0 0 auto;
                                width: 140px;
                                min-width: 140px;
                              }

                              .skill-card::before {
                                content: '';
                                position: absolute;
                                top: 0;
                                left: -100%;
                                width: 100%;
                                height: 100%;
                                background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
                                transition: left 0.6s ease;
                              }

                              .skill-card:hover::before {
                                left: 100%;
                              }

                              .skill-card:hover {
                                transform: translateY(-8px);
                                box-shadow: 0 15px 35px rgba(100, 255, 218, 0.2);
                                border-color: var(--primary-color);
                              }

                              .skill-image {
                                width: 64px;
                                height: 64px;
                                margin: 0 auto 1rem;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                background: var(--card-bg);
                                border-radius: 16px;
                                padding: 12px;
                                transition: all 0.3s ease;
                              }

                              .skill-image img {
                                width: 100%;
                                height: 100%;
                                object-fit: contain;
                                filter: grayscale(20%);
                                transition: all 0.3s ease;
                              }

                              .skill-card:hover .skill-image {
                                background: var(--gradient-primary);
                                box-shadow: 0 8px 20px rgba(100, 255, 218, 0.3);
                              }

                              .skill-card:hover .skill-image img {
                                filter: grayscale(0%) brightness(1.1);
                                transform: scale(1.05);
                              }

                              .skill-name {
                                font-weight: 600;
                                font-size: 0.95rem;
                                color: var(--text-primary);
                                margin: 0;
                                transition: color 0.3s ease;
                              }

                              .skill-card:hover .skill-name {
                                color: var(--primary-color);
                              }

                              /* プロジェクトカード */
                              .project-card {
                                background: var(--card-bg);
                                border-radius: 20px;
                                padding: 1.5rem;
                                transition: all 0.3s ease;
                                border: 1px solid var(--border-color);
                                position: relative;
                                overflow: hidden;
                                width: 280px;
                                min-width: 280px;
                                backdrop-filter: blur(10px);
                                cursor: pointer;
                              }

                              .project-card::before {
                                content: '';
                                position: absolute;
                                top: 0;
                                left: -100%;
                                width: 100%;
                                height: 100%;
                                background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
                                transition: left 0.6s ease;
                              }

                              .project-card:hover::before {
                                left: 100%;
                              }

                              .project-card:hover,
                              .project-card-link:hover .project-card {
                                transform: translateY(-8px);
                                box-shadow: 0 15px 35px rgba(100, 255, 218, 0.2);
                                border-color: var(--primary-color);
                              }

                              .project-image {
                                width: 100%;
                                height: 140px;
                                margin-bottom: 1.5rem;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                border-radius: 12px;
                                overflow: hidden;
                                position: relative;
                              }

                              .project-image img {
                                width: 100%;
                                height: 100%;
                                object-fit: cover;
                                transition: transform 0.3s ease;
                              }

                              .project-card:hover .project-image img {
                                transform: scale(1.05);
                              }

                              .project-placeholder {
                                width: 100%;
                                height: 100%;
                                background: var(--gradient-primary);
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                color: white;
                                font-size: 3rem;
                                border-radius: 12px;
                                transition: all 0.3s ease;
                              }

                              .project-card:hover .project-placeholder {
                                background: var(--gradient-secondary);
                                transform: scale(1.05);
                              }

                              .project-info {
                                text-align: left;
                              }

                              .project-title {
                                font-size: 1.3rem;
                                font-weight: 600;
                                color: var(--text-primary);
                                margin-bottom: 0.8rem;
                              }

                              .project-description {
                                font-size: 0.95rem;
                                color: var(--text-secondary);
                                line-height: 1.5;
                                margin-bottom: 1.2rem;
                              }

                              .project-tech-tags {
                                display: flex;
                                flex-wrap: wrap;
                                gap: 0.5rem;
                              }

                              .tech-tag {
                                background: var(--primary-color);
                                color: var(--primary-bg);
                                font-size: 0.75rem;
                                font-weight: 500;
                                padding: 0.3rem 0.8rem;
                                border-radius: 20px;
                                text-transform: uppercase;
                                letter-spacing: 0.5px;
                              }

                              /* ニュースカード */
                              .news-card {
                                background: var(--card-bg);
                                padding: 2rem;
                                border-radius: 20px;
                                border: 1px solid var(--border-color);
                                transition: var(--transition-smooth);
                                backdrop-filter: blur(10px);
                                position: relative;
                                overflow: hidden;
                              }

                              .news-card:hover {
                                transform: translateY(-5px);
                                border-color: var(--primary-color);
                                box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
                              }

                              .news-card.featured {
                                border: 2px solid var(--primary-color);
                                box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
                              }

                              .news-card.featured::before {
                                content: '';
                                position: absolute;
                                top: 0;
                                left: 0;
                                right: 0;
                                height: 3px;
                                background: var(--gradient-primary);
                              }

                              .news-date {
                                color: var(--primary-color);
                                font-family: var(--font-mono);
                                font-size: 0.9rem;
                                font-weight: 500;
                                margin-bottom: 1rem;
                              }

                              .news-title {
                                font-size: 1.4rem;
                                font-weight: 600;
                                color: var(--text-primary);
                                margin-bottom: 1rem;
                                line-height: 1.3;
                              }

                              .news-excerpt {
                                color: var(--text-secondary);
                                line-height: 1.6;
                                margin-bottom: 1.5rem;
                              }

                              .news-tags {
                                display: flex;
                                flex-wrap: wrap;
                                gap: 0.5rem;
                              }

                              .news-tag {
                                background: var(--accent-bg);
                                color: var(--primary-color);
                                padding: 0.3rem 0.8rem;
                                border-radius: 15px;
                                font-size: 0.8rem;
                                font-weight: 500;
                                border: 1px solid var(--border-color);
                              }

                              /* フォーム */
                              .form {
                                display: flex;
                                flex-direction: column;
                                gap: 2rem;
                              }

                              .form-group {
                                position: relative;
                              }

                              .form-input {
                                width: 100%;
                                padding: 1.5rem;
                                background: var(--card-bg);
                                border: 2px solid var(--border-color);
                                border-radius: 15px;
                                color: var(--text-primary);
                                font-size: 1rem;
                                font-family: var(--font-main);
                                transition: var(--transition-smooth);
                                backdrop-filter: blur(10px);
                              }

                              .form-input:focus {
                                outline: none;
                                border-color: var(--primary-color);
                                box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
                              }

                              .form-input::placeholder {
                                color: var(--text-muted);
                              }

                              .form-label {
                                position: absolute;
                                top: -0.5rem;
                                left: 1rem;
                                background: var(--primary-bg);
                                color: var(--primary-color);
                                padding: 0 0.5rem;
                                font-size: 0.9rem;
                                font-weight: 500;
                              }

                              /* フィルター */
                              .filter-btn {
                                background: var(--card-bg);
                                border: 2px solid var(--border-color);
                                color: var(--text-secondary);
                                padding: 0.8rem 1.5rem;
                                border-radius: 25px;
                                cursor: pointer;
                                transition: var(--transition-smooth);
                                font-weight: 500;
                                backdrop-filter: blur(10px);
                              }

                              .filter-btn:hover,
                              .filter-btn.active {
                                background: var(--primary-color);
                                border-color: var(--primary-color);
                                color: var(--primary-bg);
                                transform: translateY(-2px);
                              }

                              /* 検索ボックス */
                              .search-box {
                                position: relative;
                                max-width: 400px;
                                width: 100%;
                              }

                              .search-box i {
                                position: absolute;
                                left: 1rem;
                                top: 50%;
                                transform: translateY(-50%);
                                color: var(--text-muted);
                              }

                              .search-box input {
                                width: 100%;
                                padding: 1rem 1rem 1rem 3rem;
                                background: var(--card-bg);
                                border: 2px solid var(--border-color);
                                border-radius: 25px;
                                color: var(--text-primary);
                                font-size: 1rem;
                                transition: var(--transition-smooth);
                                backdrop-filter: blur(10px);
                              }

                              .search-box input:focus {
                                outline: none;
                                border-color: var(--primary-color);
                                box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
                              }

                              .search-box input::placeholder {
                                color: var(--text-muted);
                              }