/* 共通スタイルシート - ダークモード基調 */

:root {
    /* カラーパレット */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #22c55e;
    --info-color: #06b6d4;
    
    /* ダークモードカラー */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --bg-card: #1f1f1f;
    --bg-hover: #2a2a2a;
    
    /* テキストカラー */
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-tertiary: #737373;
    --text-muted: #525252;
    
    /* ボーダーカラー */
    --border-primary: #404040;
    --border-secondary: #2a2a2a;
    
    /* その他 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-default: all 0.2s ease;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* タイポグラフィ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-hover);
}

/* リスト */
ul, ol {
    list-style: none;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-default);
    text-align: center;
    text-decoration: none;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.775rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

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

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* カード */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-default);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* フォーム要素 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-default);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

/* テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-secondary);
}

.table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.table tr:hover {
    background-color: var(--bg-hover);
}

/* ヘッダー */
.main-header {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-primary);
    text-align: center;
}

.header-nav {
    background-color: var(--bg-tertiary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-item a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-item a:hover {
    color: var(--text-primary);
}

/* フッター */
.main-footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-primary);
}

/* サイドバー */
.sidebar {
    background-color: var(--bg-secondary);
    width: 250px;
    min-height: 100vh;
    border-right: 1px solid var(--border-primary);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition-default);
}

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

.sidebar-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* ユーティリティクラス */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden { display: none; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* レスポンシブ */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .sidebar {
        width: 200px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
}