/* =========================== */
/* デモ機能用スタイル */
/* =========================== */

/* ウェルカムモーダル */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.welcome-modal {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

.welcome-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);  /* Soft Black グラデーション */
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.welcome-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.welcome-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-header .emoji {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.welcome-header p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
    margin: 0;
}

.welcome-body {
    padding: 30px;
}

.welcome-subtitle {
    text-align: center;
    font-size: 18px;
    color: #4F46E5;  /* Primary Accent */
    font-weight: 600;
    margin-bottom: 25px;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.scenario-card {
    border: 2px solid #e5e5e5;  /* Gray 200 */
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #f8f8f8, #e5e5e5);  /* Gray 100 to Gray 200 */
    position: relative;
}

.scenario-card:hover {
    border-color: #4F46E5;  /* Primary Accent */
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);  /* Primary Accent シャドウ */
    background: linear-gradient(145deg, #f9f9ff, #f0f0ff);  /* Subtle Accent グラデーション */
}

.scenario-card.selected {
    border-color: #4F46E5;  /* Primary Accent */
    background: linear-gradient(145deg, #f9f9ff, #f0f0ff);  /* Subtle Accent グラデーション */
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);  /* Primary Accent シャドウ */
}

.scenario-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.scenario-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;  /* Soft Black */
    margin-bottom: 8px;
}

.scenario-description {
    font-size: 14px;
    color: #666666;  /* Gray 500 */
    line-height: 1.4;
}

.welcome-footer {
    padding: 0 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.btn-demo-apply {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);  /* Primary to Secondary Accent */
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);  /* Primary Accent シャドウ */
    opacity: 0.5;
    pointer-events: none;
}

.btn-demo-apply.enabled {
    opacity: 1;
    pointer-events: auto;
}

.btn-demo-apply.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);  /* Primary Accent シャドウ */
}

.btn-demo-skip {
    background: #f8f8f8;  /* Gray 100 */
    color: #666666;  /* Gray 500 */
    border: 1px solid #e5e5e5;  /* Gray 200 */
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-demo-skip:hover {
    background: #e5e5e5;  /* Gray 200 */
    color: #333333;  /* Gray 600 */
    transform: translateY(-1px);
}

/* デモ通知バナー */
.demo-banner {
    background: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);  /* Tertiary to Light Accent */
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);  /* Tertiary Accent シャドウ */
    animation: slideDown 0.4s ease-out;
    border-bottom: 3px solid #7C3AED;  /* Secondary Accent */
}

.demo-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.demo-banner-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

.demo-banner-text {
    font-weight: 700;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.demo-banner-scenario {
    font-size: 13px;
    opacity: 0.9;
    margin-left: 8px;
    font-weight: 500;
}

.demo-banner-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.scenario-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenario-label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

.scenario-select {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;  /* Soft Black */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
}

.scenario-select:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scenario-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);  /* Subtle Accent フォーカスリング */
}

.btn-demo-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.btn-demo-clear:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);  /* Primary Accent シャドウ */
}

.btn-demo-clear-icon {
    font-size: 14px;
}

.btn-demo-clear-text {
    white-space: nowrap;
}

/* デモバナーが表示されている時の本体コンテンツ調整 */
body.demo-active {
    padding-top: 65px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .welcome-modal {
        max-width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .welcome-header {
        padding: 25px 20px;
    }
    
    .welcome-header h2 {
        font-size: 24px;
    }
    
    .welcome-header .emoji {
        font-size: 36px;
    }
    
    .welcome-body {
        padding: 25px 20px;
    }
    
    .scenario-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scenario-card {
        padding: 18px 15px;
    }
    
    .scenario-icon {
        font-size: 40px;
    }
    
    .welcome-footer {
        padding: 0 20px 25px;
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-demo-apply,
    .btn-demo-skip {
        width: 100%;
        text-align: center;
    }
    
    .demo-banner {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .demo-banner-content {
        justify-content: center;
    }
    
    .demo-banner-actions {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .scenario-selector {
        order: 2;
    }
    
    .scenario-select {
        min-width: 240px;
        max-width: 90vw;
    }
    
    .btn-demo-clear {
        order: 1;
        align-self: center;
        width: fit-content;
    }
    
    body.demo-active {
        padding-top: 90px;
    }
}

@media (max-width: 480px) {
    .welcome-header {
        padding: 20px 15px;
    }
    
    .welcome-header h2 {
        font-size: 22px;
    }
    
    .welcome-body {
        padding: 20px 15px;
    }
    
    .scenario-card {
        padding: 15px 12px;
    }
    
    .scenario-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .scenario-title {
        font-size: 16px;
    }
    
    .scenario-description {
        font-size: 13px;
    }
    
    .welcome-footer {
        padding: 0 15px 20px;
    }
    
    .btn-demo-apply,
    .btn-demo-skip {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* アニメーション */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 既存のアニメーションがある場合は再利用 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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