.collage-container {
    position: relative;
    width: 100%;
    height: 70vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    height: 95%;
    max-width: 800px;
    max-height: 600px; 
}

.component-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

    .component-card:hover {
        transform: translateY(-10px) scale(1.05);
        background: rgba(255, 255, 255, 0.15);
        border-color: #00ff88;
        box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
    }

    .component-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }

    .component-card:hover::before {
        left: 100%;
    }

.component-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transition: all 0.3s ease;
}

.component-card:hover .component-icon {
    transform: scale(1.2);
    color: #ffffff;
}

.component-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.component-subtitle {
    font-size: 11px;
    color: #bbb;
    text-align: center;
    opacity: 0.8;
}

.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Grid positioning for better layout */
.component-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    animation-delay: 0.1s;
}

.component-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    animation-delay: 0.2s;
}

.component-card:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    animation-delay: 0.3s;
}

.component-card:nth-child(4) {
    grid-column: 4;
    grid-row: 1;
    animation-delay: 0.4s;
}

.component-card:nth-child(5) {
    grid-column: 1;
    grid-row: 2;
    animation-delay: 0.5s;
}

.component-card:nth-child(6) {
    grid-column: 2;
    grid-row: 2;
    animation-delay: 0.6s;
}

.component-card:nth-child(7) {
    grid-column: 3;
    grid-row: 2;
    animation-delay: 0.7s;
}

.component-card:nth-child(8) {
    grid-column: 4;
    grid-row: 2;
    animation-delay: 0.8s;
}

.component-card:nth-child(9) {
    grid-column: 1;
    grid-row: 3;
    animation-delay: 0.9s;
}

.component-card:nth-child(10) {
    grid-column: 2;
    grid-row: 3;
    animation-delay: 1.0s;
}

.component-card:nth-child(11) {
    grid-column: 3;
    grid-row: 3;
    animation-delay: 1.1s;
}

.component-card:nth-child(12) {
    grid-column: 4;
    grid-row: 3;
    animation-delay: 1.2s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.header-overlay {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 10;
}

    .header-overlay h1 {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 10px;
        color: #00ff88;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }

    .header-overlay p {
        font-size: 16px;
        opacity: 0.9;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    }

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(circle at 25% 25%, #00ff88 2px, transparent 2px), radial-gradient(circle at 75% 75%, #3498db 2px, transparent 2px);
    background-size: 100px 100px, 150px 150px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    animation: dataFlow 4s infinite;
}

    .line:nth-child(1) {
        top: 25%;
        left: 10%;
        width: 30%;
        animation-delay: 0s;
    }

    .line:nth-child(2) {
        top: 50%;
        right: 10%;
        width: 25%;
        animation-delay: 1s;
    }

    .line:nth-child(3) {
        top: 75%;
        left: 15%;
        width: 35%;
        animation-delay: 2s;
    }

@keyframes dataFlow {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}
