/* ideaframe カスタムスタイル */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* スクロールバーのスタイル（オプション） */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========================================
   カード一覧のスタイリッシュなデザイン
   ======================================== */

/* カードアニメーション */
@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.styled-card {
    animation: cardFadeInUp 0.6s ease-out forwards;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.styled-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* カードのグラデーションアクセントバー */
.card-accent-bar {
    height: 5px;
    width: 100%;
}

.card-accent-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.card-accent-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.card-accent-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.card-accent-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.card-accent-5 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.card-accent-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

/* カード本体 */
.card-body {
    padding: 28px;
}

/* カードタイトル */
.card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    transition: color 0.2s ease;
    line-height: 1.3;
}

.styled-card:hover .card-title {
    color: #3b82f6;
}

/* カード説明文 */
.card-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.7;
    min-height: 4.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* カードアイコンコンテナ */
.card-icon-container {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.styled-card:hover .card-icon-container {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.05);
}

.card-icon-container svg {
    width: 28px;
    height: 28px;
    color: #3b82f6;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.styled-card:hover .card-icon-container svg {
    opacity: 1;
}

/* 統計バッジ */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.stat-badge-input {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.stat-badge-output {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    color: #166534;
}

.stat-badge svg {
    width: 18px;
    height: 18px;
}

.stat-badge-number {
    font-size: 1.1rem;
    font-weight: 700;
}

.stat-badge-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* グループタグ */
.group-tags-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.group-tags-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 12px;
}

.group-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
    color: #7c3aed;
    border: 1px solid #e9d5ff;
    transition: all 0.2s ease;
}

.group-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.group-tag svg {
    width: 14px;
    height: 14px;
}

/* アクションボタン */
.card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 24px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.card-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.card-action-btn svg {
    width: 20px;
    height: 20px;
}

/* 空の状態 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-state-icon svg {
    width: 48px;
    height: 48px;
    color: #94a3b8;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 1.1rem;
    color: #64748b;
}

/* ページヘッダー */
.page-header {
    margin-bottom: 48px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #64748b;
}

/* カードグリッド */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 32px;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* アニメーション遅延 */
.styled-card:nth-child(1) { animation-delay: 0s; }
.styled-card:nth-child(2) { animation-delay: 0.1s; }
.styled-card:nth-child(3) { animation-delay: 0.2s; }
.styled-card:nth-child(4) { animation-delay: 0.3s; }
.styled-card:nth-child(5) { animation-delay: 0.4s; }
.styled-card:nth-child(6) { animation-delay: 0.5s; }
.styled-card:nth-child(7) { animation-delay: 0.6s; }
.styled-card:nth-child(8) { animation-delay: 0.7s; }
.styled-card:nth-child(9) { animation-delay: 0.8s; }

/* ========================================
   Flow Builder キャンバスのスタイル
   ======================================== */

/* キャンバス内のカード */
.flow-canvas-card {
    position: relative;
    transition: all 0.2s ease;
}

.flow-canvas-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* 削除ボタン */
.remove-card-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

.flow-canvas-card:hover .remove-card-btn {
    opacity: 1;
    transform: scale(1);
}

.remove-card-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.remove-card-btn svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
}

/* パーツパネルのカード */
.parts-panel-card {
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.parts-panel-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

