/* ============================================
   グローバルスタイル - スワイプLP制作ツール
   ============================================ */

:root {
    /* カラーパレット - 女性起業家向けフェミニンテーマ */
    --bg-primary: #fdf8f6;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fef5f1;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 236, 230, 0.4);

    /* アクセントカラー - ローズピンク・コーラル・ローズゴールド */
    --accent-primary: #e87b6b;
    --accent-secondary: #d4638f;
    --accent-gradient: linear-gradient(135deg, #f7a89c 0%, #e87b6b 40%, #d4638f 100%);
    --accent-glow: rgba(232, 123, 107, 0.3);

    /* テキストカラー */
    --text-primary: #3d3d3d;
    --text-secondary: #6b6b6b;
    --text-muted: #9a9a9a;

    /* ステータスカラー */
    --success: #5cb88f;
    --warning: #e9a35c;
    --error: #e07575;
    --info: #7ba7d4;

    /* ボーダー */
    --border-color: rgba(212, 99, 143, 0.15);
    --border-glass: rgba(232, 123, 107, 0.2);

    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(212, 99, 143, 0.08);
    --shadow-md: 0 4px 20px rgba(212, 99, 143, 0.12);
    --shadow-lg: 0 8px 40px rgba(212, 99, 143, 0.15);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* スペーシング */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* ボーダーラディウス */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* トランジション */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* フォント */
    --font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* リセット */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景エフェクト */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(247, 168, 156, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 99, 143, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(232, 123, 107, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* タイポグラフィ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* コンテナ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* グラスモーフィズムカード */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
}

/* 入力フィールド */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* セレクト */
.select {
    appearance: none;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: var(--spacing-xl);
    background: var(--bg-tertiary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right var(--spacing-md) center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* タブ */
.tabs {
    display: flex;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.tab.active {
    background: var(--accent-gradient);
    color: white;
}

/* バッジ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: rgba(232, 123, 107, 0.15);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

/* ヘッダー */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-md) 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* サイドバー */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    overflow-y: auto;
    z-index: 50;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-lg);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-link:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--accent-gradient);
    color: white;
}

.main-content {
    margin-left: 280px;
    padding: var(--spacing-xl);
    min-height: 100vh;
}

/* グリッド */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

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

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fadeIn {
    animation: fadeIn var(--transition-normal) ease-out;
}

.animate-slideUp {
    animation: slideUp var(--transition-slow) ease-out;
}

/* ユーティリティ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.gap-lg {
    gap: var(--spacing-lg);
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ローディング */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状態 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    margin-bottom: var(--spacing-lg);
    max-width: 300px;
}

/* ツールチップ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* トースト通知 */
.toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    z-index: 1100;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideUp var(--transition-normal) ease-out;
}

.toast-success {
    border-left: 3px solid var(--success);
}

.toast-error {
    border-left: 3px solid var(--error);
}

.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast-info {
    border-left: 3px solid var(--info);
}

/* ============================================
   Slate テーマ - 男性向けモダン爽やか
   ============================================ */

[data-theme="slate"] {
    /* カラーパレット - 爽やかライトブルー・ホワイト */
    --bg-primary: #f0f9ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e0f2fe;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(224, 242, 254, 0.6);

    /* アクセントカラー - スカイブルー・ティール */
    --accent-primary: #0ea5e9;
    --accent-secondary: #14b8a6;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
    --accent-glow: rgba(14, 165, 233, 0.25);

    /* テキストカラー */
    --text-primary: #1e3a5f;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* ステータスカラー */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #0ea5e9;

    /* ボーダー */
    --border-color: rgba(14, 165, 233, 0.2);
    --border-glass: rgba(14, 165, 233, 0.25);

    /* シャドウ */
    --shadow-sm: 0 2px 8px rgba(14, 165, 233, 0.08);
    --shadow-md: 0 4px 20px rgba(14, 165, 233, 0.12);
    --shadow-lg: 0 8px 40px rgba(14, 165, 233, 0.15);
    --shadow-glow: 0 0 30px var(--accent-glow);
}

/* Slate テーマの背景エフェクト */
[data-theme="slate"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
}

/* Slate テーマのヘッダー */
[data-theme="slate"] .header {
    background: rgba(255, 255, 255, 0.9);
}

/* Slate テーマのサイドバー */
[data-theme="slate"] .sidebar {
    background: var(--bg-secondary);
}

/* Slate テーマのモーダル */
[data-theme="slate"] .modal {
    background: var(--bg-secondary);
}

/* Slate テーマの入力フィールド */
[data-theme="slate"] .input,
[data-theme="slate"] .select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="slate"] .input::placeholder {
    color: var(--text-muted);
}

/* Slate テーマのカード */
[data-theme="slate"] .card,
[data-theme="slate"] .stat-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Slate テーマのボタン */
[data-theme="slate"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="slate"] .btn-ghost {
    color: var(--text-secondary);
}

[data-theme="slate"] .btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

/* Slate テーマのナビゲーション */
[data-theme="slate"] .nav-item {
    color: var(--text-secondary);
}

[data-theme="slate"] .nav-item:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
}

[data-theme="slate"] .nav-item.active {
    background: var(--accent-gradient);
    color: white;
}

/* Slate テーマのプライマリボタン */
[data-theme="slate"] .btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
}

[data-theme="slate"] .btn-primary:hover {
    box-shadow: var(--shadow-glow);
}

/* Slate テーマのAI分析ボタン */
[data-theme="slate"] .ai-analysis-btn {
    background: var(--accent-gradient);
    color: white !important;
    border: none;
    font-weight: 600;
}