/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

:root {
    --primary-pink: #ff6b9d;
    --secondary-purple: #a8e6cf;
    --light-pink: #ffe0e6;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-text: #6c757d;
    --shadow: 0 4px 20px rgba(255, 107, 157, 0.15);
    --border-radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #ff6b9d 0%, #a8e6cf 100%);
    min-height: 100vh;
    color: #333;
}

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

/* ヘッダー */
.header {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-pink), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--gray-text);
    font-size: 1.1rem;
}

/* カード */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* ボタン */
.btn {
    background: linear-gradient(45deg, var(--primary-pink), var(--secondary-purple));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.3rem;
}

/* 入力フィールド */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-text);
}

.input-field {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-pink);
}

/* プログレスバー */
.progress-container {
    background: var(--gray-light);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.progress-bar {
    background: var(--gray-light);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    background: linear-gradient(45deg, var(--primary-pink), var(--secondary-purple));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--gray-text);
}

/* 統計カード */
.stat-card {
    background: var(--light-pink);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-pink);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-text);
    font-weight: 500;
}

/* 興味関心アイテム */
.interest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-light);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.interest-item:hover {
    background: var(--light-pink);
}

.interest-rank {
    background: var(--primary-pink);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

.interest-content {
    flex: 1;
}

.interest-keyword {
    font-weight: 600;
    color: var(--primary-pink);
    margin-bottom: 2px;
}

.interest-stats {
    font-size: 0.8rem;
    color: var(--gray-text);
}

/* メニューアイテム */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--gray-light);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray-text);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: var(--light-pink);
    color: var(--primary-pink);
    transform: translateX(5px);
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* フォロワーテーブル */
.followers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.followers-table th,
.followers-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.followers-table th {
    background: var(--gray-light);
    font-weight: 600;
    color: var(--primary-pink);
    position: sticky;
    top: 0;
}

.followers-table tr:hover {
    background: var(--light-pink);
}

.follower-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-pink);
}

.follower-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.follower-handle {
    color: var(--primary-pink);
    text-decoration: none;
    font-family: monospace;
}

.follower-handle:hover {
    text-decoration: underline;
}

/* リスト切り替えタブ */
.list-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: var(--gray-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-tab.active {
    background: white;
    color: var(--primary-pink);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.list-tab:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}

/* フィルタボタン */
.filter-btn {
    padding: 8px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn.active {
    border-color: var(--primary-pink);
    background: var(--primary-pink);
    color: white;
}

.filter-btn:hover:not(.active) {
    border-color: var(--primary-pink);
    background: var(--light-pink);
}

/* アニメーション */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* レスポンシブ対応の強化 */
@media (max-width: 1024px) {
    /* グリッドレイアウトを縦並びに */
    .main-grid {
        display: block !important;
    }
    
    /* 右側のサイドバーをカード形式に */
    .sidebar-card {
        margin-top: 20px;
    }
    
    .followers-table {
        font-size: 0.9rem;
    }
    
    .followers-table th,
    .followers-table td {
        padding: 8px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    /* ヘッダーをモバイル対応 */
    .header > div {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    /* カードのパディング調整 */
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    /* タブとフィルタをモバイル対応 */
    .list-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    /* テーブルをカード形式に変更 */
    .followers-table-mobile {
        display: block;
    }
    
    .followers-table-mobile thead {
        display: none;
    }
    
    .followers-table-mobile tbody {
        display: block;
    }
    
    .followers-table-mobile tr {
        display: block;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 15px;
    }
    
    .followers-table-mobile td {
        display: block;
        border: none;
        padding: 5px 0;
    }
    
    .followers-table-mobile td:first-child {
        text-align: center;
        margin-bottom: 10px;
    }
    
    /* 統計カードをモバイル対応 */
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    /* メニューアイテムをモバイル対応 */
    .menu-item {
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* フィルタボタンを縦並びに */
    .filter-buttons-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
}

/* デスクトップ/モバイル表示制御 */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* メイングリッド */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* モバイル用統計カード */
.stat-card-mobile {
    background: var(--light-pink);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.stat-number-mobile {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-pink);
    margin-bottom: 3px;
}

.stat-label-mobile {
    font-size: 0.75rem;
    color: var(--gray-text);
    font-weight: 500;
}

/* モバイル用メニューボタン */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: var(--gray-light);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray-text);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 70px;
}

.mobile-menu-btn:hover {
    background: var(--light-pink);
    color: var(--primary-pink);
}

.mobile-menu-btn i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.mobile-menu-btn span {
    font-size: 0.8rem;
}

/* レスポンシブ対応の強化 */
@media (max-width: 1024px) {
    .main-grid {
        display: block !important;
        grid-template-columns: none !important;
    }
    
    .sidebar-card {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 8px;
        max-width: 100%;
        margin: 0;
    }
    
    /* デスクトップ版を非表示、モバイル版を表示 */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* カードのパディング調整 */
    .card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 15px;
    }
    
    /* ヘッダーをモバイル対応 */
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header > div {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    /* タブとフィルタをモバイル対応 */
    .list-tab {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .filter-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        margin-bottom: 5px;
    }
    
    /* テーブルをカード形式に変更 */
    .followers-table-mobile {
        display: block;
        width: 100%;
    }
    
    .followers-table-mobile thead {
        display: none;
    }
    
    .followers-table-mobile tbody {
        display: block;
    }
    
    .followers-table-mobile tr {
        display: block;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        margin-bottom: 8px;
        padding: 12px;
    }
    
    .followers-table-mobile td {
        display: block;
        border: none;
        padding: 3px 0;
        width: 100%;
    }
    
    .followers-table-mobile td:first-child {
        text-align: center;
        margin-bottom: 8px;
    }
    
    /* ボタンサイズ調整 */
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .card {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-btn {
        padding: 12px 8px;
        min-height: 60px;
    }
    
    .mobile-menu-btn i {
        font-size: 1rem;
    }
    
    .mobile-menu-btn span {
        font-size: 0.7rem;
    }
}