:root {
    --bg-dark: #070913;
    --bg-card: #0f1224;
    --bg-card-hover: #161a33;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #f59e0b;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-sans: 'Inter', sans-serif;
    --font-logo: 'Outfit', sans-serif;
    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 40%);
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダー */
.app-header {
    height: 70px;
    background-color: rgba(15, 18, 36, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text h1 {
    font-family: var(--font-logo);
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ヒーローセクション */
.hero-section {
    padding: 60px 20px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h2 {
    font-family: var(--font-logo);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f8fafc 40%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* 検索ボックス */
.search-filter-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 540px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

#search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* カテゴリセクション */
.categories-section {
    padding: 0 20px 32px;
    display: flex;
    justify-content: center;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 900px;
}

.tab-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* グリッドセクション */
.grid-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px 80px;
}

.saas-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* 各SaaSグループ */
.saas-group {
    background: rgba(15, 18, 36, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.saas-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.saas-icon {
    font-size: 24px;
}

.saas-group-header h3 {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-logo);
}

.saas-group-header h3 span {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
    margin-left: 8px;
}

.alternatives-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* 代替アプリカード */
.alt-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.alt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #ec4899);
    opacity: 0;
    transition: opacity 0.3s;
}

.alt-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-premium);
    background-color: var(--bg-card-hover);
}

.alt-card:hover::before {
    opacity: 1;
}

.alt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.alt-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.stars-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stars-icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.alt-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.tag {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.alt-footer {
    display: flex;
    gap: 10px;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 32px;
}

.modal-body h2 {
    font-family: var(--font-logo);
    font-size: 24px;
    margin-bottom: 8px;
}

.modal-license {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.docker-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.docker-code-container {
    position: relative;
    background-color: #070913;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.docker-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #38bdf8;
    padding: 16px;
    white-space: pre-wrap;
    display: block;
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* トースト */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 18, 36, 0.95);
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(8px);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* アニメーション */
@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 戻るボタン */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin-right: 12px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* クラウドホスティング紹介枠 */
.deploy-recommend-box {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
}

.deploy-rec-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deploy-recommend-box p {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

.btn-deploy-rec {
    display: inline-flex;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white !important;
    border: none;
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-align: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-deploy-rec:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.3);
}

/* 寄付エリア（フッター上部） */
.support-footer-section {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto 0;
    padding: 0 40px;
}

.donation-card-footer {
    background: rgba(15, 18, 36, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-premium);
}

.donation-card-footer h4 {
    font-family: var(--font-logo);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.donation-card-footer p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* 比較スペックテーブル */
.comparison-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 12.5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.comparison-table th, 
.comparison-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td strong {
    color: var(--text-primary);
}

.compare-saas {
    color: #f87171; /* ややネガティブ/赤寄り */
    opacity: 0.9;
}

.compare-alt {
    color: #34d399; /* ポジティブ/緑寄り */
    font-weight: 600;
}


