/* service_platform.css */

/* ターミナル外観 */
.terminal-window {
    background: #0d0d0d !important;
    border: 1px solid #333 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
}
.terminal-header { 
    background: #252525 !important; 
    border-bottom: 1px solid #3a3a3a !important; 
    padding: 0 15px !important; 
    height: 35px; 
    display: flex; 
    align-items: center; 
}
.terminal-dots { display: flex; gap: 8px; }
.dot-red { background: #ff5f56; width: 12px; height: 12px; border-radius: 50%; }
.dot-yellow { background: #ffbd2e; width: 12px; height: 12px; border-radius: 50%; }
.dot-green { background: #27c93f; width: 12px; height: 12px; border-radius: 50%; }
.terminal-title { 
    color: #888 !important; 
    font-size: 11px; 
    margin-left: 15px; 
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.terminal-body { 
    background: #0d0d0d; 
    min-height: 400px; 
    padding: 20px !important; 
    position: relative; 
    font-family: 'Roboto Mono', 'Courier New', monospace; 
    text-align: left; 
}
.cmd-prompt { color: #50fa7b; font-weight: 500; }
.cmd-command { color: #f8f8f2; }
.terminal-output-area { 
    margin-top: 10px; 
    color: #eee; 
    font-size: 13px; 
    line-height: 1.5; 
    white-space: pre-wrap;
    word-break: break-all;
}
.status-vuln { color: #ff5555 !important; font-weight: bold; text-shadow: 0 0 5px rgba(255, 85, 85, 0.3); }
.status-info { color: #8be9fd; }
.blinking-cursor { display: inline-block; width: 2px; height: 1.2em; background-color: #eee; vertical-align: text-bottom; animation: terminal-blink 1s step-end infinite; }
@keyframes terminal-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* アノテーション */
.term-annotation { 
    position: absolute; 
    background: #444; 
    color: #fff; 
    padding: 8px 16px; 
    border-radius: 4px; 
    font-size: 11px; 
    opacity: 0; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.4); 
    z-index: 5; 
    transition: opacity 0.5s, transform 0.5s; 
    border-left: 3px solid #50fa7b;
    white-space: nowrap;
}
.term-annotation.danger { border-left-color: #ff5555; }
#term-anno-1 { top: 60px; right: 40px; }
#term-anno-2 { bottom: 80px; right: 40px; }

/* 報告書カルーセル (webapp版のデザインを完全に移植) */
.report-track {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px;
    perspective: 1200px;
}
.report-card {
    position: absolute;
    width: 300px;
    height: 424px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    z-index: 0;
    pointer-events: none;
}
.report-card.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    pointer-events: auto;
}
.report-card.prev {
    opacity: 0.6;
    transform: translateX(-110%) scale(0.85) rotateY(15deg);
    z-index: 5;
}
.report-card.next {
    opacity: 0.6;
    transform: translateX(110%) scale(0.85) rotateY(-15deg);
    z-index: 5;
}
.report-img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* モーダル */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.8); 
    z-index: 2000; 
    align-items: center; 
    justify-content: center; 
}
.modal-overlay.active { display: flex; }
.modal-content { 
    background: #fff; 
    width: 90%; 
    max-width: 600px; 
    border-radius: 8px; 
    padding: 40px; 
    position: relative; 
}
.modal-close-btn { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: none; 
    border: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: #999; 
}
.modal-item-list { list-style: none; padding: 0; }
.modal-item-list li { 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.modal-item-list li i { color: var(--service-green); }

/* FLOWセクション */
.flow-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    max-width: 1000px; 
    margin: 40px auto 0; 
}
.flow-step { 
    text-align: center; 
    width: 180px; 
    position: relative; 
    z-index: 2; 
}
.step-circle { 
    width: 60px; 
    height: 60px; 
    background: #fff; 
    border: 2px solid #eee; 
    color: #ccc; 
    border-radius: 50%; 
    margin: 0 auto 20px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-weight: bold; 
    font-size: 18px; 
    transition: all 0.3s; 
    font-family: 'Jost', sans-serif; 
}
.flow-step:hover .step-circle { 
    border-color: #D02324; 
    color: #D02324; 
    box-shadow: 0 0 15px rgba(208, 35, 36, 0.2); 
}
.flow-step-content h3 { 
    font-size: 16px; 
    margin-bottom: 5px; 
    font-weight: 700; 
    color: #1a1a1a; 
}
.flow-step-content p { 
    font-size: 13px; 
    color: #777; 
    line-height: 1.6; 
}
.flow-connector { 
    flex: 1; 
    height: 1px; 
    background: #e0e0e0; 
    margin-top: 30px; 
    position: relative; 
}
.flow-connector::after { 
    content: ""; 
    position: absolute; 
    top: -2px; 
    left: 0; 
    width: 6px; 
    height: 6px; 
    background: #D02324; 
    border-radius: 50%; 
    animation: flowLine 2s infinite ease-in-out; 
    opacity: 0; 
}
@keyframes flowLine { 
    0% { left: 0; opacity: 1; } 
    100% { left: 100%; opacity: 0; } 
}
.flow-note { 
    text-align: right; 
    margin-top: 40px; 
    font-size: 14px; 
    color: #555; 
    max-width: 1000px; 
    margin-left: auto; 
    margin-right: auto; 
}


/* =================================================================
   RESPONSIVE STYLES
   ================================================================= */
@media (max-width: 768px) {
    /* ターミナルセクション */
    .terminal-window {
        margin-top: 20px;
    }
    .terminal-header {
        padding: 0 10px !important;
        height: 30px;
    }
    .terminal-dots {
        gap: 6px;
    }
    .dot-red, .dot-yellow, .dot-green {
        width: 10px;
        height: 10px;
    }
    .terminal-title {
        font-size: 9px;
        margin-left: 10px;
    }
    .terminal-body {
        min-height: 300px;
        padding: 15px !important;
    }
    .terminal-output-area {
        font-size: 10px;
        line-height: 1.4;
    }
    .cmd-prompt, .cmd-command {
        font-size: 11px;
    }
    
    /* アノテーション - モバイル位置調整 */
    .term-annotation {
        font-size: 9px;
        padding: 5px 10px;
        right: 10px !important;
    }
    #term-anno-1 {
        top: 50px;
        right: 10px;
    }
    #term-anno-2 {
        bottom: 60px;
        right: 10px;
    }
    
    /* レポートカルーセル */
    .report-track {
        height: 420px;
    }
    .report-card { 
        width: 240px; 
        height: 340px; 
    }
    
    /* Flowセクション */
    .flow-container { 
        flex-direction: column; 
        align-items: flex-start;
        gap: 0; 
        margin-top: 20px;
    }
    .flow-connector { 
        display: none; 
    }
    .flow-step { 
        text-align: left; 
        width: 100%; 
        display: flex; 
        align-items: flex-start; 
        gap: 20px;
        padding: 20px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .flow-step:last-of-type {
        border-bottom: none;
    }
    .step-circle { 
        margin: 0; 
        width: 50px; 
        height: 50px; 
        font-size: 16px; 
        flex-shrink: 0;
        /* モバイルでは最初から色付き */
        border-color: #D02324;
        color: #D02324;
    }
    .flow-step-content {
        flex: 1;
    }
    .flow-step-content h3 {
        margin-bottom: 8px;
    }
    .flow-step-content p {
        font-size: 14px;
    }
    .flow-note {
        margin-top: 25px;
        font-size: 13px;
    }
    
    /* モーダル */
    .modal-content {
        padding: 25px 20px;
        max-height: 80vh;
        overflow-y: auto;
    }
    .modal-close-btn {
        top: 15px;
        right: 15px;
    }
    .modal-item-list li {
        font-size: 14px;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    /* ターミナル - 超小型画面 */
    .terminal-body {
        min-height: 250px;
        padding: 12px !important;
    }
    .terminal-output-area {
        font-size: 9px;
    }
    .cmd-prompt, .cmd-command {
        font-size: 10px;
    }
    .term-annotation {
        font-size: 8px;
        padding: 4px 8px;
    }
    
    /* レポートカルーセル */
    .report-track {
        height: 350px;
    }
    .report-card {
        width: 200px;
        height: 283px;
    }
}
