/* ========================================
   section.system-showcase 用CSS
   全ての関連スタイルを抽出
   ======================================== */

/* ========================================
   1. 基本セクションスタイル
   ======================================== */
.system-showcase {
    padding: 100px 0;
    background: linear-gradient(135deg, #0a0e27 0%, #151b3d 100%);
    position: relative;
    overflow: hidden;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
}

.system-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================
   2. デバイスグリッドビジュアル
   ======================================== */
.device-grid-visual {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 40px;
}

.device-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    gap: 30px;
    padding: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0;
    backdrop-filter: blur(10px);
    border: 2px solid #00ff88;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 100%;
    box-shadow:
        0 0 100px rgba(0, 255, 136, 0.3),
        inset 0 0 50px rgba(0, 255, 136, 0.1);
}

/* ========================================
   3. マトリックス背景エフェクト
   ======================================== */
.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.3;
    pointer-events: none;
}

.matrix-column {
    position: absolute;
    top: -100%;
    width: 30px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            #00ff88 30%,
            #00ff88 70%,
            transparent 100%);
    animation: matrixFall 8s linear infinite;
    animation-delay: calc(var(--col) * 0.3s);
    opacity: 0.4;
}

@keyframes matrixFall {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}

/* ========================================
   4. デバイススタイル
   ======================================== */
/* スマートフォンデバイス */
.device-phone {
    width: 80px;
    height: 120px;
    background: #2a3158;
    border: 2px solid #1e2346;
    border-radius: 8px;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
    animation: deviceFloat 4s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.1s);
    flex: 0 0 auto;
}

.device-phone::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 20px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}


/* デスクトップPC */
.device-desktop {
    width: 110px;
    height: 85px;
    background: #2a3158;
    border: 2px solid #1e2346;
    border-radius: 4px;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.2);
    animation: deviceFloat 5s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.15s);
    flex: 0 0 auto;
}

.device-desktop::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 15px;
    background: #000;
    border-radius: 2px;
    overflow: hidden;
}

.device-desktop::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 10px;
    background: linear-gradient(145deg, #1e2346, #2a3158);
    border-radius: 0 0 4px 4px;
}

/* iPad/タブレット */
.device-tablet {
    width: 90px;
    height: 120px;
    background: #2a3158;
    border: 2px solid #1e2346;
    border-radius: 10px;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.2);
    animation: deviceFloat 4.5s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.12s);
    flex: 0 0 auto;
}

.device-tablet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.device-tablet:hover {
    transform: translateY(-10px) scale(1.1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(0, 255, 136, 0.4);
}

/* ラップトップ */
.device-laptop {
    width: 100px;
    height: 75px;
    background: #2a3158;
    border: 2px solid #1e2346;
    border-radius: 4px 4px 0 0;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.2);
    animation: deviceFloat 5.5s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.13s);
    flex: 0 0 auto;
}

.device-laptop::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: #000;
    border-radius: 2px;
    overflow: hidden;
}

.device-laptop::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: -5px;
    right: -5px;
    height: 8px;
    background: linear-gradient(145deg, #1a1f3a, #141829);
    border-radius: 0 0 8px 8px;
}

.device-laptop:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(0, 255, 136, 0.4);
}

/* ========================================
   5. デバイスアニメーション
   ======================================== */
@keyframes deviceFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }

    25% {
        transform: translateY(-3px) scale(1.02);
        filter: brightness(1.1);
    }

    50% {
        transform: translateY(-5px) scale(1.03);
        filter: brightness(1.2);
    }

    75% {
        transform: translateY(-3px) scale(1.02);
        filter: brightness(1.1);
    }
}

/* ========================================
   6. IPアドレス表示
   ======================================== */
.device-ip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #00ff88;
    text-align: center;
    font-weight: bold;
    animation: ipChange 3s steps(1) infinite;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 255, 136, 1);
}

@keyframes ipChange {
    0% {
        content: '192.168.1.1';
        opacity: 1;
    }

    25% {
        content: '10.0.0.5';
        opacity: 0.8;
    }

    50% {
        content: '172.16.0.3';
        opacity: 1;
    }

    75% {
        content: '203.0.113.7';
        opacity: 0.8;
    }

    100% {
        content: '198.51.100.2';
        opacity: 1;
    }
}

/* ========================================
   7. データストリーム
   ======================================== */
.data-stream {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.data-particle {
    position: absolute;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    animation: dataFlow 2s linear infinite;
    opacity: 0.8;
}

@keyframes dataFlow {
    0% {
        transform: translateX(-100%) translateY(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%) translateY(0);
        opacity: 0;
    }
}

/* ========================================
   8. ステータスインジケーター
   ======================================== */
.device-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: statusPulse 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes statusPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

/* ========================================
   9. ネットワーク接続線
   ======================================== */
.network-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.network-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    animation: dataFlow 3s linear infinite;
}

