/* setup.css - セットアップページ専用スタイル */

/* 基本的なスタイル */
.setup-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ヘッダー */
.setup-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.header-steps {
    display: flex;
    gap: 1rem;
}

.step {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    background: #f0f0f0;
    transition: all 0.3s ease;
}

.step.active {
    background: #007bff;
    color: white;
    transform: scale(1.05);
}

/* メインコンテンツ */
.setup-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* デバイス検出セクション */
.device-detection {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.device-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.device-icon {
    margin-bottom: 1.5rem;
    color: #007bff;
}

.device-card h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.device-card p {
    color: #666;
    margin-bottom: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* デバイス別セットアップセクション */
.setup-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

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

.setup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.setup-header .device-icon {
    width: 48px;
    height: 48px;
    color: #007bff;
}

.setup-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.setup-header p {
    color: #666;
    margin: 0;
}

/* セットアップステップ */
.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setup-step {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #007bff;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    margin-bottom: 1rem;
}

/* ブックマークレット関連 */
.bookmarklet-container {
    background: white;
    border: 2px dashed #007bff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.bookmarklet-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.bookmarklet-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.drag-hint {
    margin-top: 1rem;
    color: #666;
    font-size: 0.875rem;
}

.drag-arrow {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bookmarklet-code {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.bookmarklet-code h5 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
}

.code-box {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.copy-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s ease;
}

.copy-button:hover {
    background: #218838;
}

/* テストセクション */
.test-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.test-button {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.test-button:hover {
    background: #138496;
    transform: translateY(-1px);
}

.test-hint {
    margin-top: 1rem;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.test-hint p {
    margin: 0.5rem 0;
    color: #1565c0;
    font-size: 0.875rem;
}

/* 完成セクション */
.completion-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.complete-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.complete-button:hover {
    background: #218838;
    transform: translateY(-2px);
}

.completion-message {
    margin-top: 1rem;
    padding: 1rem;
    background: #d4edda;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.completion-message p {
    margin: 0.5rem 0;
    color: #155724;
}

/* iOS/Android固有のスタイル */
.ios-steps, .android-steps, .general-steps {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.ios-steps ol, .android-steps ol, .general-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.ios-steps li, .android-steps li, .general-steps li {
    margin-bottom: 0.75rem;
    color: #333;
}

.ios-note, .android-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.ios-note p, .android-note p {
    margin: 0;
    color: #856404;
    font-size: 0.875rem;
}

/* トラブルシューティングセクション */
.troubleshooting {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.troubleshooting-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.troubleshooting-header h2 {
    font-size: 1.75rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.troubleshooting-header p {
    color: #666;
    margin: 0;
}

.troubleshooting-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.troubleshooting-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid #dc3545;
}

.item-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.item-content h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
}

.item-content p {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.help-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s ease;
}

.help-button:hover {
    background: #5a6268;
}

/* お問い合わせセクション */
.contact-support {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.contact-support h3 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 1rem;
}

.contact-support p {
    color: #666;
    margin-bottom: 1.5rem;
}

.contact-info {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
}

.contact-info p {
    margin: 0.5rem 0;
    color: #333;
    font-size: 0.875rem;
}

.contact-info a {
    color: #007bff;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* 完成セクション */
.completion {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.completion-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.completion-card p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.completion-steps {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.completion-step {
    text-align: center;
    max-width: 150px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step-content h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.action-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.action-button.primary {
    background: #007bff;
    color: white;
}

.action-button.primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.action-button.secondary {
    background: #6c757d;
    color: white;
}

.action-button.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #007bff;
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-body h4 {
    color: #333;
    margin-bottom: 1rem;
}

.modal-body ol {
    margin: 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.75rem;
    color: #333;
}

.modal-body ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

/* フッター */
.setup-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
    color: #666;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .setup-main {
        padding: 1rem;
    }
    
    .setup-section {
        padding: 1.5rem;
    }
    
    .setup-step {
        flex-direction: column;
        gap: 1rem;
    }
    
    .troubleshooting-items {
        grid-template-columns: 1fr;
    }
    
    .completion-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .completion-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .code-box {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .setup-header h1 {
        font-size: 1.25rem;
    }
    
    .setup-header h2 {
        font-size: 1.25rem;
    }
    
    .setup-step {
        padding: 1rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .bookmarklet-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .completion-card {
        padding: 2rem;
    }
    
    .completion-steps {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}