/* 基本設定と変数 */
:root {
    --bg-dark: #0a0b1a;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --card-bg: rgba(25, 30, 50, 0.6);
    --card-border: rgba(255, 255, 255, 0.15);
    --accent-sleep: #a855f7;
    --accent-meeting: #00d4ff;
    --glow-primary: #ff6b6b;
    --glow-secondary: #4ecdc4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

/* バックグラウンドとオーブのアニメーション */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #111524 0%, #05060a 100%);
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15), transparent 70%);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 25s;
}

@keyframes drift {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.1); }
}

/* 星のパーティクル */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star:nth-child(1) { width: 2px; height: 2px; top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { width: 1px; height: 1px; top: 30%; left: 70%; animation-delay: 1s; }
.star:nth-child(3) { width: 3px; height: 3px; top: 50%; left: 10%; animation-delay: 2s; }
.star:nth-child(4) { width: 1px; height: 1px; top: 70%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(5) { width: 2px; height: 2px; top: 20%; left: 90%; animation-delay: 1.5s; }
.star:nth-child(6) { width: 1px; height: 1px; top: 80%; left: 30%; animation-delay: 2.5s; }
.star:nth-child(7) { width: 2px; height: 2px; top: 40%; left: 50%; animation-delay: 0.8s; }
.star:nth-child(8) { width: 1px; height: 1px; top: 60%; left: 15%; animation-delay: 1.2s; }
.star:nth-child(9) { width: 3px; height: 3px; top: 90%; left: 60%; animation-delay: 1.8s; }
.star:nth-child(10) { width: 1px; height: 1px; top: 15%; left: 40%; animation-delay: 2.2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* メインコンテナ */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ヘッダー */
.header {
    text-align: center;
    margin-bottom: 80px;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 30%, #a855f7 60%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

/* アプリグリッド */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    width: 100%;
}

/* アプリカード */
.app-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 0;
    pointer-events: none;
    border-radius: 28px;
}

.app-card:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(-5deg);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5), 
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(168, 85, 247, 0.2);
}

.app-card:hover .card-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* カードコンテンツ */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* アイコン */
.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.4), 0 0 20px rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.icon-sleep {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ff6b6b);
    color: white;
}

.icon-meeting {
    background: linear-gradient(135deg, #00d4ff, #3b82f6, #4ecdc4);
    color: #fff;
}

.app-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.app-card:hover .app-icon::before {
    left: 100%;
}

.app-icon svg {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1;
}

/* テキスト */
.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.app-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

.app-link-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.app-link-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.app-card:hover .app-link-text::after {
    width: 100%;
}

/* 色分けされたリンクホバー */
.app-card:nth-child(1):hover .app-link-text { color: var(--accent-sleep); }
.app-card:nth-child(2):hover .app-link-text { color: var(--accent-meeting); }

/* 出現アニメーション */
.reveal {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* フッター */
.index-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    .app-card {
        padding: 30px;
    }
}