/* ========================================
   10. 統計ダッシュボード
   ======================================== */
.system-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 40px;
    margin-top: 80px;
    padding: 0 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    flex: 1 1 280px;
    max-width: 350px;
    min-width: 280px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    animation: scanLine 4s linear infinite;
}

@keyframes scanLine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #00ff88;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0066ff, #00ff88);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff88;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* ========================================
   11. プロセスフロー図
   ======================================== */
.process-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 80px 0;
    position: relative;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.process-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.process-icon {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border: 3px solid #0066cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.process-step:hover .process-icon {
    background: #0066cc;
    color: #ffffff;
}

.process-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.process-description {
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
    opacity: 0.95;
}

/* 接続線 */
.process-connector {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0066ff, #00ff88, transparent);
    z-index: 1;
}

/* ========================================
   12. リアルタイムモニター
   ======================================== */
.monitor-display {
    background: #0a0e27;
    border: 2px solid #00ff88;
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.monitor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.monitor-status {
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }
}

.monitor-title {
    color: #00ff88;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.monitor-content {
    font-family: 'Courier New', monospace;
    color: #00ff88;
    line-height: 1.8;
    font-weight: 600;
}

.monitor-line {
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    animation: typewriter 2s steps(30) forwards;
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* ========================================
   13. テクノロジーバッジ
   ======================================== */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 40px 0;
}

.tech-badge {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transform: translateY(-50%);
    transition: left 0.5s ease;
}

.tech-badge:hover::before {
    left: 100%;
}

.tech-badge:hover {
    background: #4caf50;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

/* ========================================
   14. クエリ送信アニメーション
   ======================================== */
.query-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 5;
}

.query-bubble {
    position: absolute;
    background: #00ff88;
    border: 2px solid #00cc6a;
    border-radius: 20px;
    padding: 12px 20px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    color: #000000;
    font-weight: 900;
    white-space: nowrap;
    animation: sendQuery 3s linear forwards;
    box-shadow:
        0 0 40px rgba(0, 255, 136, 1),
        0 0 80px rgba(0, 255, 136, 0.5);
    backdrop-filter: blur(5px);
    letter-spacing: 0.5px;
}

@keyframes sendQuery {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0;
    }

    10% {
        transform: scale(1) translateY(-5px);
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(-30px);
        opacity: 1;
    }

    100% {
        transform: scale(0.8) translateY(-60px);
        opacity: 0;
    }
}

/* ========================================
   15. クエリカウンター
   ======================================== */
.query-counter {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff88;
    border-radius: 10px;
    padding: 15px 25px;
    font-family: 'Courier New', monospace;
    color: #00ff88;
    font-size: 16px;
    z-index: 10;
    box-shadow:
        0 0 30px rgba(0, 255, 136, 0.5),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(10px);
}

.query-counter::before {
    content: '🔍 ';
    margin-right: 5px;
}

.counter-number {
    font-weight: 900;
    font-size: 24px;
    color: #00ff88;
    animation: counterGlow 1s ease-in-out infinite;
}

@keyframes counterGlow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ========================================
   16. 視認性改善（ダークセクション用）
   ======================================== */
.system-showcase p {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

.system-showcase h1,
.system-showcase h2,
.system-showcase h3 {
    color: #ffffff !important;
}

/* ========================================
   17. レスポンシブ対応
   ======================================== */
@media (max-width: 1024px) {
    .device-grid {
        padding: 40px 30px;
        gap: 25px;
    }

    .device-phone,
    .device-desktop,
    .device-tablet,
    .device-laptop {
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {
    .system-showcase {
        padding: 60px 0;
    }

    .device-grid-visual {
        padding: 40px 20px;
    }

    .device-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 30px 20px;
        width: 100%;
        border-radius: 10px;
    }

    .device-phone {
        width: 50px;
        height: 80px;
    }

    .device-desktop {
        width: 70px;
        height: 55px;
    }

    .device-tablet {
        width: 60px;
        height: 80px;
    }

    .device-laptop {
        width: 65px;
        height: 50px;
    }

    .query-bubble {
        font-size: 12px;
        padding: 8px 12px;
    }

    .system-stats {
        gap: 20px;
        padding: 0 20px;
    }

    .process-flow {
        flex-direction: column;
        gap: 40px;
    }

    .process-connector {
        display: none;
    }

    .system-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .device-grid {
        padding: 20px 15px;
        gap: 15px;
    }

    .device-phone {
        width: 40px;
        height: 65px;
    }

    .device-desktop {
        width: 55px;
        height: 45px;
    }

    .device-tablet {
        width: 45px;
        height: 65px;
    }

    .device-laptop {
        width: 50px;
        height: 40px;
    }
}
