/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

/* スプラッシュスクリーン */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: splashFadeOut 3s ease-in-out 2.5s forwards;
}

.logo-container {
    text-align: center;
    animation: logoSlideUp 1.5s ease-out;
}

.app-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: iconBounce 2s ease-in-out infinite alternate;
}

.icon-heart {
    font-size: 40px;
    position: absolute;
    top: 20px;
    right: 20px;
    animation: heartPulse 1.5s ease-in-out infinite;
}

.icon-baby {
    font-size: 50px;
    animation: babyWiggle 2s ease-in-out infinite;
}

.app-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.app-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    font-weight: 300;
}

.note {
    font-size: 1.1rem;
    color: #aaa;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    font-weight: 300;
}

/* ローディングアニメーション */
.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: #ff6b9d;
    border-radius: 50%;
    animation: loadingBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

/* メインアプリ */
.main-app {
    height: 100vh;
    background: #f8f9fa;
    overflow-y: auto;
    animation: appSlideIn 1s ease-out 2.5s both;
    padding-bottom: 80px; /* ボトムナビの高さ分の余白を追加 */
}

.page {
    height: 100vh;
    background: #f8f9fa;
    overflow-y: auto;
}

.page.hidden {
    display: none;
}

.hidden {
    display: none;
}

/* ヘッダー */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.notification-badge {
    background: #ff4757;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    animation: badgePulse 2s ease-in-out infinite;
}

/* メインコンテンツ */
.app-main {
    padding: 20px;
    padding-bottom: 120px; /* ボトムナビとの重なりを完全に防ぐ */
    min-height: calc(100vh - 140px); /* 最小高さを設定 */
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #666;
    font-size: 1rem;
}

/* フィーチャーカード */
.feature-cards {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
    grid-template-columns: repeat(2, 1fr);
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardSlideIn 0.8s ease-out;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* 特定のカードの色分け */
.connect-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.sns-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.spots-card {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.map-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.transport-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.opendata-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.profile-card-mini {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* デモプレビューのスタイル */
.demo-preview {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
}

.transport-mini, .spot-mini, .event-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 3px 0;
}

.transport-mini:last-child, .spot-mini:last-child, .event-mini:last-child {
    margin-bottom: 0;
}

.route, .spot-name, .event-name {
    font-weight: bold;
    font-size: 0.75rem;
}

.time, .spot-rating, .event-date {
    font-size: 0.7rem;
    opacity: 0.9;
}

.status {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: bold;
    margin-left: 5px;
}

.status.running {
    background: #4caf50;
    color: white;
}

.status.coming {
    background: #ff9800;
    color: white;
}

.map-filters-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.filter-mini {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    white-space: nowrap;
}

.area-selector-mini select {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    color: inherit;
    width: 100%;
}

.spot-tags-mini {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.spot-tags-mini .tag {
    padding: 1px 4px;
    font-size: 0.6rem;
}

.event-status {
    margin-top: 3px;
}

.participants {
    font-size: 0.65rem;
    opacity: 0.8;
}

.data-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.status-text, .data-count {
    font-size: 0.7rem;
}

.mini-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mini-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.profile-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: bold;
    font-size: 0.75rem;
    display: block;
}

.user-stats {
    font-size: 0.65rem;
    opacity: 0.8;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.card-button {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

/* クイックアクション */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: cardSlideIn 0.8s ease-out 0.4s both;
}

.quick-actions h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    background: #f1f3f4;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e8eaed;
    transform: translateY(-2px);
}

/* ボトムナビゲーション */
.bottom-nav {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    padding: 12px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-around;
    animation: navSlideUp 0.8s ease-out 4s both;
    z-index: 9999 !important; /* 最前面に表示 */
    border-top: 2px solid #e0e0e0;
    backdrop-filter: blur(10px); /* 背景のぼかし効果 */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.nav-item.active {
    background: #f0f2ff;
    color: #667eea;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* アニメーション */
@keyframes splashFadeOut {
    0% { opacity: 1; transform: scale(1); }
    70% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.1); }
}

@keyframes logoSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconBounce {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes babyWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    to { text-shadow: 2px 2px 15px rgba(255, 107, 157, 0.3); }
}

@keyframes loadingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes appSlideIn {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes navSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .bottom-nav {
        padding: 8px 0; /* モバイルでは少し小さく */
    }
    
    .nav-item {
        padding: 6px;
    }
}

@media (min-width: 769px) {
    .feature-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-app {
        max-width: 800px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .modal-content {
        max-width: 600px;
    }
    
    .bottom-nav {
        max-width: 800px; /* デスクトップでも中央配置 */
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0; /* 角を丸く */
        margin-bottom: 0;
    }
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
}

.feature-detail {
    margin-bottom: 20px;
}

.feature-detail h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-detail p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.feature-list li:before {
    content: "✓";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
}

.demo-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.demo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.spot-info {
    flex: 1;
}

.spot-name {
    font-weight: bold;
    color: #333;
}

.spot-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.spot-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.tag {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

.tag.nursing { background: #ff6b9d; }
.tag.shop { background: #ffa726; }
.tag.parking { background: #66bb6a; }
.tag.restaurant { background: #ef5350; }

.rating {
    color: #ffa726;
    font-size: 0.9rem;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* マップページのスタイル */
.area-selector select {
    background: white;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #333;
}

.map-container {
    padding: 20px;
    padding-bottom: 100px;
}

.map-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    background: #f1f3f4;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #e8eaed;
}

.filter-btn.active:hover {
    background: #5a6fd8;
}

.map-display {
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 15px;
    height: 300px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #666;
}

.transport-schedule, .nearby-facilities, .opendata-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.transport-schedule h3, .nearby-facilities h3, .opendata-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.schedule-item, .facility-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-item:last-child, .facility-item:last-child {
    border-bottom: none;
}

.route-info, .facility-info {
    flex: 1;
}

.route-name, .facility-name {
    font-weight: bold;
    color: #333;
    display: block;
}

.route-time, .facility-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 3px;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.status.running {
    background: #4caf50;
    color: white;
}

.status.coming {
    background: #ff9800;
    color: white;
}

.status.stopped {
    background: #f44336;
    color: white;
}

.distance {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: bold;
}

.opendata-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    margin-right: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.opendata-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* プロフィールページのスタイル */
.profile-content {
    padding: 20px;
    padding-bottom: 100px;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    margin-bottom: 15px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto;
}

.profile-name {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 5px;
}

.profile-location {
    color: #666;
    font-size: 1rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.profile-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h4 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.child-item, .transport-item, .activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.child-item:last-child, .transport-item:last-child, .activity-item:last-child {
    border-bottom: none;
}

.child-name, .route-name {
    font-weight: bold;
    color: #333;
}

.child-details, .usage-freq {
    font-size: 0.9rem;
    color: #666;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    background: #f1f3f4;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #333;
}

.activity-item {
    align-items: flex-start;
}

.activity-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.activity-text {
    flex: 1;
    color: #333;
    line-height: 1.4;
}

.activity-time {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    margin-left: 10px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}
