* {
    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%);
    min-height: 100vh;
    color: #333;
    scrollbar-gutter: stable;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #764ba2;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
    font-weight: 700;
}

/* GitHubリンク */
.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, #24292e 0%, #1f2328 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(36, 41, 46, 0.2);
    position: relative;
    overflow: hidden;
}

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

.github-link:hover::before {
    left: 100%;
}

.github-link:hover {
    box-shadow: 0 8px 20px rgba(36, 41, 46, 0.3);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.github-link:active {
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.2);
}

.github-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.github-link:hover i {
    transform: rotate(360deg);
}

.github-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Matomoリンク */
.matomo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, #3a7ac5 0%, #2a5a9a 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(58, 122, 197, 0.2);
    position: relative;
    overflow: hidden;
}

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

.matomo-link:hover::before {
    left: 100%;
}

.matomo-link:hover {
    box-shadow: 0 8px 20px rgba(58, 122, 197, 0.3);
    background: linear-gradient(135deg, #4a8ad5 0%, #3a6aaa 100%);
}

.matomo-link:active {
    box-shadow: 0 4px 12px rgba(58, 122, 197, 0.2);
}

.matomo-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.matomo-link:hover i {
    transform: scale(1.2);
}

.matomo-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* メインコンテンツ */
.main {
    padding: 2rem 0;
}

/* 検索セクション */
.search-section {
    margin-bottom: 3rem;
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 50px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat;
    background-position: right 1rem center;
    background-size: 24px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

/* カードグリッド */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

.prompt-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.prompt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.copy-btn-small {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn-small i {
    font-size: 1.1rem;
}

.copy-btn-small:hover {
    background: #5a6fd8;
}

.card-content {
    margin-bottom: 1rem;
}

.prompt-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.prompt-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, #f8f9fa);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.model-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.model-badge.chatgpt {
    background: #00a67e;
    color: white;
}

.model-badge.claude {
    background: #d97757;
    color: white;
}

.model-badge.gemini {
    background: #4285f4;
    color: white;
}

.model-badge.perplexity {
    background: #21808D;
    color: white;
}

.model-badge.genspark {
    background: #000000;
    color: white;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

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

.modal-body {
    padding: 2rem;
}

.modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.prompt-content {
    margin-bottom: 2rem;
}

.prompt-content h3 {
    margin-bottom: 1rem;
    color: #333;
}

.prompt-text {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: #5a6fd8;
}

.prompt-description,
.prompt-example {
    margin-bottom: 2rem;
}

.prompt-description h3,
.prompt-example h3 {
    margin-bottom: 1rem;
    color: #333;
}

.example-text {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
    font-style: italic;
    white-space: pre-wrap;
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* レスポンシブデザイン */
@media (min-width: 1600px) {
    .container {
        max-width: 1800px;
    }

    .cards-grid {
        max-width: 1800px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

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

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-select {
        min-width: unset;
        max-width: 100%;
        width: 100%;
    }

    .modal-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .github-text {
        display: none;
    }

    .github-link {
        padding: 0.7rem;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .github-link i {
        font-size: 1.2rem;
    }
}
