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

/* 変数定義 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --background-color: #ecf0f1;
    --card-background: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header h1 i {
    font-size: 1.3rem;
}

.trip-dates {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 300;
}

/* メインタブセクション */
.main-tabs-section {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 85px;
    z-index: 95;
}

.main-tabs {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    border-bottom: 2px solid var(--background-color);
}

.main-tab {
    flex: 1;
    padding: 1rem;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.main-tab:hover {
    background: var(--background-color);
    color: var(--text-color);
}

.main-tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    background: white;
}

.main-tab i {
    font-size: 1.1rem;
}

/* タブコンテンツ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* フィルターセクション */
.filter-section {
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 136px;
    z-index: 90;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-tab:hover {
    background: #e0e6ed;
}

.filter-tab.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.filter-tab i {
    font-size: 1rem;
}

/* 旅程リスト */
.itinerary-list {
    flex: 1;
    padding: 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* 日付カード */
.day-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header.today {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.day-info {
    flex: 1;
}

.day-date {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.day-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.day-content {
    padding: 1rem;
}

.info-section {
    margin-bottom: 1rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.info-label i {
    width: 20px;
    color: var(--secondary-color);
}

.info-text {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
    padding-left: 28px;
    white-space: pre-line;
}

.info-text.highlight {
    background: #fff3cd;
    padding: 0.75rem;
    padding-left: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--warning-color);
}

.view-detail-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.view-detail-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.view-detail-btn:active {
    transform: translateY(0);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    margin: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1rem;
    color: var(--text-light);
}

.detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.detail-label i {
    width: 24px;
    font-size: 1.1rem;
}

.detail-text {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.7;
    padding-left: 32px;
    white-space: pre-line;
}

.accommodation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-left: 32px;
}

.accommodation-card .accommodation-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.accommodation-card .accommodation-info {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accommodation-card .accommodation-info i {
    width: 20px;
}

/* フッター */
.footer {
    background: var(--card-background);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer i {
    color: var(--accent-color);
}

/* エンプティステート */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header h1 i {
        font-size: 1.8rem;
    }

    .trip-dates {
        font-size: 1rem;
    }

    .day-card {
        border-radius: 20px;
    }

    .day-header {
        padding: 1.5rem;
    }

    .day-content {
        padding: 1.5rem;
    }

    .filter-tab {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* スクロールバーのスタイリング */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* レストランリスト */
.restaurants-list {
    padding: 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* レストランカード */
.restaurant-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

.restaurant-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.restaurant-info {
    flex: 1;
}

.restaurant-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.restaurant-city {
    font-size: 0.85rem;
    opacity: 0.9;
}

.restaurant-category-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.restaurant-content {
    padding: 1rem;
}

.restaurant-section {
    margin-bottom: 1rem;
}

.restaurant-section:last-child {
    margin-bottom: 0;
}

.restaurant-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.restaurant-label i {
    width: 20px;
    color: var(--secondary-color);
}

.restaurant-text {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
    padding-left: 28px;
}

.restaurant-text.dress-code {
    background: #fff3cd;
    padding: 0.75rem;
    padding-left: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--warning-color);
}

/* ドレスコード情報セクション */
.dresscode-info-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.dresscode-info-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dresscode-info-section h3 i {
    font-size: 1.3rem;
}

.dresscode-general {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.dresscode-general:last-child {
    margin-bottom: 0;
}

.dresscode-highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* タッチデバイス向けの調整 */
@media (hover: none) {
    .day-card:hover {
        transform: none;
    }

    .view-detail-btn:hover {
        transform: none;
    }
    
    .restaurant-card:hover {
        transform: none;
    }
}
