/* ========================================================
   KSP Tech Realistic 360° Industrial Tank Viewer Styles
   ======================================================== */

.tank-viewer-section {
    background: #f8fafc;
    padding: 40px 0 60px 0;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.tank-viewer-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
}

.tank-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #edf2f7;
    flex-wrap: wrap;
    gap: 12px;
}

.tank-badge {
    background: #eef2ff;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tank-title-group h3 {
    margin: 4px 0 0 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.tank-title-group p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #64748b;
}

/* Central Stage Container */
.tank-stage-container {
    width: 100%;
    height: 620px;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
    position: relative;
    outline: none;
    cursor: grab;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.tank-stage-container:active {
    cursor: grabbing;
}

/* 360 Photographic Replica Stage */
.tank-turntable-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tank-turntable-view img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.22));
    transition: transform 0.15s ease-out;
    transform-origin: center center;
    will-change: transform;
}

/* 3D WebGL Canvas */
.tank-webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.tank-webgl-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Degree Indicator Badge */
.tank-degree-badge {
    position: absolute;
    top: 18px;
    left: 20px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.tank-degree-badge .live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Floating Controls Toolbar */
.tank-toolbar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 20;
    transition: all 0.25s ease;
}

.tank-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    position: relative;
}

.tank-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateY(-2px);
}

.tank-btn.active {
    background: #3b82f6;
    color: #ffffff;
}

.tank-btn-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 2px;
}

/* Tooltip */
.tank-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* View Angle Hotspots Selector (Top Right) */
.tank-views-toolbar {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
}

.tank-view-chip {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tank-view-chip:hover,
.tank-view-chip.active {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
}

/* Instruction Text at Bottom */
.tank-instructions {
    text-align: center;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
    color: #64748b;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.tank-instructions span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Engineering Specs Grid */
.tank-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.tank-spec-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    transition: all 0.25s ease;
}

.tank-spec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.tank-spec-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

.tank-spec-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.tank-spec-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Fullscreen adjustments */
.tank-stage-container:fullscreen {
    height: 100vh !important;
    width: 100vw !important;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #cbd5e1 100%);
}

.tank-stage-container:-webkit-full-screen {
    height: 100vh !important;
    width: 100vw !important;
}

@media (max-width: 991px) {
    .tank-stage-container {
        height: 500px;
    }
}

@media (max-width: 767px) {
    .tank-stage-container {
        height: 400px;
    }
    .tank-views-toolbar {
        top: 10px;
        right: 10px;
    }
    .tank-view-chip {
        font-size: 11px;
        padding: 4px 10px;
    }
    .tank-degree-badge {
        top: 10px;
        left: 10px;
        font-size: 11px;
        padding: 4px 10px;
    }
    .tank-toolbar {
        bottom: 12px;
        padding: 6px 12px;
        gap: 6px;
    }
    .tank-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .tank-instructions {
        font-size: 11px;
        gap: 10px;
    }
}
