/* CSS変数 */
:root {
    --primary: #2563eb;
    --secondary: #10b981;
    --text-dark: #334155;
    --text-medium: #64748b;
    --white: #ffffff;
    --shadow: rgba(37, 99, 235, 0.12);
    --shadow-hover: rgba(37, 99, 235, 0.2);
}

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

/* ベース */
body {
    font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0fdfa 100%);
    line-height: 1.6;
    min-height: 100vh;
    color: var(--text-dark);
}

/* コンテナ */
.container {
    max-width: 600px;
    margin: 60px auto;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 8px 32px var(--shadow);
    padding: 40px 24px;
    text-align: center;
}

/* ヘッダー */
.site-header h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: bold;
    animation: float 3s ease-in-out infinite;
}

.site-header p {
    color: var(--text-medium);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

/* リンク */
.links { display: flex; flex-direction: column; gap: 24px; }

.link-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: left;
    border-left: 8px solid var(--primary);
    position: relative;
}

.link-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.15),
        0 8px 16px rgba(37, 99, 235, 0.1);
    border-left-color: var(--secondary);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.link-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 10;
}

/* アイコン */
.link-card a::before {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.shojo-tool a::before { content: '🏆'; }
.health-tool a::before { content: '🏥'; }
.schedule-tool a::before { content: '📅'; }
.python-tool a::before { content: '🐍'; }
.tesou-tool a::before { content: '✋'; }

/* コンテンツ */
.link-content { flex: 1; }

.link-title {
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
    line-height: 1.2;
}

.link-desc {
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.4;
    opacity: 0.9;
}

/* フッター */
.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.site-footer p {
    color: var(--text-medium);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* アニメーション */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* PC版クリック領域拡張 */
@media (min-width: 481px) {
    .link-card a {
        padding: 20px;
        margin: -20px;
    }
}

/* モバイル対応 */
@media (max-width: 480px) {
    .container {
        margin: 10px auto;
        padding: 24px 16px;
        max-width: 95%;
    }
    
    .site-header h1 {
        font-size: 1.5rem;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .site-header p { font-size: 0.95rem; margin-bottom: 24px; }
    .links { gap: 18px; }
    
    .link-card {
        padding: 16px;
        border-radius: 14px;
        border-left: 6px solid var(--primary);
        animation: mobileFloat 4s ease-in-out infinite;
    }
    
    .link-card a { 
        gap: 8px;
        min-height: 44px; 
        padding: 16px; 
        margin: -16px; 
    }
    .link-card a::before { 
        font-size: 1.6rem; 
        line-height: 1.2;
    }
    .link-content { 
        flex: 1;
    }
    .link-title { font-size: 1.1rem; line-height: 1.3; }
    .link-desc { font-size: 0.9rem; opacity: 0.85; line-height: 1.3; }
    
    .site-footer { margin-top: 32px; padding: 16px 0; }
    .site-footer p { font-size: 0.85rem; opacity: 0.7; }
    
    /* モバイル用ランダムアニメーション */
    .link-card:nth-child(1) { animation: mobileFloat1 5.2s ease-in-out infinite; animation-delay: 0s; }
    .link-card:nth-child(2) { animation: mobileFloat2 4.8s ease-in-out infinite; animation-delay: 0.7s; }
    .link-card:nth-child(3) { animation: mobileFloat3 5.5s ease-in-out infinite; animation-delay: 1.3s; }
    .link-card:nth-child(4) { animation: mobileFloat4 4.6s ease-in-out infinite; animation-delay: 2.1s; }
    .link-card:nth-child(5) { animation: mobileFloat5 5.1s ease-in-out infinite; animation-delay: 2.8s; }
}

/* モバイル用アニメーション */
@keyframes mobileFloat1 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-1px) translateX(0.5px); }
    50% { transform: translateY(-2px) translateX(0px); }
    75% { transform: translateY(-1px) translateX(-0.5px); }
}

@keyframes mobileFloat2 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    30% { transform: translateY(-1.5px) translateX(-0.3px); }
    60% { transform: translateY(-2.5px) translateX(0.3px); }
    90% { transform: translateY(-0.5px) translateX(0px); }
}

@keyframes mobileFloat3 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    20% { transform: translateY(-0.5px) translateX(0.2px); }
    45% { transform: translateY(-2px) translateX(-0.2px); }
    70% { transform: translateY(-1.5px) translateX(0.4px); }
}

@keyframes mobileFloat4 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    35% { transform: translateY(-2px) translateX(0px); }
    65% { transform: translateY(-1px) translateX(0.3px); }
    85% { transform: translateY(-2.5px) translateX(-0.3px); }
}

@keyframes mobileFloat5 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    15% { transform: translateY(-1px) translateX(-0.4px); }
    40% { transform: translateY(-2.2px) translateX(0.2px); }
    80% { transform: translateY(-0.8px) translateX(0px); }
}

/* アニメーション無効化対応 */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}