/* ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ヘッダー */
.app-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%" r="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:0.1" /><stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:0" /></radialGradient></defs><rect width="100" height="20" fill="url(%23a)" /></svg>');
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.app-header h1 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* メインコンテンツ */
.main-content {
    padding: 2rem 1.5rem;
}

/* スクリーン管理 */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* スタート画面 */
.welcome-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-message h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.floor-order {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px solid #e9ecef;
    list-style: none;
}

.floor-order li {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.1rem;
    font-weight: 500;
}

.floor-order li:last-child {
    border-bottom: none;
}

.floor-order li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.floor-order {
    counter-reset: step-counter;
}

.floor-number {
    color: #2c3e50;
}

/* プログレスバー */
.progress-container {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    background: #e9ecef;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* フロア情報 */
.floor-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.floor-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 3px solid #3498db;
}

.floor-title i {
    margin-right: 0.5rem;
    color: #3498db;
}

/* ステップリスト */
.step-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.step-group:last-child {
    margin-bottom: 0;
}

.step-category {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.step-category i {
    margin-right: 0.5rem;
    color: #3498db;
}

.step-items {
    list-style: none;
    margin-left: 0;
}

.step-items li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
    line-height: 1.5;
}

.step-items li i {
    margin-right: 0.8rem;
    margin-top: 0.3rem;
    color: #27ae60;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
    font-weight: 500;
}

.step-note i {
    margin-right: 0.5rem;
    color: #f39c12;
}

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    min-height: 50px;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
    transform: translateY(-2px);
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 完了画面 */
.completion-message {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.completion-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #27ae60;
}

.completion-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.completion-summary h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

.completion-summary ul {
    list-style: none;
}

.completion-summary li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.completion-summary li:last-child {
    border-bottom: none;
}

.completion-summary li i {
    margin-right: 1rem;
    color: #27ae60;
    font-size: 1.2rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
    background: white;
    margin: 1rem;
    padding: 0;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: scale(0.8) translateY(-50px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.modal-header h3 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #495057;
    background: #e9ecef;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-body textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    text-align: right;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .app-header {
        padding: 1.5rem 1rem;
    }
    
    .app-header h1 {
        font-size: 1.6rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .floor-info {
        padding: 1.5rem;
    }
    
    .floor-title {
        font-size: 1.6rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .floor-order {
        padding: 1rem;
    }
    
    .step-group {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .floor-title {
        font-size: 1.4rem;
    }
    
    .progress-container,
    .floor-info {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}