/* Blueprint Grid */
.blueprint-card {
    grid-column: span 2;
    /* Full width */
}

.blueprint-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
    padding: 1rem;
}

.blueprint-item {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.5s ease;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.blueprint-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.blueprint-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-light);
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.blueprint-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #444;
}

.blueprint-item .score-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    background: #e8eaf6;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Status Styles */
.blueprint-item.graffiti .blueprint-icon-wrapper {
    color: #999;
}

.blueprint-item.graffiti {
    border-color: #ddd;
}

/* Graffiti Effect using pseudo-element */
.blueprint-item.graffiti::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10l80 80M90 10l-80 80M30 10l40 80M70 10l-40 80' stroke='%23ccc' stroke-width='1' fill='none' opacity='0.3'/%3E%3C/svg%3E");
    z-index: 1;
    pointer-events: none;
}

.blueprint-item.coated .blueprint-icon-wrapper {
    background: #E0F2F1;
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 150, 136, 0.3);
}

.blueprint-item.coated {
    border-color: var(--accent-light);
}

/* Weakest Link - Amber Gold - The Problem Areas */
.blueprint-item.weakest {
    border: 2px solid var(--accent-gold);
    animation: pulseBorder 2s infinite;
}

.blueprint-item.weakest .blueprint-icon-wrapper {
    color: var(--accent-gold);
    background: #FFF8E1;
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Cleaning Animation */
.blueprint-item.cleaning::before {
    transition: opacity 1s ease;
    opacity: 0;
}

.blueprint-item.cleaning .blueprint-icon-wrapper {
    transition: all 1s ease;
    background: #E0F2F1;
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Connecting Line SVG Container */
#blueprint-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 960px) {
    .blueprint-card {
        grid-column: auto !important;
        width: 100% !important;
    }

    .blueprint-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.2rem;
        padding: 0.5rem;
    }

    .blueprint-item {
        padding: 1.5rem;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1.5rem;
    }

    .blueprint-icon-wrapper {
        margin: 0;
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        flex-shrink: 0;
        background: #f0f7f7;
    }

    .blueprint-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        flex: 1;
    }

    .blueprint-item h4 {
        margin-bottom: 0;
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--primary-color);
        letter-spacing: -0.02em;
    }

    .score-container {
        margin-top: 0;
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        width: 100%;
    }

    .score-number {
        font-size: 1rem;
        color: var(--text-color);
    }

    .mini-gauge {
        width: 100%;
        max-width: 250px;
        height: 8px;
        margin: 0;
    }
}

/* Score Gauge Styles */
.score-container {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
}

.score-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mini-gauge {
    width: 80%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mini-gauge-fill {
    height: 100%;
    /* width is set by inline style */
    background: var(--accent-light);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Specific item colors */
.blueprint-item.weakest .mini-gauge-fill {
    background: var(--accent-gold);
}

.blueprint-item.coated .mini-gauge-fill {
    background: var(--accent-color);
}

.blueprint-item.graffiti .mini-gauge-fill {
    background: #bbb;
}